rubygems-bundler 1.2.0.rc3 → 1.2.0.rc4
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/rubygems-bundler/noexec.rb +6 -43
- data/lib/rubygems-bundler/version.rb +1 -1
- data/rubygems-bundler.gemspec +1 -0
- data/test/dtf/bundler_comment_test.sh +6 -6
- metadata +77 -37
- checksums.yaml +0 -7
@@ -22,43 +22,7 @@ else
|
|
22
22
|
begin
|
23
23
|
puts "Noexec - starting check" if RubygemsBundler::DEBUG
|
24
24
|
require "rubygems"
|
25
|
-
require "bundler"
|
26
|
-
|
27
|
-
module Bundler
|
28
|
-
class RubygemsIntegration
|
29
|
-
class Legacy
|
30
|
-
def plain_specs
|
31
|
-
Gem.source_index.gems
|
32
|
-
end
|
33
|
-
def plain_specs=(specs)
|
34
|
-
Gem.source_index.instance_variable_set(:@gems, specs)
|
35
|
-
end
|
36
|
-
end
|
37
|
-
class Modern
|
38
|
-
def plain_specs
|
39
|
-
Gem::Specification._all
|
40
|
-
end
|
41
|
-
def plain_specs=(specs)
|
42
|
-
Gem::Specification.all = specs
|
43
|
-
end
|
44
|
-
end
|
45
|
-
class Future
|
46
|
-
def plain_specs
|
47
|
-
Gem::Specification._all
|
48
|
-
end
|
49
|
-
def plain_specs=(specs)
|
50
|
-
Gem::Specification.all = specs
|
51
|
-
end
|
52
|
-
end
|
53
|
-
end
|
54
|
-
class << self
|
55
|
-
def reset!(rubygems_specs)
|
56
|
-
@load = nil
|
57
|
-
ENV.replace(ORIGINAL_ENV)
|
58
|
-
Bundler.rubygems.plain_specs = rubygems_specs
|
59
|
-
end
|
60
|
-
end
|
61
|
-
end
|
25
|
+
require "bundler-unload"
|
62
26
|
|
63
27
|
module Noexec
|
64
28
|
RubygemsBundler::CURRENT = Dir.pwd
|
@@ -70,7 +34,6 @@ else
|
|
70
34
|
end
|
71
35
|
|
72
36
|
def candidate?(gemfile, bin)
|
73
|
-
rubygems_specs = Bundler.rubygems.plain_specs
|
74
37
|
config_file = File.expand_path('../.noexec.yaml', gemfile)
|
75
38
|
log "Considering #{config_file.inspect}"
|
76
39
|
if File.exist?(config_file)
|
@@ -87,16 +50,16 @@ else
|
|
87
50
|
log "Config based matching didn't find it, resorting to Gemfile lookup"
|
88
51
|
end
|
89
52
|
ENV['BUNDLE_GEMFILE'] = gemfile
|
90
|
-
Bundler.
|
91
|
-
|
92
|
-
|
53
|
+
Bundler.with_bundle do |bundler|
|
54
|
+
bundler.specs.each do |spec|
|
55
|
+
next if spec.name == 'bundler'
|
56
|
+
return true if %w(ruby irb).include?(bin) || spec.executables.include?(bin)
|
57
|
+
end
|
93
58
|
end
|
94
59
|
false
|
95
60
|
rescue Bundler::BundlerError, Bundler::GemfileError => e
|
96
61
|
warn "Ignoring candidate #{gemfile}:\n#{e}" if RubygemsBundler::DEBUG
|
97
62
|
false
|
98
|
-
ensure
|
99
|
-
Bundler.reset!(rubygems_specs)
|
100
63
|
end
|
101
64
|
|
102
65
|
def setup
|
data/rubygems-bundler.gemspec
CHANGED
@@ -16,6 +16,7 @@ Gem::Specification.new do |s|
|
|
16
16
|
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
17
17
|
s.executables = %w( rubygems-bundler-uninstaller )
|
18
18
|
|
19
|
+
s.add_dependency "bundler-unload", ">=1.0.1"
|
19
20
|
s.add_development_dependency "tf"
|
20
21
|
#s.add_development_dependency "smf-gem"
|
21
22
|
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
: init
|
2
2
|
export BUNDLE_GEMFILE=${TMPDIR:-/tmp}/rubygems-bunelr_bundler-test/Gemfile
|
3
3
|
mkdir -p ${BUNDLE_GEMFILE%/*} # status=0
|
4
|
-
printf "source
|
4
|
+
printf "source 'https://rubygems.org'\n\ngem 'haml'\ngem 'jruby-openssl', :require => 'openssl', :platforms => :jruby\n" > ${BUNDLE_GEMFILE}
|
5
5
|
|
6
6
|
yes | sm gem install # match=/installed/
|
7
7
|
gem regenerate_binstubs # status=0
|
@@ -10,10 +10,10 @@ gem install bundler # status=0
|
|
10
10
|
bundle install
|
11
11
|
|
12
12
|
: exclusion
|
13
|
-
head -n 1 $(which
|
14
|
-
|
15
|
-
printf "exclude:\n -
|
16
|
-
|
13
|
+
head -n 1 $(which haml) # match=/env ruby_noexec_wrapper/
|
14
|
+
NOEXEC_DEBUG=1 haml --version # match=/Using .*/rubygems-bunelr_bundler-test/Gemfile/; match!=/Binary excluded by config/
|
15
|
+
printf "exclude:\n - haml\n" > ${BUNDLE_GEMFILE%/*}/.noexec.yaml
|
16
|
+
NOEXEC_DEBUG=1 haml --version # match!=/Using .*/rubygems-bunelr_bundler-test/Gemfile/; match=/Binary excluded by config/
|
17
17
|
|
18
18
|
: generated/removed
|
19
19
|
head -n 1 $(which haml) # match=/env ruby_noexec_wrapper/
|
@@ -25,5 +25,5 @@ rubygems-bundler-uninstaller # match=/haml/
|
|
25
25
|
head -n 1 $(which haml) # match!=/env ruby_noexec_wrapper/
|
26
26
|
which ruby_noexec_wrapper # status=1
|
27
27
|
|
28
|
-
gem uninstall -
|
28
|
+
gem uninstall -ax haml # match=/Successfully uninstalled/
|
29
29
|
rm -rf ${BUNDLE_GEMFILE%/*} # status=0
|
metadata
CHANGED
@@ -1,40 +1,67 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubygems-bundler
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: -1030114762
|
5
|
+
prerelease: 6
|
6
|
+
segments:
|
7
|
+
- 1
|
8
|
+
- 2
|
9
|
+
- 0
|
10
|
+
- rc
|
11
|
+
- 4
|
12
|
+
version: 1.2.0.rc4
|
5
13
|
platform: ruby
|
6
|
-
authors:
|
14
|
+
authors:
|
7
15
|
- Josh Hull
|
8
16
|
- Michal Papis
|
9
17
|
autorequire:
|
10
18
|
bindir: bin
|
11
19
|
cert_chain: []
|
12
|
-
|
13
|
-
|
14
|
-
|
20
|
+
|
21
|
+
date: 2013-05-31 00:00:00 +02:00
|
22
|
+
default_executable:
|
23
|
+
dependencies:
|
24
|
+
- !ruby/object:Gem::Dependency
|
25
|
+
name: bundler-unload
|
26
|
+
prerelease: false
|
27
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
28
|
+
none: false
|
29
|
+
requirements:
|
30
|
+
- - ">="
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
hash: 21
|
33
|
+
segments:
|
34
|
+
- 1
|
35
|
+
- 0
|
36
|
+
- 1
|
37
|
+
version: 1.0.1
|
38
|
+
type: :runtime
|
39
|
+
version_requirements: *id001
|
40
|
+
- !ruby/object:Gem::Dependency
|
15
41
|
name: tf
|
16
|
-
requirement: !ruby/object:Gem::Requirement
|
17
|
-
requirements:
|
18
|
-
- - '>='
|
19
|
-
- !ruby/object:Gem::Version
|
20
|
-
version: '0'
|
21
|
-
type: :development
|
22
42
|
prerelease: false
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
43
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
44
|
+
none: false
|
45
|
+
requirements:
|
46
|
+
- - ">="
|
47
|
+
- !ruby/object:Gem::Version
|
48
|
+
hash: 3
|
49
|
+
segments:
|
50
|
+
- 0
|
51
|
+
version: "0"
|
52
|
+
type: :development
|
53
|
+
version_requirements: *id002
|
54
|
+
description: Stop using bundle exec. Integrate Rubygems and Bundler. Make rubygems generate bundler aware executable wrappers.
|
55
|
+
email:
|
31
56
|
- joshbuddy@gmail.com
|
32
57
|
- mpapis@gmail.com
|
33
|
-
executables:
|
58
|
+
executables:
|
34
59
|
- rubygems-bundler-uninstaller
|
35
60
|
extensions: []
|
61
|
+
|
36
62
|
extra_rdoc_files: []
|
37
|
-
|
63
|
+
|
64
|
+
files:
|
38
65
|
- .gem.config
|
39
66
|
- .gitignore
|
40
67
|
- .noexec.yaml
|
@@ -57,30 +84,43 @@ files:
|
|
57
84
|
- test/dtf/bundler_comment_test.sh
|
58
85
|
- test/dtf/rails_and_gemfile_comment_test.sh
|
59
86
|
- test/dtf/rubygems_comment_test.sh
|
87
|
+
has_rdoc: true
|
60
88
|
homepage: http://mpapis.github.com/rubygems-bundler
|
61
89
|
licenses: []
|
62
|
-
|
90
|
+
|
63
91
|
post_install_message:
|
64
92
|
rdoc_options: []
|
65
|
-
|
93
|
+
|
94
|
+
require_paths:
|
66
95
|
- lib
|
67
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
96
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
97
|
+
none: false
|
98
|
+
requirements:
|
99
|
+
- - ">="
|
100
|
+
- !ruby/object:Gem::Version
|
101
|
+
hash: 3
|
102
|
+
segments:
|
103
|
+
- 0
|
104
|
+
version: "0"
|
105
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
106
|
+
none: false
|
107
|
+
requirements:
|
108
|
+
- - ">"
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
hash: 25
|
111
|
+
segments:
|
112
|
+
- 1
|
113
|
+
- 3
|
114
|
+
- 1
|
76
115
|
version: 1.3.1
|
77
116
|
requirements: []
|
117
|
+
|
78
118
|
rubyforge_project:
|
79
|
-
rubygems_version:
|
119
|
+
rubygems_version: 1.6.2
|
80
120
|
signing_key:
|
81
|
-
specification_version:
|
121
|
+
specification_version: 3
|
82
122
|
summary: Stop using bundle exec
|
83
|
-
test_files:
|
123
|
+
test_files:
|
84
124
|
- test/dtf/bundler_comment_test.sh
|
85
125
|
- test/dtf/rails_and_gemfile_comment_test.sh
|
86
126
|
- test/dtf/rubygems_comment_test.sh
|
checksums.yaml
DELETED
@@ -1,7 +0,0 @@
|
|
1
|
-
---
|
2
|
-
SHA1:
|
3
|
-
metadata.gz: b75c3941a6d616305864444af05a48b7525c6cfc
|
4
|
-
data.tar.gz: 2bcc31137ba235cf7538acd664fe7f65db6d2d3c
|
5
|
-
SHA512:
|
6
|
-
metadata.gz: 8718c7abf951c5acd383043dc5244d28e4602d1cd8ad7dcc82ef18b0280b3223f557442794ab0c5bcc487ff74bbc6e48b6efab0392390086877cfb3b870dee49
|
7
|
-
data.tar.gz: 4ffe979944b4c3259fa6e4fce245b3383709b1fd838a1d2d5517f9a665973adeb058f8f6ef6524e0f065da9c4f288fb9dda5893ba20a101e11879625601fa2c9
|