Initializer generator
This commit is contained in:
parent
af16ec0982
commit
908d8492f7
|
@ -1,12 +1,6 @@
|
|||
require 'burden'
|
||||
|
||||
Burden.configure do |c|
|
||||
c.storage = :active_record
|
||||
c.ignored_tasks = [
|
||||
/environment/,
|
||||
/^db:/,
|
||||
/^assets:/,
|
||||
/^doc:/,
|
||||
/^tmp:/,
|
||||
/^time:/,
|
||||
/^rails:/
|
||||
]
|
||||
c.ignored_tasks = [/environment/]
|
||||
end
|
||||
|
|
|
@ -8,8 +8,6 @@ require 'burden/storage'
|
|||
require 'burden/version'
|
||||
require 'burden/wrapper'
|
||||
|
||||
# require 'generators/burden/install_generator'
|
||||
|
||||
module Burden
|
||||
include Config::Helper
|
||||
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
Description:
|
||||
Explain the generator
|
||||
Generates Burden migration and initializer
|
||||
|
||||
Example:
|
||||
rails generate install Thing
|
||||
rails generate burden:install
|
||||
|
||||
This will create:
|
||||
what/will/it/create
|
||||
config/initializers/burden.rb
|
||||
db/migrate/create_burden_runs.rb
|
||||
|
|
|
@ -9,11 +9,15 @@ module Burden
|
|||
source_root File.expand_path('../templates', __FILE__)
|
||||
|
||||
def self.next_migration_number(path)
|
||||
Time.now.utc.strftime("%Y%m%d%H%M%S")
|
||||
Time.now.utc.strftime('%Y%m%d%H%M%S')
|
||||
end
|
||||
|
||||
def create_migration
|
||||
migration_template 'create_burden_runs.rb', 'db/migrate/create_burden_runs.rb'
|
||||
migration_template 'burden_runs_migration.rb', 'db/migrate/create_burden_runs.rb'
|
||||
end
|
||||
|
||||
def create_initializer
|
||||
template 'burden_initializer.rb', 'config/initializers/burden.rb'
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
Burden.configure do |c|
|
||||
c.storage = :active_record
|
||||
c.ignored_tasks = [/environment/]
|
||||
end
|
Loading…
Reference in New Issue