Skip to content

Commit

Permalink
Remove rails-dev-tweaks, enable ActiveReload on dryml files, add more…
Browse files Browse the repository at this point in the history
… comments to our environment changes.
  • Loading branch information
bryanlarsen committed Sep 24, 2012
1 parent 2cc75d4 commit b7bc2b4
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 34 deletions.
2 changes: 2 additions & 0 deletions hobo/lib/generators/hobo/assets/assets_generator.rb
Expand Up @@ -25,7 +25,9 @@ def copy_rapid_files
copy_file 'front.js', 'app/assets/javascripts/front.js'
copy_file 'gitkeep', 'app/assets/javascripts/front/.gitkeep'

application "#"
application "config.assets.precompile += %w(front.css front.js)"
application "# Hobo: the front subsite loads front.css & front.js"
end

end
Expand Down
31 changes: 0 additions & 31 deletions hobo/lib/generators/hobo/dev_tweaks/dev_tweaks_generator.rb

This file was deleted.

12 changes: 9 additions & 3 deletions hobo/lib/generators/hobo/setup_wizard/setup_wizard_generator.rb
Expand Up @@ -150,7 +150,9 @@ def dryml_only_templates_option
if dryml_only_templates
remove_file 'app/views/layouts/application.html.erb'
remove_file 'app/helpers/application_helper.rb'
environment "\n config.hobo.dryml_only_templates = true\n"
environment "#"
environment "config.hobo.dryml_only_templates = true"
environment "# Hobo: remove support for ERB templates"
end
end

Expand Down Expand Up @@ -218,8 +220,10 @@ def invoking_user_and_admin
end
end

def add_dev_tweaks
invoke 'hobo:dev_tweaks'
def active_reload_dryml
environment "#", :env => :development
environment "config.watchable_dirs[File.join(config.root, 'app/view')] = ['dryml']", :env => :development
environment "# Hobo: tell ActiveReload about dryml", :env => :development
end

def generate_migration
Expand Down Expand Up @@ -262,7 +266,9 @@ def i18n
end
unless default_locale.blank?
default_locale.gsub!(/\:/, '')
environment "#"
environment "config.i18n.default_locale = #{default_locale.to_sym.inspect}"
environment "#"
end
ls = (locales - %w[en]).map {|l| ":#{l}" }
lstr = ls.to_sentence
Expand Down
2 changes: 2 additions & 0 deletions hobo/lib/generators/hobo/subsite.rb
Expand Up @@ -26,7 +26,9 @@ def move_and_generate_files

template "controller.rb.erb", File.join('app/controllers', file_name, "#{file_name}_site_controller.rb")

application "#"
application "config.assets.precompile += %w(#{file_name}.css #{file_name}.js)"
application "# Hobo: the #{file_name} subsite loads #{file_name}.css & #{file_name}.js"
end

hook_for :test_framework, :as => :controller do | instance, controller_test |
Expand Down

0 comments on commit b7bc2b4

Please sign in to comment.