rubygems-bundler 1.2.0.rc2 → 1.2.0.rc3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/README.md +20 -4
- data/lib/rubygems-bundler/noexec.rb +28 -2
- data/lib/rubygems-bundler/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b75c3941a6d616305864444af05a48b7525c6cfc
|
4
|
+
data.tar.gz: 2bcc31137ba235cf7538acd664fe7f65db6d2d3c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8718c7abf951c5acd383043dc5244d28e4602d1cd8ad7dcc82ef18b0280b3223f557442794ab0c5bcc487ff74bbc6e48b6efab0392390086877cfb3b870dee49
|
7
|
+
data.tar.gz: 4ffe979944b4c3259fa6e4fce245b3383709b1fd838a1d2d5517f9a665973adeb058f8f6ef6524e0f065da9c4f288fb9dda5893ba20a101e11879625601fa2c9
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -20,7 +20,7 @@ And you're done!
|
|
20
20
|
## Configuration
|
21
21
|
|
22
22
|
### ~/.gemrc
|
23
|
-
|
23
|
+
|
24
24
|
You no longer need to modify `~/.gemrc`,
|
25
25
|
just remove the old entry to be sure it works as expected.
|
26
26
|
If you need to use your own `custom_shebang`,
|
@@ -45,11 +45,27 @@ Or,
|
|
45
45
|
include: [haml]
|
46
46
|
```
|
47
47
|
|
48
|
-
### Disabling
|
48
|
+
### Disabling executables
|
49
|
+
|
50
|
+
In case you know certain binaries should not use `bundler` you can define a list of this binaries:
|
51
|
+
|
52
|
+
export NOEXEC_EXCLUDE="gist bluepill"
|
53
|
+
|
54
|
+
Put it into `~/.bashrc` or other shell initialization file to make it persistent.
|
55
|
+
|
56
|
+
### Disabling any commands
|
49
57
|
|
50
58
|
In case you need explicitly skip loading `Bundler.setup`, prefix your command with `NOEXEC_DISABLE=1`:
|
51
59
|
|
52
|
-
NOEXEC_DISABLE=1
|
60
|
+
NOEXEC_DISABLE=1 rails new app
|
61
|
+
|
62
|
+
To disable for whole shell session:
|
63
|
+
|
64
|
+
export NOEXEC_DISABLE=1
|
65
|
+
|
66
|
+
And to restore automatic behavior:
|
67
|
+
|
68
|
+
unset NOEXEC_DISABLE
|
53
69
|
|
54
70
|
The old method is still available and might kick in if your tools use `NOEXEC` environment variable:
|
55
71
|
|
@@ -67,7 +83,7 @@ Things not going the way you'd like? Try your command again with
|
|
67
83
|
|
68
84
|
[#rubygems-bundler on irc.freenode.net](http://webchat.freenode.net/?channels=#rubygems-bundler)
|
69
85
|
|
70
|
-
If you do not get an answer relatively quickly,
|
86
|
+
If you do not get an answer relatively quickly,
|
71
87
|
be sure to leave your email address so someone can get back to you later.
|
72
88
|
|
73
89
|
## How does this work (ruby_noexec_wrapper)
|
@@ -25,11 +25,37 @@ else
|
|
25
25
|
require "bundler"
|
26
26
|
|
27
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
|
28
54
|
class << self
|
29
55
|
def reset!(rubygems_specs)
|
30
56
|
@load = nil
|
31
57
|
ENV.replace(ORIGINAL_ENV)
|
32
|
-
Bundler.rubygems.
|
58
|
+
Bundler.rubygems.plain_specs = rubygems_specs
|
33
59
|
end
|
34
60
|
end
|
35
61
|
end
|
@@ -44,7 +70,7 @@ else
|
|
44
70
|
end
|
45
71
|
|
46
72
|
def candidate?(gemfile, bin)
|
47
|
-
rubygems_specs = Bundler.rubygems.
|
73
|
+
rubygems_specs = Bundler.rubygems.plain_specs
|
48
74
|
config_file = File.expand_path('../.noexec.yaml', gemfile)
|
49
75
|
log "Considering #{config_file.inspect}"
|
50
76
|
if File.exist?(config_file)
|