bin/zena in zena-0.15.1 vs bin/zena in zena-0.15.2
- old
+ new
@@ -1,5 +1,17 @@
#!/usr/bin/env ruby
require 'rubygems'
require 'zena/info'
+require 'rails/version'
+require 'rails_generator'
+require 'rails_generator/scripts/generate'
-exec "rails -m #{File.join(Zena::ROOT, 'lib', 'zena', 'deploy', 'template.rb').inspect} #{ARGV.first}"
+template_path = File.join(Zena::ROOT, 'lib', 'zena', 'deploy', 'template.rb')
+args = ["-m", template_path]
+args << ARGV.first
+
+puts "Generating zena application from template #{template_path}"
+Rails::Generator::Base.use_application_sources!
+Rails::Generator::Scripts::Generate.new.run(
+ args,
+ :generator => 'app'
+)