gem by itself handles version now
This commit is contained in:
parent
1b97fa6078
commit
bc09df6bce
@ -124,13 +124,13 @@ Feature: Gemfiles
|
||||
Scenario: Single gem gets processed like a gems list
|
||||
Given I have the file "Gemfile.penchant" with the content:
|
||||
"""
|
||||
gem 'one', :path => '../%s'
|
||||
gem 'one', '1.2.3', :path => '../%s'
|
||||
"""
|
||||
When I rebuild the Gemfile for "local" mode
|
||||
Then the file "Gemfile" should have the following content:
|
||||
"""
|
||||
# generated by penchant, environment: local
|
||||
gem "one", {:path=>"../one"}
|
||||
gem "one", "1.2.3", {:path=>"../one"}
|
||||
"""
|
||||
|
||||
@mocha
|
||||
|
@ -233,11 +233,19 @@ module Penchant
|
||||
end
|
||||
|
||||
def gem(*args)
|
||||
gem_name, template = split_args(args)
|
||||
gem_name = [ args.shift ]
|
||||
template = {}
|
||||
|
||||
if args.last.kind_of?(::Hash)
|
||||
template = args.pop
|
||||
end
|
||||
|
||||
version = args.first
|
||||
|
||||
options = process_options(gem_name, template)
|
||||
|
||||
args = [ gem_name.first ]
|
||||
args << version if version
|
||||
args << options if !options.empty?
|
||||
|
||||
if options[:git]
|
||||
|
@ -1,3 +1,3 @@
|
||||
module Penchant
|
||||
VERSION = "0.2.4"
|
||||
VERSION = "0.2.5"
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user