executable-hooks 1.2.0 → 1.2.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 69412fd8810cd9d98e05fc9f4a472e29b3a9f490
4
- data.tar.gz: 41089f2341d884877e8fa40e81a95665df1be0b9
3
+ metadata.gz: 90029a44c475069d5d68bce0b833b112f705c59b
4
+ data.tar.gz: f65b8d825a7dc6526ccca1c20fe16dab3d6b10d8
5
5
  SHA512:
6
- metadata.gz: 53ab4017aec27a4715001b63b6f33bd58ab31ed63788478a6adffba7adcc79e61b64ee4a29a485c4c658218cbd70bf2bb1976899852c8fa0b1a2f7ae9cdcc140
7
- data.tar.gz: 97e380b67726c552bd285a43ae5909c0db2f6fb418737bc0df148c26c78868c4495a65e1f320be2a8f39a28614dcd2aa64bf57eb3c1f03a88102df4e7d8bd76b
6
+ metadata.gz: 81c2d229d221d2c35af725989492a38f33b3b75d61724c51c7bc76f43fa5b747e23993ba4fe416638dafc138f97d44a94342376f7b8cd11ffc0c949c5648b6f1
7
+ data.tar.gz: bdedad4586b90005fc8ec5c6e792a0da3e628a617d30ca1d81a08d83d71d44243eea3f9e761900b3d68888711dad10d31b092cdddb8334f851ab82983d5b694b
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.2.1
4
+ date: 2013-09-22
5
+
6
+ - fix installing wrapper when first time installing the gem, fix #6
7
+
3
8
  ## 1.2.0
4
9
  date: 2013-09-17
5
10
 
@@ -11,10 +11,12 @@ File.open('nmake.bat', 'w') { |f| }
11
11
 
12
12
  # add the gem to load path
13
13
  $: << File.expand_path("../../../lib", __FILE__)
14
- # load the uninstaller
15
- require 'executable-hooks/uninstaller'
16
- # call the action
17
- RegenerateBinstubsCommand.new.execute
14
+ # load the actions
15
+ require 'executable-hooks/wrapper'
16
+ require 'executable-hooks/regenerate_binstubs_command'
17
+ # call the actions
18
+ ExecutableHooks::Wrapper.install_from(File.expand_path("../../..", __FILE__))
19
+ RegenerateBinstubsCommand.new.execute_no_wrapper
18
20
  # unload the path, what was required stays ... but there is that much we can do
19
21
  $:.pop
20
22
 
@@ -52,7 +52,7 @@ class RegenerateBinstubsCommand < Gem::Command
52
52
  inst = Gem::Installer.new Dir[cache_gem].first, :wrappers => true, :force => true, :install_dir => org_gem_path
53
53
  ExecutableHooksInstaller.bundler_generate_bin(inst)
54
54
  else
55
- puts "##{spec.name} #{spec.version} not found in GEM_PATH"
55
+ $stderr.puts "##{spec.name} #{spec.version} not found in GEM_PATH"
56
56
  end
57
57
  end
58
58
  end
@@ -1,3 +1,3 @@
1
1
  module ExecutableHooks
2
- VERSION = "1.2.0"
2
+ VERSION = "1.2.1"
3
3
  end
@@ -37,13 +37,17 @@ this can potentially break 'executable-hooks' and gem executables overall!
37
37
  executable_hooks_spec = ExecutableHooks::Specification.find
38
38
 
39
39
  if executable_hooks_spec
40
- wrapper_path = File.expand_path( "bin/#{wrapper_name}", executable_hooks_spec.full_gem_path )
40
+ install_from( executable_hooks_spec.full_gem_path )
41
+ end
42
+ end
43
+
44
+ def self.install_from(full_gem_path)
45
+ wrapper_path = File.expand_path( "bin/#{wrapper_name}", full_gem_path )
41
46
 
42
- if File.exist?(wrapper_path) && !File.exist?(destination)
43
- FileUtils.mkdir_p(bindir)
44
- FileUtils.cp(wrapper_path, destination)
45
- File.chmod(0775, destination)
46
- end
47
+ if File.exist?(wrapper_path) && !File.exist?(destination)
48
+ FileUtils.mkdir_p(bindir)
49
+ FileUtils.cp(wrapper_path, destination)
50
+ File.chmod(0775, destination)
47
51
  end
48
52
  end
49
53
  def self.uninstall
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: executable-hooks
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michal Papis
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2013-09-17 00:00:00 Z
12
+ date: 2013-09-21 00:00:00 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: tf
@@ -70,7 +70,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
70
70
  requirements: []
71
71
 
72
72
  rubyforge_project:
73
- rubygems_version: 2.0.8
73
+ rubygems_version: 2.0.9
74
74
  signing_key:
75
75
  specification_version: 4
76
76
  summary: Hook into rubygems executables allowing extra actions to be taken before executable is run.