Class: MyBloodyValentine::AppBuilder
- Inherits:
-
Rails::AppBuilder
- Object
- Rails::AppBuilder
- MyBloodyValentine::AppBuilder
- Defined in:
- lib/my_bloody_valentine/app_builder.rb
Instance Method Summary collapse
- #add_custom_gems ⇒ Object
- #initialize_on_precompile ⇒ Object
- #remove_public_index ⇒ Object
- #setup_staging_environment ⇒ Object
- #use_postgres_config_template ⇒ Object
Instance Method Details
#add_custom_gems ⇒ Object
18 19 20 21 22 23 |
# File 'lib/my_bloody_valentine/app_builder.rb', line 18 def add_custom_gems additions_path = find_in_source_paths 'Gemfile_additions' new_gems = File.open(additions_path).read inject_into_file 'Gemfile', "\n #{new_gems}", :after => /gem 'jquery-rails'/ end |
#initialize_on_precompile ⇒ Object
7 8 9 10 11 |
# File 'lib/my_bloody_valentine/app_builder.rb', line 7 def initialize_on_precompile inject_into_file 'config/application.rb', "\n config.assets.initialize_on_precompile = false", :after => 'config.assets.enabled = true' end |
#remove_public_index ⇒ Object
3 4 5 |
# File 'lib/my_bloody_valentine/app_builder.rb', line 3 def remove_public_index remove_file 'public/index.html' end |
#setup_staging_environment ⇒ Object
25 26 27 |
# File 'lib/my_bloody_valentine/app_builder.rb', line 25 def setup_staging_environment run 'cp config/environments/production.rb config/environments/staging.rb' end |
#use_postgres_config_template ⇒ Object
13 14 15 16 |
# File 'lib/my_bloody_valentine/app_builder.rb', line 13 def use_postgres_config_template template 'postgresql_database.yml.erb', 'config/database.yml', :force => true end |