lefthook 0.7.2 → 0.7.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 111bbdc98645f9792d060e9baccbb0d9eb37a049df9faecd559420abe9bf44bd
4
- data.tar.gz: 5a83c28ef84e06d16490beb4fc3a553db9a1a48c461cde9be811aaef2a95db62
3
+ metadata.gz: 830da2048b5aa06f5554f81e7b7becc5d33a7c656ae0f9df27e4683bbd03f855
4
+ data.tar.gz: 97f066f0fe485fc44197cc36118f62ee28c864824236fd00d74d9c8f00807b4c
5
5
  SHA512:
6
- metadata.gz: d0140ea6dec2f2d79cf3eb03759e9c19522c0c6470adb21c937d1497fd7ae3f2c304990f6cc8946daf3f615950cd6f8f0c06ec6e55a39e0314621b6fe09b487a
7
- data.tar.gz: 3278358b2590b04dd85b4e8ae60919ce2925a7d4f0ad3c20f535417d32f36216e2c737ff387fb762821b08ebe0b7e08f4fc71ca9eb5e503bfabd43eff7036b1a
6
+ metadata.gz: fca29b7e0e6a429fe01decca86504d832f999336c86cbe383545de22b24d4f21d3e3b09a4d9886022652452ce1ef57c1cb6862544182fbb4f09f995edb7e5593
7
+ data.tar.gz: e53fd9372b320c87130a4354db2a9ca82fa61917758536f128c222fc021fcbad5e87bb7867a296169035214c89baa83970020217b5e45bae94d0ae7964370fb9
data/bin/lefthook CHANGED
@@ -1,19 +1,26 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
- binary = case RUBY_PLATFORM
4
- when /linux/
5
- 'lefthook-linux'
6
- when /darwin/
7
- 'lefthook-mac'
8
- when /windows/
9
- 'lefthook-win.exe'
10
- else
11
- raise "Invalid platform."
12
- end
3
+ require "rubygems"
4
+
5
+ platform = Gem::Platform.new(RUBY_PLATFORM)
6
+ arch =
7
+ case platform.cpu.sub(/\Auniversal\./, '')
8
+ when /\Aarm64/ then "arm64" # Apple reports arm64e on M1 macs
9
+ when "x86_64" then "amd64"
10
+ when "x86" then "386"
11
+ else raise "Unknown architecture: #{platform.os}"
12
+ end
13
+
14
+ binary = "lefthook_#{platform.os}_#{arch}/lefthook"
15
+ binary = "#{binary}.exe" if platform.os == "windows"
13
16
 
14
17
  args = $*.map { |x| x.include?(' ') ? "'" + x + "'" : x }
15
18
  cmd = File.expand_path "#{File.dirname(__FILE__)}/../libexec/#{binary}"
16
19
 
20
+ unless File.exists?(cmd)
21
+ raise "Invalid platform. Lefthook wasn't build for #{RUBY_PLATFORM}"
22
+ end
23
+
17
24
  puts "#{cmd} #{args.join(' ')}"
18
25
 
19
26
  pid = spawn("#{cmd} #{args.join(' ')}")
Binary file
metadata CHANGED
@@ -1,16 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lefthook
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.2
4
+ version: 0.7.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - A.A.Abroskin
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-05-19 00:00:00.000000000 Z
11
+ date: 2021-04-23 00:00:00.000000000 Z
12
12
  dependencies: []
13
- description:
13
+ description:
14
14
  email:
15
15
  - arkweid@evilmartians.com
16
16
  executables:
@@ -20,10 +20,14 @@ extra_rdoc_files: []
20
20
  files:
21
21
  - bin/lefthook
22
22
  - lib/lefthook.rb
23
- - libexec/lefthook-linux
24
- - libexec/lefthook-mac
25
- - libexec/lefthook-win.exe
26
- homepage: https://github.com/Arkweid/lefthook
23
+ - libexec/lefthook_darwin_amd64/lefthook
24
+ - libexec/lefthook_darwin_arm64/lefthook
25
+ - libexec/lefthook_linux_386/lefthook
26
+ - libexec/lefthook_linux_amd64/lefthook
27
+ - libexec/lefthook_linux_arm64/lefthook
28
+ - libexec/lefthook_windows_386/lefthook.exe
29
+ - libexec/lefthook_windows_amd64/lefthook.exe
30
+ homepage: https://github.com/evilmartians/lefthook
27
31
  licenses:
28
32
  - MIT
29
33
  metadata: {}
@@ -43,8 +47,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
43
47
  - !ruby/object:Gem::Version
44
48
  version: '0'
45
49
  requirements: []
46
- rubygems_version: 3.0.3
47
- signing_key:
50
+ rubygems_version: 3.2.3
51
+ signing_key:
48
52
  specification_version: 4
49
53
  summary: A single dependency-free binary to manage all your git hooks that works with
50
54
  any language in any environment, and in all common team workflows.
Binary file
data/libexec/lefthook-mac DELETED
Binary file
Binary file