Sha256: 240e8b21020d2c1db113f55e39d05ed797cfb741cd2babe0757df6bb2eedf336
Contents?: true
Size: 1.18 KB
Versions: 2
Compression:
Stored size: 1.18 KB
Contents
def source_paths [ File.expand_path(File.dirname(__FILE__)) ] end # The generated config/boot.rb file references a Gemfile in the dummy app # directory so use one that references the parent app. remove_file "config/boot.rb" copy_file "boot.rb.tt", "config/boot.rb" # The generated config/secrets.yml file uses hardcoded values for # test/development environments. Generate secrets pragmatically. remove_file "config/secrets.yml" template "secrets.yml.erb", "config/secrets.yml" # Comment out username, password from production group. gsub_file "config/database.yml", /^([ ]*[^#])(username: .*|password: .*)$/, '\1# \2' # The db/migrate folder never gets created for the dummy_app so do it manually. unless Dir.exist?("db/migrate") say_status :create, "db/migrate" Dir.mkdir("db/migrate") end # Mailer previews don't really play nice with Engines so in the dummy app we # create an initializer to expose them properly. initializer "expose_mailer_previews.rb", <<-INITIALIZER.strip_heredoc Rails.application.configure do config.action_mailer.preview_path = "\#{Jobshop::Engine.root}/spec/mailers" end INITIALIZER route "mount Jobshop::Engine => \"/\"" rake "db:create" rake "db:migrate"
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
jobshop-0.0.37 | lib/jobshop/templates/dummy_template.rb |
jobshop-0.0.29 | lib/jobshop/templates/dummy_template.rb |