penchant 0.2.4 → 0.2.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -124,13 +124,13 @@ Feature: Gemfiles
124
124
  Scenario: Single gem gets processed like a gems list
125
125
  Given I have the file "Gemfile.penchant" with the content:
126
126
  """
127
- gem 'one', :path => '../%s'
127
+ gem 'one', '1.2.3', :path => '../%s'
128
128
  """
129
129
  When I rebuild the Gemfile for "local" mode
130
130
  Then the file "Gemfile" should have the following content:
131
131
  """
132
132
  # generated by penchant, environment: local
133
- gem "one", {:path=>"../one"}
133
+ gem "one", "1.2.3", {:path=>"../one"}
134
134
  """
135
135
 
136
136
  @mocha
@@ -233,11 +233,19 @@ module Penchant
233
233
  end
234
234
 
235
235
  def gem(*args)
236
- gem_name, template = split_args(args)
236
+ gem_name = [ args.shift ]
237
+ template = {}
238
+
239
+ if args.last.kind_of?(::Hash)
240
+ template = args.pop
241
+ end
242
+
243
+ version = args.first
237
244
 
238
245
  options = process_options(gem_name, template)
239
246
 
240
247
  args = [ gem_name.first ]
248
+ args << version if version
241
249
  args << options if !options.empty?
242
250
 
243
251
  if options[:git]
@@ -1,3 +1,3 @@
1
1
  module Penchant
2
- VERSION = "0.2.4"
2
+ VERSION = "0.2.5"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: penchant
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.4
4
+ version: 0.2.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-06-08 00:00:00.000000000 Z
12
+ date: 2012-06-11 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: Things I do for my Rails projects to get up to speed in new environments
15
15
  fast
@@ -79,12 +79,18 @@ required_ruby_version: !ruby/object:Gem::Requirement
79
79
  - - ! '>='
80
80
  - !ruby/object:Gem::Version
81
81
  version: '0'
82
+ segments:
83
+ - 0
84
+ hash: -1641612638013508489
82
85
  required_rubygems_version: !ruby/object:Gem::Requirement
83
86
  none: false
84
87
  requirements:
85
88
  - - ! '>='
86
89
  - !ruby/object:Gem::Version
87
90
  version: '0'
91
+ segments:
92
+ - 0
93
+ hash: -1641612638013508489
88
94
  requirements: []
89
95
  rubyforge_project: penchant
90
96
  rubygems_version: 1.8.23
@@ -115,4 +121,3 @@ test_files:
115
121
  - spec/lib/penchant/gemfile_spec.rb
116
122
  - spec/lib/penchant_spec.rb
117
123
  - spec/spec_helper.rb
118
- has_rdoc: