rubygems-bundler 0.9.0 → 0.9.1

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.9.1
4
+ date: 2012-05-05
5
+
6
+ - fix #15 respect --env-shebang
7
+ - add latest rubygems changes
8
+
3
9
  ## 0.9.0
4
10
  date: 2012-04-03
5
11
 
data/README.md CHANGED
@@ -16,11 +16,6 @@ Next run (once):
16
16
 
17
17
  And you're done!
18
18
 
19
- Alternatively, in your .bashrc (or somewhere you can set env variables):
20
-
21
- export RUBYOPT="-r`noexec`"
22
-
23
-
24
19
  ## Configuration
25
20
 
26
21
  Though you can let noexec do it's own thing and rely on looking up your binary via your Gemfile,
@@ -23,15 +23,14 @@ module RubyGemsBundlerInstaller
23
23
 
24
24
 
25
25
  def self.shebang(inst, bin_file_name)
26
- ruby_name = Gem::ConfigMap[:ruby_install_name] if @env_shebang
26
+ ruby_name = Gem::ConfigMap[:ruby_install_name] if inst.options[:env_shebang]
27
27
  bindir = inst.bin_dir ? inst.bin_dir : Gem.bindir(inst.gem_home)
28
28
  path = File.join bindir, inst.formatted_program_filename(bin_file_name)
29
29
  first_line = File.open(path, "rb") {|file| file.gets}
30
- @@env_path ||= Gem::Installer::ENV_PATHS.find {|env_path| File.executable? env_path }
31
30
 
32
31
  if /\A#!/ =~ first_line then
33
32
  # Preserve extra words on shebang line, like "-w". Thanks RPA.
34
- shebang = first_line.sub(/\A\#!.*?ruby\S*(?=(\s+\S+))/, "#!#{Gem.ruby}")
33
+ shebang = first_line.sub(/\A\#!.*?ruby\S*((\s+\S+)+)/, "#!#{Gem.ruby}")
35
34
  opts = $1
36
35
  shebang.strip! # Avoid nasty ^M issues.
37
36
  end
@@ -40,7 +39,7 @@ module RubyGemsBundlerInstaller
40
39
  which = which.gsub(/\$(\w+)/) do
41
40
  case $1
42
41
  when "env"
43
- @@env_path
42
+ @env_path ||= Gem::Installer::ENV_PATHS.find {|env_path| File.executable? env_path }
44
43
  when "ruby"
45
44
  "#{Gem.ruby}#{opts}"
46
45
  when "exec"
@@ -58,7 +57,8 @@ module RubyGemsBundlerInstaller
58
57
  elsif inst.opts then
59
58
  "#!/bin/sh\n'exec' #{ruby_name.dump} '-x' \"$0\" \"$@\"\n#{shebang}"
60
59
  else
61
- "#!#{@@env_path} #{ruby_name}"
60
+ @env_path ||= Gem::Installer::ENV_PATHS.find {|env_path| File.executable? env_path }
61
+ "#!#{@env_path} #{ruby_name}"
62
62
  end
63
63
  end
64
64
 
@@ -1,3 +1,3 @@
1
1
  module RubygemsBundler
2
- VERSION = "0.9.0"
2
+ VERSION = "0.9.1"
3
3
  end
@@ -7,7 +7,7 @@ Gem::Specification.new do |s|
7
7
  s.name = "rubygems-bundler"
8
8
  s.version = RubygemsBundler::VERSION
9
9
  s.authors = ["Josh Hull", "Michal Papis"]
10
- s.email = ["joshbuddy@gmail.com", "mpapis@gmail.conf"]
10
+ s.email = ["joshbuddy@gmail.com", "mpapis@gmail.com"]
11
11
  s.homepage = "http://mpapis.github.com/rubygems-bundler"
12
12
  s.summary = %q{Stop using bundle exec}
13
13
  s.description = %q{Stop using bundle exec. Integrate Rubygems and Bundler. Make rubygems generate bundler aware executable wrappers.}
@@ -17,7 +17,7 @@ Gem::Specification.new do |s|
17
17
  s.executables = ["noexec"]
18
18
  s.extensions = ["ext/wrapper_installer/extconf.rb"]
19
19
 
20
- # Can do we have to depend on those two ? Can we have two simple tasks doing the same ?
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"
23
23
  end
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: 59
4
+ hash: 57
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 9
9
- - 0
10
- version: 0.9.0
9
+ - 1
10
+ version: 0.9.1
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-04-09 00:00:00 Z
19
+ date: 2012-05-05 00:00:00 Z
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
22
- name: rake
23
22
  prerelease: false
24
- requirement: &id001 !ruby/object:Gem::Requirement
23
+ name: rake
24
+ version_requirements: &id001 !ruby/object:Gem::Requirement
25
25
  none: false
26
26
  requirements:
27
27
  - - ">="
@@ -30,12 +30,12 @@ dependencies:
30
30
  segments:
31
31
  - 0
32
32
  version: "0"
33
+ requirement: *id001
33
34
  type: :development
34
- version_requirements: *id001
35
35
  - !ruby/object:Gem::Dependency
36
- name: bundler
37
36
  prerelease: false
38
- requirement: &id002 !ruby/object:Gem::Requirement
37
+ name: bundler
38
+ version_requirements: &id002 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ">="
@@ -44,12 +44,12 @@ dependencies:
44
44
  segments:
45
45
  - 0
46
46
  version: "0"
47
+ requirement: *id002
47
48
  type: :development
48
- version_requirements: *id002
49
49
  description: Stop using bundle exec. Integrate Rubygems and Bundler. Make rubygems generate bundler aware executable wrappers.
50
50
  email:
51
51
  - joshbuddy@gmail.com
52
- - mpapis@gmail.conf
52
+ - mpapis@gmail.com
53
53
  executables:
54
54
  - noexec
55
55
  extensions:
@@ -104,7 +104,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
104
104
  requirements: []
105
105
 
106
106
  rubyforge_project:
107
- rubygems_version: 1.8.21
107
+ rubygems_version: 1.8.23
108
108
  signing_key:
109
109
  specification_version: 3
110
110
  summary: Stop using bundle exec