bundler_local_development 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +2 -0
- data/lib/bundler/local_development.rb +12 -0
- data/lib/bundler_local_development/version.rb +1 -1
- metadata +16 -5
data/Gemfile
CHANGED
@@ -26,12 +26,24 @@ module Bundler
|
|
26
26
|
gem_dev_dir = ENV['GEM_DEV_DIR'] || "#{`echo $HOME`.strip}/code/gems"
|
27
27
|
path = File.join(gem_dev_dir, name)
|
28
28
|
if File.exist?(path)
|
29
|
+
# Check each local gem's gemspec to see if any dependencies need to be made local
|
30
|
+
gemspec_path = File.join(gem_dev_dir, name, "#{name}.gemspec")
|
31
|
+
process_gemspec_dependencies(gemspec_path, gem_dev_dir) if File.exist?(gemspec_path)
|
29
32
|
return gem_without_development name, :path => path
|
30
33
|
end
|
31
34
|
end
|
32
35
|
gem_without_development(name, *args)
|
33
36
|
end
|
34
37
|
alias :gem :gem_with_development
|
38
|
+
|
39
|
+
private
|
40
|
+
def process_gemspec_dependencies(gemspec_path, gem_dev_dir)
|
41
|
+
spec = Bundler.load_gemspec(gemspec_path)
|
42
|
+
spec.runtime_dependencies.each do |dep|
|
43
|
+
path = File.join(gem_dev_dir, dep.name)
|
44
|
+
gem_without_development(dep.name, :path => path) if File.exist?(path)
|
45
|
+
end
|
46
|
+
end
|
35
47
|
end
|
36
48
|
|
37
49
|
class Definition
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bundler_local_development
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-05-11 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
16
|
-
requirement:
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,7 +21,12 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements:
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ! '>='
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '0'
|
25
30
|
description: Provides a simple way to switch between local and installed gems.
|
26
31
|
email:
|
27
32
|
- nathan.f77@gmail.com
|
@@ -50,15 +55,21 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
50
55
|
- - ! '>='
|
51
56
|
- !ruby/object:Gem::Version
|
52
57
|
version: '0'
|
58
|
+
segments:
|
59
|
+
- 0
|
60
|
+
hash: -577521741
|
53
61
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
54
62
|
none: false
|
55
63
|
requirements:
|
56
64
|
- - ! '>='
|
57
65
|
- !ruby/object:Gem::Version
|
58
66
|
version: '0'
|
67
|
+
segments:
|
68
|
+
- 0
|
69
|
+
hash: -577521741
|
59
70
|
requirements: []
|
60
71
|
rubyforge_project:
|
61
|
-
rubygems_version: 1.8.
|
72
|
+
rubygems_version: 1.8.24
|
62
73
|
signing_key:
|
63
74
|
specification_version: 3
|
64
75
|
summary: Switch to a set of local gems with a single command
|