Class: Economy::Generators::InstallGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Includes:
Rails::Generators::Migration
Defined in:
lib/generators/economy/install/install_generator.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.next_migration_number(path) ⇒ Object



22
23
24
# File 'lib/generators/economy/install/install_generator.rb', line 22

def self.next_migration_number(path)
  Time.now.utc.strftime '%Y%m%d%H%M%S'
end

Instance Method Details

#add_create_exchanges_fileObject



18
19
20
# File 'lib/generators/economy/install/install_generator.rb', line 18

def add_create_exchanges_file
  migration_template 'create_exchanges.rb', 'db/migrate/create_exchanges.rb'
end

#add_economy_fileObject



10
11
12
# File 'lib/generators/economy/install/install_generator.rb', line 10

def add_economy_file
  copy_file 'economy.rb', 'config/initializers/economy.rb'
end

#add_redis_fileObject



14
15
16
# File 'lib/generators/economy/install/install_generator.rb', line 14

def add_redis_file
  copy_file 'redis.yml', 'config/redis.yml'
end