Sha256: 275f8ce7f42f8869b53047ce04ce6ddfdac007e3373a9e427225714d58ee934e

Contents?: true

Size: 731 Bytes

Versions: 52

Compression:

Stored size: 731 Bytes

Contents

if ARGV.first != "new"
  ARGV[0] = "--help"
else
  ARGV.shift
  unless ARGV.delete("--no-rc")
    customrc = ARGV.index{ |x| x.include?("--rc=") }
    railsrc = if customrc
                File.expand_path(ARGV.delete_at(customrc).gsub(/--rc=/, ""))
              else
                File.join(File.expand_path("~"), '.railsrc')
              end
    if File.exist?(railsrc)
      extra_args_string = File.read(railsrc)
      extra_args = extra_args_string.split(/\n+/).flat_map {|l| l.split}
      puts "Using #{extra_args.join(" ")} from #{railsrc}"
      ARGV.insert(1, *extra_args)
    end
  end
end

require 'rails/generators'
require 'rails/generators/rails/plugin/plugin_generator'
Rails::Generators::PluginGenerator.start

Version data entries

52 entries across 51 versions & 8 rubygems

Version Path
railties-4.2.11.3 lib/rails/commands/plugin.rb
railties-4.2.11.2 lib/rails/commands/plugin.rb
railties-4.2.11.1 lib/rails/commands/plugin.rb
railties-4.2.11 lib/rails/commands/plugin.rb
railties-4.2.10 lib/rails/commands/plugin.rb
railties-4.2.10.rc1 lib/rails/commands/plugin.rb
railties-4.2.9 lib/rails/commands/plugin.rb
railties-4.2.9.rc2 lib/rails/commands/plugin.rb
railties-4.2.9.rc1 lib/rails/commands/plugin.rb
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/gems/railties-4.2.8/lib/rails/commands/plugin.rb
railties-4.2.8 lib/rails/commands/plugin.rb
railties-4.2.8.rc1 lib/rails/commands/plugin.rb
railties-4.2.7.1 lib/rails/commands/plugin.rb
railties-4.2.7 lib/rails/commands/plugin.rb
railties-4.2.7.rc1 lib/rails/commands/plugin.rb
ish_lib_manager-0.0.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/railties-4.2.6/lib/rails/commands/plugin.rb
railties-4.2.6 lib/rails/commands/plugin.rb
railties-4.2.6.rc1 lib/rails/commands/plugin.rb
railties-4.2.5.2 lib/rails/commands/plugin.rb
activejob-lock-0.0.2 rails/railties/lib/rails/commands/plugin.rb