bundler_local_development 0.3.0 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -39,7 +39,11 @@ You can specify multiple directories by separating paths with a semicolon, e.g.
39
39
 
40
40
  * If a local copy of the gem is found, it will add the `:path => <path>`
41
41
  option to the `gem` command.
42
- It will also scan the local gem's gemspec and process any runtime dependencies.
42
+ It will scan the local gem's `gemspec` and process any runtime dependencies.
43
+
44
+ It will also load and evaluate the local gem's `Gemfile`.
45
+ The Gemfile will have any `source` or `gemspec` lines stripped, as well as removing the `rake` gem.
46
+ (I found that `rake` was often pegged at different versions.)
43
47
 
44
48
  * `Gemfile.lock` will **NOT** be updated if this gem is activated.
45
49
 
@@ -36,6 +36,14 @@ module Bundler
36
36
  # Check each local gem's gemspec to see if any dependencies need to be made local
37
37
  gemspec_path = File.join(dir, name, "#{name}.gemspec")
38
38
  process_gemspec_dependencies(gemspec_path) if File.exist?(gemspec_path)
39
+ # Evaluate local gem's Gemfile, if present
40
+ gemfile_path = File.join(dir, name, "Gemfile")
41
+ if File.exist?(gemfile_path)
42
+ gemfile = File.read(gemfile_path).
43
+ gsub(/^(source|gemspec).*\s+/, ''). # Strip sources and gemspecs
44
+ gsub(/^\s*gem ['"]rake['"].*/, '') # Strip rake
45
+ eval gemfile
46
+ end
39
47
  return gem_without_development name, :path => path
40
48
  end
41
49
  end
@@ -1,3 +1,3 @@
1
1
  module BundlerLocalDevelopment
2
- VERSION = "0.3.0"
2
+ VERSION = "0.4.0"
3
3
  end
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.3.0
4
+ version: 0.4.0
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-05-11 00:00:00.000000000 Z
12
+ date: 2012-11-10 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -57,7 +57,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
57
57
  version: '0'
58
58
  segments:
59
59
  - 0
60
- hash: 986860397
60
+ hash: 3271112619999596464
61
61
  required_rubygems_version: !ruby/object:Gem::Requirement
62
62
  none: false
63
63
  requirements:
@@ -66,7 +66,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
66
66
  version: '0'
67
67
  segments:
68
68
  - 0
69
- hash: 986860397
69
+ hash: 3271112619999596464
70
70
  requirements: []
71
71
  rubyforge_project:
72
72
  rubygems_version: 1.8.24