1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Passing args for gemfile entry

Fixing build
This commit is contained in:
Arun Agrawal 2013-11-01 11:11:52 +01:00
parent 2e7ee652d2
commit e42fb393c2
2 changed files with 8 additions and 2 deletions

View file

@ -6,6 +6,7 @@ require 'rbconfig'
require 'open-uri'
require 'uri'
require 'rails/generators/base'
require 'active_support/core_ext/array/extract_options'
module Rails
module Generators
@ -86,7 +87,12 @@ module Rails
protected
def gemfile_entry(name, version = nil, github: nil, path: nil)
def gemfile_entry(name, *args)
options = args.extract_options!
version = args.first
github = options[:github]
path = options[:path]
if github
@extra_entries << GemfileEntry.github(name, github)
elsif path

View file

@ -6,7 +6,7 @@ module Rails
module Generators
class GeneratorTest < ActiveSupport::TestCase
def make_builder_class
klass = Class.new(AppBase) do
Class.new(AppBase) do
add_shared_options_for "application"
# include a module to get around thor's method_added hook