rubygems-bundler 0.9.2 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.noexec.yml +2 -0
- data/.travis.yml +26 -0
- data/CHANGELOG.md +9 -0
- data/README.md +44 -75
- data/bin/rubygems-bundler-uninstaller +5 -0
- data/lib/rubygems-bundler/fix_wrapper.rb +13 -5
- data/lib/rubygems-bundler/noexec.rb +2 -1
- data/lib/rubygems-bundler/regenerate_binstubs_command.rb +15 -1
- data/lib/rubygems-bundler/rubygems_bundler_installer.rb +6 -1
- data/lib/rubygems-bundler/uninstaller.rb +10 -0
- data/lib/rubygems-bundler/version.rb +1 -1
- data/lib/rubygems-bundler/wrapper.rb +38 -0
- data/lib/rubygems_plugin.rb +40 -7
- data/rubygems-bundler.gemspec +2 -2
- data/test/dtf/bundler_comment_test.sh +21 -0
- data/test/dtf/rails_and_gemfile_comment_test.sh +21 -0
- data/test/dtf/rubygems_comment_test.sh +16 -0
- metadata +40 -19
- data/bin/noexec +0 -3
- data/bin/ruby_bundler_wrapper +0 -23
- data/ext/wrapper_installer/extconf.rb +0 -22
data/.noexec.yml
ADDED
data/.travis.yml
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
language: ruby
|
2
|
+
rvm:
|
3
|
+
- 1.8.7
|
4
|
+
- 1.9.2
|
5
|
+
- 1.9.3
|
6
|
+
- rbx-18mode
|
7
|
+
- rbx-19mode
|
8
|
+
before_install:
|
9
|
+
- 'rm -rf $rvm_path/gems/*/{bin,gems}/rubygems-bundler-* $rvm_path/gems/*/bin/ruby_*_wrapper'
|
10
|
+
- hash -r
|
11
|
+
install: gem install dtf
|
12
|
+
before_script:
|
13
|
+
- unset BUNDLE_GEMFILE
|
14
|
+
script: dtf --text test/dtf/*
|
15
|
+
notifications:
|
16
|
+
irc:
|
17
|
+
channels:
|
18
|
+
- "irc.freenode.org#rubygems-bundler"
|
19
|
+
email:
|
20
|
+
recipients:
|
21
|
+
- mpapis@gmail.com
|
22
|
+
on_failure: change
|
23
|
+
matrix:
|
24
|
+
allow_failures:
|
25
|
+
- rvm: rbx-18mode
|
26
|
+
- rvm: rbx-19mode
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,14 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 1.0.0
|
4
|
+
date: 2012-05-09
|
5
|
+
|
6
|
+
- removed the need to modify ~/.gemrc
|
7
|
+
- change extensions code to an automatic installer
|
8
|
+
- added uninstaller
|
9
|
+
- removed old parts - there is only one way
|
10
|
+
- fix bug with rubygems < 1.5
|
11
|
+
|
3
12
|
## 0.9.2
|
4
13
|
date: 2012-05-05
|
5
14
|
|
data/README.md
CHANGED
@@ -1,15 +1,16 @@
|
|
1
|
+
[![Build Status](https://secure.travis-ci.org/mpapis/rubygems-bundler.png?branch=1.0.0)](http://travis-ci.org/mpapis/rubygems-bundler)
|
2
|
+
[![Dependency Status](https://gemnasium.com/mpapis/rubygems-bundler.png)](https://gemnasium.com/mpapis/rubygems-bundler)
|
3
|
+
|
1
4
|
# rubygems-bundler && Noexec
|
2
5
|
|
3
|
-
Let's stop using bundle exec
|
6
|
+
Let's stop using `bundle exec`, kthx.
|
7
|
+
|
8
|
+
Introduction of the 1.0.0 release: http://niczsoft.com/2012/05/rubygems-bundler-integration-gem-1-0-0/
|
4
9
|
|
5
10
|
## Installation
|
6
11
|
|
7
12
|
gem install rubygems-bundler
|
8
13
|
|
9
|
-
Add / Change a line in ~/.gemrc to:
|
10
|
-
|
11
|
-
custom_shebang: $env ruby_noexec_wrapper
|
12
|
-
|
13
14
|
Next run (once):
|
14
15
|
|
15
16
|
gem regenerate_binstubs
|
@@ -18,34 +19,55 @@ And you're done!
|
|
18
19
|
|
19
20
|
## Configuration
|
20
21
|
|
22
|
+
### ~/.gemrc
|
23
|
+
|
24
|
+
It's no more required to modify `~/.gemrc` anymore,
|
25
|
+
just remove the old entry to be sure it works as expected.
|
26
|
+
In case you need to use your own `custom_shebang`
|
27
|
+
you can define it in `~/.gemrc` to override the default:
|
28
|
+
|
29
|
+
custom_shebang: $env <your_custom_shebang_program>
|
30
|
+
|
31
|
+
### ./.noexec.yaml
|
32
|
+
|
21
33
|
Though you can let noexec do it's own thing and rely on looking up your binary via your Gemfile,
|
22
34
|
you can also specify which binaries you want included or excluded.
|
23
35
|
Create a .noexec.yaml file along side any Gemfiles you want to use.
|
24
36
|
Then, to enable (or disable) the usage of your particular binary into your bundle,
|
25
37
|
add an include or exclude section. For example:
|
26
38
|
|
27
|
-
|
39
|
+
```yml
|
40
|
+
exclude: [rake]
|
41
|
+
```
|
42
|
+
Or,
|
28
43
|
|
29
|
-
|
44
|
+
```yml
|
45
|
+
include: [haml]
|
46
|
+
```
|
30
47
|
|
31
|
-
|
48
|
+
### NOEXEC=skip
|
32
49
|
|
33
|
-
|
50
|
+
In case you need explicitly skip loading Bundler.setup, prefix your command with `NOEXEC=0`:
|
51
|
+
|
52
|
+
NOEXEC=0 rails new app
|
53
|
+
NOEXEC=skip gist
|
54
|
+
|
55
|
+
both `0` and `skip` will work, choose the one that sounds better for you.
|
34
56
|
|
35
57
|
## Problems?
|
36
58
|
|
37
59
|
Things not going the way you'd like? Try your command again with
|
38
|
-
NOEXEC_DEBUG=1 set and create a ticket. I'll fix it right away!
|
60
|
+
`NOEXEC_DEBUG=1` set and create a ticket. I'll fix it right away!
|
39
61
|
|
40
62
|
### IRC support:
|
41
63
|
|
42
64
|
[#rubygems-bundler on irc.freenode.net](http://webchat.freenode.net/?channels=#rubygems-bundler)
|
43
65
|
|
44
66
|
|
45
|
-
## How does this work
|
67
|
+
## How does this work (ruby_noexec_wrapper)
|
46
68
|
|
47
|
-
It
|
48
|
-
Then, when you run
|
69
|
+
It modifies gem wrappers shebang to load `ruby_noexec_wrapper`.
|
70
|
+
Then, when you run gem binaries, it takes a look at your working directory,
|
49
71
|
and every directory above it until it can find a `Gemfile`.
|
50
72
|
If the executable you're running is present in your Gemfile,
|
51
73
|
it switches to using that `Gemfile` instead (via `Bundle.setup`).
|
@@ -53,78 +75,25 @@ it switches to using that `Gemfile` instead (via `Bundle.setup`).
|
|
53
75
|
Rubygems and Bundler integration, makes executable wrappers
|
54
76
|
generated by rubygems aware of bundler.
|
55
77
|
|
56
|
-
|
57
|
-
|
58
|
-
This gem is intended to fill in the integration gap between
|
59
|
-
Bundler and Rubygems, it also backports shebang customization
|
60
|
-
from rubygems 1.9 to older versions - down to 1.3.7.
|
61
|
-
|
62
|
-
With this gem rubygems generated wrappers will allow to
|
63
|
-
use bundler when asked for.
|
64
|
-
|
65
|
-
Using this gem solves problem of calling `bundle exec ...`
|
66
|
-
with your every command.
|
67
|
-
|
68
|
-
Please note that this gem can make your gem executables
|
69
|
-
load in versions specified in Gemfile!
|
70
|
-
|
71
|
-
The problem with Gemfile is that you can have few of them,
|
72
|
-
so expect that gem version for executable will be taken from
|
73
|
-
`~/Gemfile` when your project is in `~/projects/my_project`
|
74
|
-
and does not contain `Gemfile`
|
75
|
-
|
76
|
-
Last note is that bundler handling can be used only when bundler is
|
77
|
-
installed, but you will be warned when it is
|
78
|
-
|
79
|
-
# Uninstallation
|
78
|
+
rubygems-bundler was merged with [noexec gem](https://github.com/joshbuddy/noexec) in version **0.9.0**.
|
80
79
|
|
81
|
-
|
80
|
+
## Uninstallation
|
82
81
|
|
83
|
-
|
84
|
-
|
85
|
-
and run `gem regenerate_binstubs`
|
82
|
+
rubygems-bundler-uninstaller
|
83
|
+
gem uninstall rubygems-bundler
|
86
84
|
|
87
85
|
this will set all gems to `/usr/bin/env ruby` which is one of the safest choices (especially when using rvm).
|
88
86
|
|
89
|
-
|
90
|
-
|
91
|
-
Add / Change a line in ~/.gemrc to:
|
92
|
-
|
93
|
-
custom_shebang: $env ruby_bundler_wrapper
|
94
|
-
|
95
|
-
Next run (once):
|
96
|
-
|
97
|
-
gem regenerate_binstubs
|
98
|
-
|
99
|
-
Wrappers generated by this gem will replace original rubygems wrapper,
|
100
|
-
but it will not change wrapper behavior unless explicitly asked for.
|
101
|
-
|
102
|
-
To allow using bundler when available, but fallback to rubygems when not:
|
103
|
-
|
104
|
-
export USE_BUNDLER=try
|
105
|
-
|
106
|
-
To force usage of bundler:
|
107
|
-
|
108
|
-
export USE_BUNDLER=force
|
109
|
-
|
110
|
-
Some gems should not be called with bundler support,
|
111
|
-
to blacklist them use the following line:
|
112
|
-
|
113
|
-
BUNDLER_BLACKLIST="cheat heroku"
|
114
|
-
|
115
|
-
To make your choices persistent put them into `~/.bashrc` or `~/.rvmrc`.
|
116
|
-
|
117
|
-
|
118
|
-
# Authors
|
87
|
+
## Authors
|
119
88
|
|
120
89
|
- Joshua Hull <joshbuddy@gmail.com>
|
121
90
|
- Michal Papis <mpapis@gmail.com>
|
122
91
|
|
123
|
-
|
92
|
+
## Thanks
|
124
93
|
|
125
94
|
- Carl Lerche : help with the noexec code
|
126
|
-
- Yehuda Katz : the initial patch code
|
127
|
-
- Wayne E. Seguin : support in writing good code
|
128
95
|
- Evan Phoenix : support on rubygems internalls
|
129
|
-
-
|
96
|
+
- Yehuda Katz : the initial patch code, helping on making it even more usable
|
130
97
|
- Loren Segal : shebang customization idea and explanations
|
98
|
+
- Wayne E. Seguin : support in writing good code
|
99
|
+
- André Arko : clarifications how rubygems/bundler works
|
@@ -1,5 +1,13 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
1
|
+
msg = "\n\nOlder rubygems-bundler found, please uninstall it with:\n\n "
|
2
|
+
|
3
|
+
error_source = caller.find{|s| s=~/\/rubygems-bundler-/ }.split(/:/).first
|
4
|
+
gem_source = File.expand_path("../../../..", error_source)
|
5
|
+
gem_version = error_source.sub(/^.*\/rubygems-bundler-([^\/]+)\/.*$/,'\1')
|
6
|
+
|
7
|
+
if ENV['GEM_HOME'] or ENV['GEM_PATH']
|
8
|
+
msg << "GEM_HOME=\"#{gem_source}\" " unless ENV['GEM_HOME'] == gem_source
|
9
|
+
end
|
10
|
+
|
11
|
+
msg << "gem uninstall -ax rubygems-bundler -v #{gem_version}\n\n"
|
12
|
+
|
13
|
+
raise msg
|
@@ -49,8 +49,9 @@ begin
|
|
49
49
|
|
50
50
|
def setup
|
51
51
|
log "Noexec"
|
52
|
-
return if File.basename($0)
|
52
|
+
return if %w(bundle rubygems-bundler-uninstaller).include?(File.basename($0))
|
53
53
|
return if ENV['BUNDLE_GEMFILE']
|
54
|
+
return if %w(0 skip).include?( ENV['NOEXEC'] )
|
54
55
|
gemfile = File.join(CURRENT, "Gemfile")
|
55
56
|
while true
|
56
57
|
if File.exist?(gemfile)
|
@@ -1,4 +1,7 @@
|
|
1
|
+
require 'rubygems/command_manager'
|
1
2
|
require 'rubygems/installer'
|
3
|
+
require 'rubygems/version'
|
4
|
+
require 'rubygems-bundler/wrapper'
|
2
5
|
|
3
6
|
class RegenerateBinstubsCommand < Gem::Command
|
4
7
|
def initialize
|
@@ -26,6 +29,17 @@ class RegenerateBinstubsCommand < Gem::Command
|
|
26
29
|
end
|
27
30
|
|
28
31
|
def execute
|
32
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('2.0.0') then
|
33
|
+
# https://github.com/rubygems/rubygems/issues/326
|
34
|
+
puts "try also: gem pristine --binstubs"
|
35
|
+
end
|
36
|
+
Gem.configuration[:custom_shebang] ||= '$env ruby_noexec_wrapper'
|
37
|
+
RubygemsBundler::Wrapper.install
|
38
|
+
execute_no_wrapper
|
39
|
+
end
|
40
|
+
|
41
|
+
def execute_no_wrapper
|
42
|
+
require 'rubygems-bundler/rubygems_bundler_installer'
|
29
43
|
name = get_one_optional_argument || ''
|
30
44
|
specs = installed_gems.select{|spec| spec.name =~ /^#{name}/i }
|
31
45
|
specs.each do |spec|
|
@@ -53,4 +67,4 @@ class RegenerateBinstubsCommand < Gem::Command
|
|
53
67
|
Gem.source_index.map{|name,spec| spec}
|
54
68
|
end
|
55
69
|
end
|
56
|
-
end
|
70
|
+
end
|
@@ -23,7 +23,8 @@ module RubyGemsBundlerInstaller
|
|
23
23
|
|
24
24
|
|
25
25
|
def self.shebang(inst, bin_file_name)
|
26
|
-
|
26
|
+
# options were defined first in 1.5, we want to support back to 1.3.7
|
27
|
+
ruby_name = Gem::ConfigMap[:ruby_install_name] if inst.respond_to?('options') ? inst.options[:env_shebang] :inst.instance_variable_get(:@env_shebang)
|
27
28
|
bindir = inst.bin_dir ? inst.bin_dir : Gem.bindir(inst.gem_home)
|
28
29
|
path = File.join bindir, inst.formatted_program_filename(bin_file_name)
|
29
30
|
first_line = File.open(path, "rb") {|file| file.gets}
|
@@ -88,3 +89,7 @@ TEXT
|
|
88
89
|
end
|
89
90
|
|
90
91
|
end
|
92
|
+
|
93
|
+
Gem.post_install do |inst|
|
94
|
+
RubyGemsBundlerInstaller.bundler_generate_bin(inst)
|
95
|
+
end
|
@@ -0,0 +1,10 @@
|
|
1
|
+
require 'rubygems-bundler/wrapper'
|
2
|
+
require 'rubygems-bundler/regenerate_binstubs_command'
|
3
|
+
|
4
|
+
module RubygemsBundler
|
5
|
+
def self.uninstall
|
6
|
+
Gem.configuration[:custom_shebang] = '$env ruby'
|
7
|
+
RegenerateBinstubsCommand.new.execute_no_wrapper
|
8
|
+
Wrapper.uninstall
|
9
|
+
end
|
10
|
+
end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
# install / uninstall wrapper
|
2
|
+
require 'fileutils'
|
3
|
+
require 'rubygems'
|
4
|
+
|
5
|
+
module RubygemsBundler
|
6
|
+
module Wrapper
|
7
|
+
def self.wrapper_name
|
8
|
+
'ruby_noexec_wrapper'
|
9
|
+
end
|
10
|
+
def self.bindir
|
11
|
+
Gem.respond_to?(:bindir,true) ? Gem.send(:bindir) : File.join(Gem.dir, 'bin')
|
12
|
+
end
|
13
|
+
def self.destination
|
14
|
+
File.expand_path( wrapper_name, bindir )
|
15
|
+
end
|
16
|
+
def self.install
|
17
|
+
rubygems_bundler_spec =
|
18
|
+
if Gem::Specification.respond_to?(:find_by_name)
|
19
|
+
Gem::Specification.find_by_name("rubygems-bundler")
|
20
|
+
else
|
21
|
+
Gem.source_index.find_name("rubygems-bundler").last
|
22
|
+
end
|
23
|
+
|
24
|
+
if rubygems_bundler_spec
|
25
|
+
wrapper_path = File.expand_path( "bin/#{wrapper_name}", rubygems_bundler_spec.full_gem_path )
|
26
|
+
end
|
27
|
+
|
28
|
+
if rubygems_bundler_spec && File.exist?(wrapper_path) && !File.exist?(destination)
|
29
|
+
FileUtils.mkdir_p(bindir)
|
30
|
+
FileUtils.cp(wrapper_path, destination)
|
31
|
+
File.chmod(0775, destination)
|
32
|
+
end
|
33
|
+
end
|
34
|
+
def self.uninstall
|
35
|
+
FileUtils.rm_f(destination) if File.exist?(destination)
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
data/lib/rubygems_plugin.rb
CHANGED
@@ -1,9 +1,42 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
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
|
6
|
+
end
|
4
7
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
+
called_version = __FILE__.sub(/^.*\/rubygems-bundler-([^\/]+)\/.*$/,'\1')
|
9
|
+
|
10
|
+
# continue only if loaded and called versions all the same
|
11
|
+
if rubygems_bundler_spec and rubygems_bundler_spec.version.to_s == called_version
|
12
|
+
require 'rubygems/version'
|
13
|
+
require 'rubygems-bundler/wrapper'
|
14
|
+
|
15
|
+
# Set the custom_shebang if user did not set one
|
16
|
+
Gem.pre_install do |inst|
|
17
|
+
Gem.configuration[:custom_shebang] ||= '$env ruby_noexec_wrapper'
|
18
|
+
RubygemsBundler::Wrapper.install
|
19
|
+
end
|
20
|
+
|
21
|
+
if Gem::Version.new(Gem::VERSION) < Gem::Version.new('2.0') then
|
22
|
+
# Add custom_shebang support to rubygems
|
23
|
+
require 'rubygems-bundler/rubygems_bundler_installer'
|
24
|
+
end
|
25
|
+
|
26
|
+
require 'rubygems-bundler/regenerate_binstubs_command'
|
27
|
+
Gem::CommandManager.instance.register_command :regenerate_binstubs
|
28
|
+
elsif ENV.key?('NOEXEC_DEBUG')
|
29
|
+
msg = "Older rubygems-bundler found, loaded: #{rubygems_bundler_spec.version}, called: #{called_version}, you can uninstall it with:\n\n "
|
8
30
|
|
9
|
-
|
31
|
+
error_source = __FILE__
|
32
|
+
gem_source = File.expand_path("../../../..", error_source)
|
33
|
+
gem_version = error_source.sub(/^.*\/rubygems-bundler-([^\/]+)\/.*$/,'\1')
|
34
|
+
|
35
|
+
if ENV['GEM_HOME'] or ENV['GEM_PATH']
|
36
|
+
msg << "GEM_HOME=\"#{gem_source}\" " unless ENV['GEM_HOME'] == gem_source
|
37
|
+
end
|
38
|
+
|
39
|
+
msg << "gem uninstall -ax rubygems-bundler -v #{gem_version}\n\n"
|
40
|
+
|
41
|
+
puts msg
|
42
|
+
end
|
data/rubygems-bundler.gemspec
CHANGED
@@ -14,9 +14,9 @@ Gem::Specification.new do |s|
|
|
14
14
|
|
15
15
|
s.files = `git ls-files`.split("\n")
|
16
16
|
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
17
|
-
s.executables =
|
18
|
-
s.extensions = ["ext/wrapper_installer/extconf.rb"]
|
17
|
+
s.executables = %w( rubygems-bundler-uninstaller )
|
19
18
|
|
19
|
+
s.add_development_dependency "dtf"
|
20
20
|
# Do we have to depend on those two ? Can we have two simple tasks doing the same ?
|
21
21
|
s.add_development_dependency "rake"
|
22
22
|
s.add_development_dependency "bundler"
|
@@ -0,0 +1,21 @@
|
|
1
|
+
: init
|
2
|
+
export BUNDLE_GEMFILE=${TMPDIR:-/tmp}/Gemfile
|
3
|
+
printf "source :rubygems\n\ngem 'haml'\n" > ${BUNDLE_GEMFILE}
|
4
|
+
|
5
|
+
rake build
|
6
|
+
rake install # match=/installed/
|
7
|
+
gem install bundler # status=0
|
8
|
+
|
9
|
+
bundle install
|
10
|
+
|
11
|
+
head -n 1 $(which haml) # match=/env ruby_noexec_wrapper/
|
12
|
+
which ruby_noexec_wrapper # status=0
|
13
|
+
|
14
|
+
gem list # match=/haml/
|
15
|
+
rubygems-bundler-uninstaller # match=/haml/
|
16
|
+
|
17
|
+
head -n 1 $(which haml) # match!=/env ruby_noexec_wrapper/
|
18
|
+
which ruby_noexec_wrapper # status=1
|
19
|
+
|
20
|
+
gem uninstall -x haml # match=/Successfully uninstalled/
|
21
|
+
rm -f ${BUNDLE_GEMFILE}
|
@@ -0,0 +1,21 @@
|
|
1
|
+
: init
|
2
|
+
typeset test_dir="${TMPDIR:-/tmp}/fdkngfk"
|
3
|
+
export GEM_HOME="${test_dir}/fake_gem_home"
|
4
|
+
export PATH="${test_dir}/fake_gem_home/bin:$PATH"
|
5
|
+
|
6
|
+
mkdir -p "${GEM_HOME}"
|
7
|
+
printf "source :rubygems\n\ngem 'rails'\n" > "${test_dir}/Gemfile"
|
8
|
+
|
9
|
+
rake build
|
10
|
+
rake install # match=/installed/
|
11
|
+
gem install bundler # status=0
|
12
|
+
|
13
|
+
: test
|
14
|
+
builtin cd "${test_dir}"
|
15
|
+
bundle install # match=/Installing rails/
|
16
|
+
NOEXEC=0 rails new app1
|
17
|
+
[[ -f app1/Gemfile ]] # status=0
|
18
|
+
[[ -f app1/Gemfile.lock ]] # status=0
|
19
|
+
|
20
|
+
: cleanup
|
21
|
+
rm -rf "${test_dir}"
|
@@ -0,0 +1,16 @@
|
|
1
|
+
: init
|
2
|
+
rake build
|
3
|
+
rake install # match=/installed/
|
4
|
+
|
5
|
+
gem install haml # match=/1 gem installed/
|
6
|
+
|
7
|
+
head -n 1 $(which haml) # match=/env ruby_noexec_wrapper/
|
8
|
+
which ruby_noexec_wrapper # status=0
|
9
|
+
|
10
|
+
gem list # match=/haml/
|
11
|
+
rubygems-bundler-uninstaller # match=/haml/
|
12
|
+
|
13
|
+
head -n 1 $(which haml) # match!=/env ruby_noexec_wrapper/
|
14
|
+
which ruby_noexec_wrapper # status=1
|
15
|
+
|
16
|
+
gem uninstall -x haml # match=/Successfully uninstalled/
|
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:
|
4
|
+
hash: 23
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
|
+
- 1
|
7
8
|
- 0
|
8
|
-
-
|
9
|
-
|
10
|
-
version: 0.9.2
|
9
|
+
- 0
|
10
|
+
version: 1.0.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Josh Hull
|
@@ -16,12 +16,12 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date: 2012-05-
|
19
|
+
date: 2012-05-14 00:00:00 Z
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
22
|
+
name: dtf
|
22
23
|
prerelease: false
|
23
|
-
|
24
|
-
version_requirements: &id001 !ruby/object:Gem::Requirement
|
24
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
25
25
|
none: false
|
26
26
|
requirements:
|
27
27
|
- - ">="
|
@@ -30,12 +30,26 @@ dependencies:
|
|
30
30
|
segments:
|
31
31
|
- 0
|
32
32
|
version: "0"
|
33
|
-
requirement: *id001
|
34
33
|
type: :development
|
34
|
+
version_requirements: *id001
|
35
35
|
- !ruby/object:Gem::Dependency
|
36
|
+
name: rake
|
36
37
|
prerelease: false
|
38
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
39
|
+
none: false
|
40
|
+
requirements:
|
41
|
+
- - ">="
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
hash: 3
|
44
|
+
segments:
|
45
|
+
- 0
|
46
|
+
version: "0"
|
47
|
+
type: :development
|
48
|
+
version_requirements: *id002
|
49
|
+
- !ruby/object:Gem::Dependency
|
37
50
|
name: bundler
|
38
|
-
|
51
|
+
prerelease: false
|
52
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
39
53
|
none: false
|
40
54
|
requirements:
|
41
55
|
- - ">="
|
@@ -44,37 +58,42 @@ dependencies:
|
|
44
58
|
segments:
|
45
59
|
- 0
|
46
60
|
version: "0"
|
47
|
-
requirement: *id002
|
48
61
|
type: :development
|
62
|
+
version_requirements: *id003
|
49
63
|
description: Stop using bundle exec. Integrate Rubygems and Bundler. Make rubygems generate bundler aware executable wrappers.
|
50
64
|
email:
|
51
65
|
- joshbuddy@gmail.com
|
52
66
|
- mpapis@gmail.com
|
53
67
|
executables:
|
54
|
-
-
|
55
|
-
extensions:
|
56
|
-
|
68
|
+
- rubygems-bundler-uninstaller
|
69
|
+
extensions: []
|
70
|
+
|
57
71
|
extra_rdoc_files: []
|
58
72
|
|
59
73
|
files:
|
60
74
|
- .gitignore
|
75
|
+
- .noexec.yml
|
61
76
|
- .ruby-version
|
77
|
+
- .travis.yml
|
62
78
|
- CHANGELOG.md
|
63
79
|
- Gemfile
|
64
80
|
- LICENSE
|
65
81
|
- README.md
|
66
82
|
- Rakefile
|
67
|
-
- bin/noexec
|
68
|
-
- bin/ruby_bundler_wrapper
|
69
83
|
- bin/ruby_noexec_wrapper
|
70
|
-
-
|
84
|
+
- bin/rubygems-bundler-uninstaller
|
71
85
|
- lib/rubygems-bundler/fix_wrapper.rb
|
72
86
|
- lib/rubygems-bundler/noexec.rb
|
73
87
|
- lib/rubygems-bundler/regenerate_binstubs_command.rb
|
74
88
|
- lib/rubygems-bundler/rubygems_bundler_installer.rb
|
89
|
+
- lib/rubygems-bundler/uninstaller.rb
|
75
90
|
- lib/rubygems-bundler/version.rb
|
91
|
+
- lib/rubygems-bundler/wrapper.rb
|
76
92
|
- lib/rubygems_plugin.rb
|
77
93
|
- rubygems-bundler.gemspec
|
94
|
+
- test/dtf/bundler_comment_test.sh
|
95
|
+
- test/dtf/rails_and_gemfile_comment_test.sh
|
96
|
+
- test/dtf/rubygems_comment_test.sh
|
78
97
|
homepage: http://mpapis.github.com/rubygems-bundler
|
79
98
|
licenses: []
|
80
99
|
|
@@ -104,9 +123,11 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
104
123
|
requirements: []
|
105
124
|
|
106
125
|
rubyforge_project:
|
107
|
-
rubygems_version: 1.8.
|
126
|
+
rubygems_version: 1.8.24
|
108
127
|
signing_key:
|
109
128
|
specification_version: 3
|
110
129
|
summary: Stop using bundle exec
|
111
|
-
test_files:
|
112
|
-
|
130
|
+
test_files:
|
131
|
+
- test/dtf/bundler_comment_test.sh
|
132
|
+
- test/dtf/rails_and_gemfile_comment_test.sh
|
133
|
+
- test/dtf/rubygems_comment_test.sh
|
data/bin/noexec
DELETED
data/bin/ruby_bundler_wrapper
DELETED
@@ -1,23 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
require 'rubygems'
|
4
|
-
|
5
|
-
original_file=ARGV[0]
|
6
|
-
original_file_name=File.basename(original_file)
|
7
|
-
use_bundler = (ENV['USE_BUNDLER']||'').downcase
|
8
|
-
try_bundler = %w{try check possibly}.include? use_bundler
|
9
|
-
force_bundler = %w{force require yes true on}.include? use_bundler
|
10
|
-
blacklist = (ENV['BUNDLER_BLACKLIST']||'').split(/\s/) + %w{ bundle }
|
11
|
-
blacklisted = blacklist.include? original_file_name
|
12
|
-
$PROGRAM_NAME=original_file
|
13
|
-
|
14
|
-
if !blacklisted && (try_bundler || force_bundler)
|
15
|
-
begin
|
16
|
-
require 'bundler/setup'
|
17
|
-
rescue LoadError
|
18
|
-
raise "\n\nPlease 'gem install bundler' first.\n\n" if force_bundler
|
19
|
-
end
|
20
|
-
end
|
21
|
-
|
22
|
-
ARGV.shift
|
23
|
-
eval File.read(original_file), binding, original_file
|
@@ -1,22 +0,0 @@
|
|
1
|
-
# Fake building extension
|
2
|
-
File.open('Makefile', 'w') { |f| f.write "all:\n\ninstall:\n\n" }
|
3
|
-
File.open('make', 'w') do |f|
|
4
|
-
f.write '#!/bin/sh'
|
5
|
-
f.chmod f.stat.mode | 0111
|
6
|
-
end
|
7
|
-
File.open('wrapper_installer.so', 'w') {}
|
8
|
-
File.open('wrapper_installer.dll', 'w') {}
|
9
|
-
File.open('nmake.bat', 'w') { |f| }
|
10
|
-
|
11
|
-
# Copy wrapper
|
12
|
-
require 'fileutils'
|
13
|
-
require 'rubygems'
|
14
|
-
bindir = Gem.respond_to?(:bindir,true) ? Gem.send(:bindir) : File.join(Gem.dir, 'bin')
|
15
|
-
FileUtils.mkdir_p(bindir, :verbose => true)
|
16
|
-
|
17
|
-
%w( ruby_bundler_wrapper ruby_noexec_wrapper ).each do |f|
|
18
|
-
wrapper = File.expand_path("../../bin/#{f}", Dir.getwd)
|
19
|
-
destination = File.expand_path(f, bindir)
|
20
|
-
FileUtils.cp(wrapper, destination, :verbose => true)
|
21
|
-
File.chmod(0775, destination)
|
22
|
-
end
|