4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
# File 'lib/switchtower/generators/rails/loader.rb', line 4
def self.load!(options)
require "#{options[:apply_to]}/config/environment"
require "rails_generator"
require "rails_generator/scripts/generate"
Rails::Generator::Base.sources << Rails::Generator::PathSource.new(
:switchtower, File.dirname(__FILE__))
args = ["deployment"]
args << (options[:application] || "Application")
args << (options[:recipe_file] || "deploy")
Rails::Generator::Scripts::Generate.new.run(args)
end
|