lefthook 0.7.3 → 0.7.7

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: 830da2048b5aa06f5554f81e7b7becc5d33a7c656ae0f9df27e4683bbd03f855
4
- data.tar.gz: 97f066f0fe485fc44197cc36118f62ee28c864824236fd00d74d9c8f00807b4c
3
+ metadata.gz: 367071d175182ccf6987ad9a388b202d4e11f455baef3a229583782c17376d1b
4
+ data.tar.gz: ded9caf09c6c633977bc4652e41bc1ef34e20a029b4e04a125d12b0841934661
5
5
  SHA512:
6
- metadata.gz: fca29b7e0e6a429fe01decca86504d832f999336c86cbe383545de22b24d4f21d3e3b09a4d9886022652452ce1ef57c1cb6862544182fbb4f09f995edb7e5593
7
- data.tar.gz: e53fd9372b320c87130a4354db2a9ca82fa61917758536f128c222fc021fcbad5e87bb7867a296169035214c89baa83970020217b5e45bae94d0ae7964370fb9
6
+ metadata.gz: 59c527c089f25707974c704650ccb6f4850edbcab87e197b4484232526ced5b2114ab738711d9432ef30f8ae818e3bb4a49d77f048c16792da034459b9c29ae5
7
+ data.tar.gz: e15d1fba605f4c3703d21a74aef080385e7c2753f246e62d2c280ba383bb25fe05ec16754f1c7720e73d513c0a60b10383a00ea306edcad8d32fa5549b6a1685
data/bin/lefthook CHANGED
@@ -7,12 +7,22 @@ arch =
7
7
  case platform.cpu.sub(/\Auniversal\./, '')
8
8
  when /\Aarm64/ then "arm64" # Apple reports arm64e on M1 macs
9
9
  when "x86_64" then "amd64"
10
+ when "x64" then "amd64" # Windows with MINGW64 reports RUBY_PLATFORM as "x64-mingw32"
10
11
  when "x86" then "386"
11
- else raise "Unknown architecture: #{platform.os}"
12
+ else raise "Unknown architecture: #{platform.cpu}"
12
13
  end
13
14
 
14
- binary = "lefthook_#{platform.os}_#{arch}/lefthook"
15
- binary = "#{binary}.exe" if platform.os == "windows"
15
+ os =
16
+ case platform.os
17
+ when "linux" then "linux"
18
+ when "darwin" then "darwin" # MacOS
19
+ when "windows" then "windows"
20
+ when "mingw32" then "windows" # Windows with MINGW64 reports RUBY_PLATFORM as "x64-mingw32"
21
+ else raise "Unknown OS: #{platform.os}"
22
+ end
23
+
24
+ binary = "lefthook_#{os}_#{arch}/lefthook"
25
+ binary = "#{binary}.exe" if os == "windows"
16
26
 
17
27
  args = $*.map { |x| x.include?(' ') ? "'" + x + "'" : x }
18
28
  cmd = File.expand_path "#{File.dirname(__FILE__)}/../libexec/#{binary}"
@@ -21,8 +31,6 @@ unless File.exists?(cmd)
21
31
  raise "Invalid platform. Lefthook wasn't build for #{RUBY_PLATFORM}"
22
32
  end
23
33
 
24
- puts "#{cmd} #{args.join(' ')}"
25
-
26
34
  pid = spawn("#{cmd} #{args.join(' ')}")
27
35
  Process.wait(pid)
28
36
  exit($?.exitstatus)
Binary file
Binary file
Binary file
Binary file
Binary file
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lefthook
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.3
4
+ version: 0.7.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - A.A.Abroskin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-04-23 00:00:00.000000000 Z
11
+ date: 2021-10-02 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email:
@@ -47,7 +47,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
47
47
  - !ruby/object:Gem::Version
48
48
  version: '0'
49
49
  requirements: []
50
- rubygems_version: 3.2.3
50
+ rubygems_version: 3.2.22
51
51
  signing_key:
52
52
  specification_version: 4
53
53
  summary: A single dependency-free binary to manage all your git hooks that works with