Sha256: 82e120a40b6c158d464c6194843c5eb8d612a036f8bf0b31038b19644ba2a9e0
Contents?: true
Size: 989 Bytes
Versions: 31
Compression:
Stored size: 989 Bytes
Contents
#!/usr/bin/env ruby env = ENV['RUBBER_ENV'] || ENV['RAILS_ENV'] || 'development' root = '.' # if in a rails project, then use standard generate, otherwise # we need a minimal rails environment for generators to run # if File.exist?(File.join(root, 'config', 'environment.rb')) ARGV.insert(0, 'vulcanize') require File.join(root, 'config', 'boot') require 'commands/generate' else RAILS_ENV = ENV['RAILS_ENV'] = env RAILS_ROOT = ENV['RAILS_ROOT'] = root require 'rubygems' gem 'rails' module Rails class << self def vendor_rails? false end end end require 'initializer' class Rails::Initializer def load_environment; end end Rails::Initializer.run do |config| config.frameworks -= [:active_record, :action_controller] end require 'rails_generator' require 'rails_generator/scripts/generate' ARGV.shift if ['--help', '-h'].include?(ARGV[0]) Rails::Generator::Scripts::Generate.new.run(['vulcanize'] + ARGV) end
Version data entries
31 entries across 31 versions & 5 rubygems