penchant 0.2.8.1 → 0.2.9

Sign up to get free protection for your applications and to get access to all the features.
@@ -234,3 +234,18 @@ Feature: Gemfiles
234
234
  # generated by penchant, environment: local
235
235
  gem "one", "1.2.3", {:path=>"../one"}
236
236
  """
237
+
238
+ Scenario: Override defaults for an environment
239
+ Given I have the file "Gemfile.penchant" with the content:
240
+ """
241
+ defaults_for env(:local), :path => '../%s'
242
+ env :local do
243
+ gem 'one', '1.2.3', :path => '../cats'
244
+ end
245
+ """
246
+ When I rebuild the Gemfile for "local" mode
247
+ Then the file "Gemfile" should have the following content:
248
+ """
249
+ # generated by penchant, environment: local
250
+ gem "one", "1.2.3", {:path=>"../cats"}
251
+ """
@@ -193,7 +193,7 @@ module Penchant
193
193
 
194
194
  def process_options(gem_name, template = {})
195
195
  Hash[
196
- template.merge(_defaults_for(gem_name)).collect { |key, value|
196
+ _defaults_for(gem_name).dup.merge(template).collect { |key, value|
197
197
  value = value % gem_name if value.respond_to?(:%)
198
198
 
199
199
  [ key, value ]
@@ -1,3 +1,3 @@
1
1
  module Penchant
2
- VERSION = "0.2.8.1"
2
+ VERSION = "0.2.9"
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.8.1
4
+ version: 0.2.9
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-21 00:00:00.000000000 Z
12
+ date: 2012-07-03 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -193,7 +193,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
193
193
  version: '0'
194
194
  segments:
195
195
  - 0
196
- hash: -4450964138399606364
196
+ hash: -1066545931225637569
197
197
  required_rubygems_version: !ruby/object:Gem::Requirement
198
198
  none: false
199
199
  requirements:
@@ -202,7 +202,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
202
202
  version: '0'
203
203
  segments:
204
204
  - 0
205
- hash: -4450964138399606364
205
+ hash: -1066545931225637569
206
206
  requirements: []
207
207
  rubyforge_project: penchant
208
208
  rubygems_version: 1.8.23