rubygems-bundler 1.2.0 → 1.2.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,3 @@
1
1
  module RubygemsBundler
2
- VERSION = "1.2.0"
2
+ VERSION = "1.2.1"
3
3
  end
@@ -1,14 +1,22 @@
1
- rubygems_bundler_spec =
2
- if Gem::Specification.respond_to?(:find_by_name)
3
- Gem::Specification.find_by_name("rubygems-bundler")
4
- else
5
- Gem.source_index.find_name("rubygems-bundler").last
1
+ module RubygemsBundler
2
+ def self.spec_version
3
+ rubygems_bundler_spec =
4
+ if Gem::Specification.respond_to?(:find_by_name)
5
+ Gem::Specification.find_by_name("rubygems-bundler")
6
+ else
7
+ Gem.source_index.find_name("rubygems-bundler").last
8
+ end
9
+ rubygems_bundler_spec ? rubygems_bundler_spec.version.to_s : nil
10
+ rescue Gem::LoadError
11
+ nil
6
12
  end
13
+ end
7
14
 
8
- called_version = __FILE__.sub(/^.*\/rubygems-bundler-([^\/]+)\/.*$/,'\1')
15
+ called_path, called_version = __FILE__.match(/^(.*\/rubygems-bundler-([^\/]+)\/lib).*$/)[1..2]
9
16
 
10
- # continue only if loaded and called versions all the same, and not shared gems disabled in bundler
11
- if rubygems_bundler_spec and rubygems_bundler_spec.version.to_s == called_version and
17
+ # continue only if loaded ($: or gem) and called versions is the same and not shared gems disabled in bundler
18
+ if
19
+ ( $:.include?(called_path) || RubygemsBundler.spec_version == called_version ) and
12
20
  ( !defined?(Bundler) || ( defined?(Bundler) && Bundler::SharedHelpers.in_bundle? && !Bundler.settings[:disable_shared_gems]) )
13
21
 
14
22
  require 'rubygems/version'
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubygems-bundler
3
3
  version: !ruby/object:Gem::Version
4
- hash: 31
4
+ hash: 29
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 2
9
- - 0
10
- version: 1.2.0
9
+ - 1
10
+ version: 1.2.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Josh Hull
@@ -16,8 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2013-06-02 00:00:00 +02:00
20
- default_executable:
19
+ date: 2013-07-05 00:00:00 Z
21
20
  dependencies:
22
21
  - !ruby/object:Gem::Dependency
23
22
  name: bundler-unload
@@ -82,7 +81,6 @@ files:
82
81
  - test/dtf/bundler_comment_test.sh
83
82
  - test/dtf/rails_and_gemfile_comment_test.sh
84
83
  - test/dtf/rubygems_comment_test.sh
85
- has_rdoc: true
86
84
  homepage: http://mpapis.github.com/rubygems-bundler
87
85
  licenses: []
88
86
 
@@ -112,7 +110,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
112
110
  requirements: []
113
111
 
114
112
  rubyforge_project:
115
- rubygems_version: 1.6.2
113
+ rubygems_version: 1.8.24
116
114
  signing_key:
117
115
  specification_version: 3
118
116
  summary: Stop using bundle exec