executable-hooks 1.4.2 → 1.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.travis.yml +2 -0
- data/CHANGELOG.md +5 -0
- data/bin/ruby_executable_hooks +11 -1
- data/lib/executable-hooks/version.rb +1 -1
- data/lib/executable-hooks/wrapper.rb +1 -1
- data/test-tf-truffleruby/truffleruby_comment_test.sh +16 -0
- metadata +40 -60
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: d8af7d04b6fa2b7c8bfb0885cc012c386128e57fe295175c090e2d6bf8c7185f
|
4
|
+
data.tar.gz: f1762977f60bc39d2d036c10b10290d6be62eeba76eac44666dd4ff0c770220b
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 72625ddbc7242affafdf245404a0f0fd5fc426775f23d7556b0c1898a970c70f7e41c170dd7b387fb6b2423aace86b0461659fc8ecb3c8aee3ae7f907c127cd0
|
7
|
+
data.tar.gz: e946e2d8f38cb8a91ca477c7884c0279f217c0a742c6af32b67e43d880bec04c502f957343776f8b008a625656197980fc28157920577d425d26e513371eeccb
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
data/bin/ruby_executable_hooks
CHANGED
@@ -12,4 +12,14 @@ rescue LoadError
|
|
12
12
|
warn "unable to load executable-hooks/hooks" if ENV.key?('ExecutableHooks_DEBUG')
|
13
13
|
end unless $0.end_with?('/executable-hooks-uninstaller')
|
14
14
|
|
15
|
-
|
15
|
+
content = File.read($0)
|
16
|
+
|
17
|
+
if
|
18
|
+
(index = content.index("\n#!ruby\n")) && index > 0
|
19
|
+
then
|
20
|
+
skipped_content = content.slice!(0..index)
|
21
|
+
start_line = skipped_content.count("\n") + 1
|
22
|
+
eval content, binding, $0, start_line
|
23
|
+
else
|
24
|
+
eval content, binding, $0
|
25
|
+
end
|
@@ -35,7 +35,7 @@ module ExecutableHooks
|
|
35
35
|
bindir = calculate_bindir(options)
|
36
36
|
destination = calculate_destination(bindir)
|
37
37
|
|
38
|
-
if File.exist?(wrapper_path)
|
38
|
+
if File.exist?(wrapper_path)
|
39
39
|
FileUtils.mkdir_p(bindir) unless File.exist?(bindir)
|
40
40
|
# exception based on Gem::Installer.generate_bin
|
41
41
|
raise Gem::FilePermissionError.new(bindir) unless File.writable?(bindir)
|
@@ -0,0 +1,16 @@
|
|
1
|
+
gem install executable-hooks-$(awk -F'"' '/VERSION/{print $2}' < lib/executable-hooks/version.rb).gem --development
|
2
|
+
# match=/installed/
|
3
|
+
|
4
|
+
gem install haml -v "4.0.7" # match=/installed/
|
5
|
+
haml_bin=$(which haml )
|
6
|
+
head -n 1 $haml_bin # match=/ruby_executable_hooks/
|
7
|
+
|
8
|
+
## simulate truffleruby style binary with shell code mixed in
|
9
|
+
## \043 - is a # ... somehow it breaks tf
|
10
|
+
( head -n 1 $haml_bin; echo -e 'echo $HOME\n\043!ruby'; tail -n +2 $haml_bin ) > $haml_bin.new
|
11
|
+
mv $haml_bin.new $haml_bin
|
12
|
+
chmod +x $haml_bin
|
13
|
+
|
14
|
+
haml _4.0.7_ -v # match=/4.0.7/
|
15
|
+
|
16
|
+
gem uninstall -x haml -v 4.0.7 # match=/Successfully uninstalled/
|
metadata
CHANGED
@@ -1,50 +1,40 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: executable-hooks
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
prerelease:
|
6
|
-
segments:
|
7
|
-
- 1
|
8
|
-
- 4
|
9
|
-
- 2
|
10
|
-
version: 1.4.2
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.5.0
|
11
5
|
platform: ruby
|
12
|
-
authors:
|
6
|
+
authors:
|
13
7
|
- Michal Papis
|
14
8
|
autorequire:
|
15
9
|
bindir: bin
|
16
10
|
cert_chain: []
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
dependencies:
|
21
|
-
- !ruby/object:Gem::Dependency
|
11
|
+
date: 2018-06-24 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
22
14
|
name: tf
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
- !ruby/object:Gem::Version
|
29
|
-
hash: 3
|
30
|
-
segments:
|
31
|
-
- 0
|
32
|
-
- 4
|
33
|
-
version: "0.4"
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0.4'
|
34
20
|
type: :development
|
35
|
-
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0.4'
|
36
27
|
description:
|
37
|
-
email:
|
28
|
+
email:
|
38
29
|
- mpapis@gmail.com
|
39
|
-
executables:
|
30
|
+
executables:
|
40
31
|
- executable-hooks-uninstaller
|
41
|
-
extensions:
|
32
|
+
extensions:
|
42
33
|
- ext/wrapper_installer/extconf.rb
|
43
34
|
extra_rdoc_files: []
|
44
|
-
|
45
|
-
|
46
|
-
- .
|
47
|
-
- .travis.yml
|
35
|
+
files:
|
36
|
+
- ".gitignore"
|
37
|
+
- ".travis.yml"
|
48
38
|
- CHANGELOG.md
|
49
39
|
- Gemfile
|
50
40
|
- LICENSE
|
@@ -63,43 +53,33 @@ files:
|
|
63
53
|
- lib/rubygems_executable_plugin.rb
|
64
54
|
- lib/rubygems_plugin.rb
|
65
55
|
- test-tf-bundle/bundle_comment_test.sh
|
56
|
+
- test-tf-truffleruby/truffleruby_comment_test.sh
|
66
57
|
- test-tf/rubygems_comment_test.sh
|
67
|
-
has_rdoc: true
|
68
58
|
homepage: https://github.com/mpapis/executable-hooks
|
69
|
-
licenses:
|
59
|
+
licenses:
|
70
60
|
- Apache 2.0
|
61
|
+
metadata: {}
|
71
62
|
post_install_message: |
|
72
63
|
# In case of problems run the following command to update binstubs:
|
73
64
|
gem regenerate_binstubs
|
74
|
-
|
75
65
|
rdoc_options: []
|
76
|
-
|
77
|
-
require_paths:
|
66
|
+
require_paths:
|
78
67
|
- lib
|
79
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
80
|
-
|
81
|
-
requirements:
|
68
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
69
|
+
requirements:
|
82
70
|
- - ">="
|
83
|
-
- !ruby/object:Gem::Version
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
version: "0"
|
88
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
89
|
-
none: false
|
90
|
-
requirements:
|
71
|
+
- !ruby/object:Gem::Version
|
72
|
+
version: '0'
|
73
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
74
|
+
requirements:
|
91
75
|
- - ">="
|
92
|
-
- !ruby/object:Gem::Version
|
93
|
-
|
94
|
-
segments:
|
95
|
-
- 0
|
96
|
-
version: "0"
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: '0'
|
97
78
|
requirements: []
|
98
|
-
|
99
79
|
rubyforge_project:
|
100
|
-
rubygems_version:
|
80
|
+
rubygems_version: 2.7.6
|
101
81
|
signing_key:
|
102
|
-
specification_version:
|
103
|
-
summary: Hook into rubygems executables allowing extra actions to be taken before
|
82
|
+
specification_version: 4
|
83
|
+
summary: Hook into rubygems executables allowing extra actions to be taken before
|
84
|
+
executable is run.
|
104
85
|
test_files: []
|
105
|
-
|