Class: WheelsUpdateGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
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.timestamped_migrations
    Time.now.utc.strftime("%Y%m%d%H%M%S")
  else
    "%.3d" % (current_migration_number(dirname) + 1)
  end
end

Instance Method Details

#bundle_installObject



20
21
22
# File 'lib/generators/wheels_update/wheels_update_generator.rb', line 20

def bundle_install
  run 'bundle install'
end

#executeObject



24
25
26
# File 'lib/generators/wheels_update/wheels_update_generator.rb', line 24

def execute
  execute_stategies
end

#initObject



12
13
14
# File 'lib/generators/wheels_update/wheels_update_generator.rb', line 12

def init
  initialize_templater
end

#load_recipesObject



16
17
18
# File 'lib/generators/wheels_update/wheels_update_generator.rb', line 16

def load_recipes
  apply recipe('wheels_update')
end