Class: WheelsUpdateGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- WheelsUpdateGenerator
- Includes:
- Rails::Generators::Migration
- Defined in:
- lib/generators/wheels_update/wheels_update_generator.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.next_migration_number(dirname) ⇒ Object
28 29 30 31 32 33 34 35 |
# File 'lib/generators/wheels_update/wheels_update_generator.rb', line 28 def self.next_migration_number(dirname) if ActiveRecord::Base. Time.now.utc.strftime("%Y%m%d%H%M%S") else "%.3d" % (current_migration_number(dirname) + 1) end end |
Instance Method Details
#bundle_install ⇒ Object
20 21 22 |
# File 'lib/generators/wheels_update/wheels_update_generator.rb', line 20 def bundle_install run 'bundle install' end |
#execute ⇒ Object
24 25 26 |
# File 'lib/generators/wheels_update/wheels_update_generator.rb', line 24 def execute execute_stategies end |
#init ⇒ Object
12 13 14 |
# File 'lib/generators/wheels_update/wheels_update_generator.rb', line 12 def init initialize_templater end |
#load_recipes ⇒ Object
16 17 18 |
# File 'lib/generators/wheels_update/wheels_update_generator.rb', line 16 def load_recipes apply recipe('wheels_update') end |