executable-hooks 1.4.0.rc1 → 1.4.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -13,7 +13,7 @@ before_install:
13
13
  - gem install executable-hooks-$(awk -F'"' '/VERSION/{print $2}' < lib/executable-hooks/version.rb).gem --development
14
14
  before_script:
15
15
  - unset BUNDLE_GEMFILE
16
- script: tf --text test-tf/*
16
+ script: NOEXEC=0 tf --text test-tf${TEST_SUFFIX:-}/*
17
17
  notifications:
18
18
  irc:
19
19
  channels:
@@ -27,6 +27,8 @@ matrix:
27
27
  include:
28
28
  - rvm: 1.8.7
29
29
  env: WITH_RUBYGEMS=1.6.2
30
+ - rvm: 2.5
31
+ env: TEST_SUFFIX=-bundle
30
32
  - rvm: 1.8.7
31
33
  - rvm: 1.9.2
32
34
  - rvm: 1.9.3
@@ -1,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.4.0
4
+ date: 2018-02-08
5
+
6
+ - Add bindir support, fixes #24
7
+
3
8
  ## 1.3.2
4
9
  date: 2014-06-06
5
10
 
@@ -10,6 +10,6 @@ begin
10
10
  Gem::ExecutableHooks.run($0)
11
11
  rescue LoadError
12
12
  warn "unable to load executable-hooks/hooks" if ENV.key?('ExecutableHooks_DEBUG')
13
- end
13
+ end unless $0.end_with?('/executable-hooks-uninstaller')
14
14
 
15
15
  eval File.read($0), binding, $0
@@ -2,9 +2,11 @@ module ExecutableHooksInstaller
2
2
  # Iterate through executables and generate wrapper for each one,
3
3
  # extract of rubygems code
4
4
  def self.bundler_generate_bin(inst)
5
- return if inst.spec.executables.nil? or inst.spec.executables.empty?
5
+ return if inst.spec.executables.nil?
6
+ executables = inst.spec.executables.reject{ |name| name == 'executable-hooks-uninstaller' }
7
+ return if executables.empty?
6
8
  bindir = inst.bin_dir ? inst.bin_dir : Gem.bindir(inst.gem_home)
7
- inst.spec.executables.each do |filename|
9
+ executables.each do |filename|
8
10
  filename.untaint
9
11
  original = File.join bindir, filename
10
12
  if File.exists?( original )
@@ -71,8 +71,9 @@ class RegenerateBinstubsCommand < Gem::Command
71
71
  name = get_one_optional_argument || ''
72
72
  specs = installed_gems.select{|spec| spec.name =~ /^#{name}/i }
73
73
  specs.each do |spec|
74
- unless spec.executables.empty?
75
- try_to_fix_binstubs(spec, wrapper_name) or
74
+ executables = spec.executables.reject{ |name| name == 'executable-hooks-uninstaller' }
75
+ unless executables.empty?
76
+ try_to_fix_binstubs(spec, executables, wrapper_name) or
76
77
  try_to_install_binstubs(spec) or
77
78
  $stderr.puts "##{spec.name} #{spec.version} not found in GEM_PATH"
78
79
  end
@@ -81,9 +82,9 @@ class RegenerateBinstubsCommand < Gem::Command
81
82
 
82
83
  private
83
84
 
84
- def try_to_fix_binstubs(spec, wrapper_name)
85
+ def try_to_fix_binstubs(spec, executables, wrapper_name)
85
86
  executable_paths =
86
- spec.executables.map do |executable|
87
+ executables.map do |executable|
87
88
  path = expanded_bin_paths.detect{|bin_path| File.exist?(File.join(bin_path, executable)) }
88
89
  File.join(path, executable) if path
89
90
  end
@@ -1,3 +1,3 @@
1
1
  module ExecutableHooks
2
- VERSION = "1.4.0.rc1"
2
+ VERSION = "1.4.0"
3
3
  end
@@ -0,0 +1,20 @@
1
+ gem install executable-hooks-$(awk -F'"' '/VERSION/{print $2}' < lib/executable-hooks/version.rb).gem --development
2
+ # match=/installed/
3
+ gem install rubygems-bundler bundler
4
+ # match=/installed/
5
+ gem install haml -v "4.0.7" # match=/installed/
6
+ # match=/installed/
7
+
8
+ true TMPDIR:${TMPDIR:=/tmp}:
9
+ d=$TMPDIR/test-bundled
10
+ mkdir $d
11
+ pushd $d
12
+
13
+ NOEXEC=1 haml -v # match=/4.0.7/
14
+
15
+ echo -e 'source "https://rubygems.org"\ngem "haml", "4.0.6"' > Gemfile
16
+ bundle install # match=/haml 4.0.6/
17
+ NOEXEC=1 haml -v # match=/4.0.6/
18
+
19
+ popd
20
+ rm -rf $d
metadata CHANGED
@@ -1,15 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: executable-hooks
3
3
  version: !ruby/object:Gem::Version
4
- hash: -3026611996
5
- prerelease: 6
4
+ hash: 7
5
+ prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 4
9
9
  - 0
10
- - rc
11
- - 1
12
- version: 1.4.0.rc1
10
+ version: 1.4.0
13
11
  platform: ruby
14
12
  authors:
15
13
  - Michal Papis
@@ -17,7 +15,7 @@ autorequire:
17
15
  bindir: bin
18
16
  cert_chain: []
19
17
 
20
- date: 2018-01-28 00:00:00 +01:00
18
+ date: 2018-02-08 00:00:00 +01:00
21
19
  default_executable:
22
20
  dependencies:
23
21
  - !ruby/object:Gem::Dependency
@@ -64,6 +62,7 @@ files:
64
62
  - lib/executable-hooks/wrapper.rb
65
63
  - lib/rubygems_executable_plugin.rb
66
64
  - lib/rubygems_plugin.rb
65
+ - test-tf-bundle/bundle_comment_test.sh
67
66
  - test-tf/rubygems_comment_test.sh
68
67
  has_rdoc: true
69
68
  homepage: https://github.com/mpapis/executable-hooks
@@ -89,14 +88,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
89
88
  required_rubygems_version: !ruby/object:Gem::Requirement
90
89
  none: false
91
90
  requirements:
92
- - - ">"
91
+ - - ">="
93
92
  - !ruby/object:Gem::Version
94
- hash: 25
93
+ hash: 3
95
94
  segments:
96
- - 1
97
- - 3
98
- - 1
99
- version: 1.3.1
95
+ - 0
96
+ version: "0"
100
97
  requirements: []
101
98
 
102
99
  rubyforge_project: