penchant 0.2.23 → 0.2.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/features/ruby_gemfile.feature +30 -0
- data/lib/penchant/gemfile.rb +4 -1
- data/lib/penchant/version.rb +1 -1
- metadata +4 -4
@@ -322,6 +322,36 @@ Feature: Gemfiles
|
|
322
322
|
gem "two", {:require=>nil}
|
323
323
|
"""
|
324
324
|
|
325
|
+
Scenario: Define a pair of opposites in the other order
|
326
|
+
Given I have the file "Gemfile.penchant" with the content:
|
327
|
+
"""
|
328
|
+
opposites :local, :remote
|
329
|
+
defaults_for env(:local), :path => '../%s'
|
330
|
+
|
331
|
+
property(:github) { |name| { :git => "git://github.com/#{name}/%s.git" } }
|
332
|
+
|
333
|
+
env :remote do
|
334
|
+
gem 'one', :github => 'johnbintz', :require => nil
|
335
|
+
end
|
336
|
+
env :local do
|
337
|
+
gem 'two', :path => '../%s', :require => nil
|
338
|
+
end
|
339
|
+
"""
|
340
|
+
When I rebuild the Gemfile for "local" mode
|
341
|
+
Then the file "Gemfile" should have the following content:
|
342
|
+
"""
|
343
|
+
# generated by penchant, environment: local
|
344
|
+
gem "one", {:path=>"../one", :require=>nil}
|
345
|
+
gem "two", {:path=>"../two", :require=>nil}
|
346
|
+
"""
|
347
|
+
When I rebuild the Gemfile for "remote" mode
|
348
|
+
Then the file "Gemfile" should have the following content:
|
349
|
+
"""
|
350
|
+
# generated by penchant, environment: remote
|
351
|
+
gem "one", {:git=>"git://github.com/johnbintz/one.git", :require=>nil}
|
352
|
+
gem "two", {:require=>nil}
|
353
|
+
"""
|
354
|
+
|
325
355
|
Scenario: Override defaults for an environment
|
326
356
|
Given I have the file "Gemfile.penchant" with the content:
|
327
357
|
"""
|
data/lib/penchant/gemfile.rb
CHANGED
@@ -197,7 +197,10 @@ module Penchant
|
|
197
197
|
def defaults_for(*args)
|
198
198
|
defaults = args.pop
|
199
199
|
|
200
|
-
args.flatten.each
|
200
|
+
args.flatten.each do |gem|
|
201
|
+
@defaults[gem.to_s] ||= {}
|
202
|
+
@defaults[gem.to_s].merge!(defaults)
|
203
|
+
end
|
201
204
|
end
|
202
205
|
|
203
206
|
protected
|
data/lib/penchant/version.rb
CHANGED
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
|
+
version: 0.2.24
|
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-
|
12
|
+
date: 2012-10-04 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
@@ -199,7 +199,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
199
199
|
version: '0'
|
200
200
|
segments:
|
201
201
|
- 0
|
202
|
-
hash:
|
202
|
+
hash: -3136912616894151920
|
203
203
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
204
204
|
none: false
|
205
205
|
requirements:
|
@@ -208,7 +208,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
208
208
|
version: '0'
|
209
209
|
segments:
|
210
210
|
- 0
|
211
|
-
hash:
|
211
|
+
hash: -3136912616894151920
|
212
212
|
requirements: []
|
213
213
|
rubyforge_project: penchant
|
214
214
|
rubygems_version: 1.8.23
|