lefthook 0.7.4 → 0.7.5

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: 382512b0723eae187a4986e13ae795e57b645f3bf98e1da80984bb064ba89ff5
4
- data.tar.gz: 0ba53805b98070d3b2f38d237f94f919bbbfe7ed0f02e679ff637f9ffeca7672
3
+ metadata.gz: 454de3c582094b809d26b597ed6af0dd6f4d5d58d5432433dc62056d8ad3cf16
4
+ data.tar.gz: 8fc5d07c0305ebfae6232b60e157847539fcb50b8b90bccb17d8ea6bd8b6342c
5
5
  SHA512:
6
- metadata.gz: bc0a31787f403ef363e474ae1bb7e3e60545706acc4b755903bcc9a0a5da36751ad04ee516316d954fafbe6bf1b55d4ea43fa3a7be3f8c1a2f8b7b1ad83c4d84
7
- data.tar.gz: 1f0a4c0a9eaa1427bd0673da5e7239225af38b5ca24e75c6fafd9f51ac7d3caba8a95aa8e0786ca5bcca9467f8711fbc9acac44529fba5304b91b95f8891f3d6
6
+ metadata.gz: 6cb7ee952cb6731408e69f200f094922975b7606bb347792dffb2ee55cb825571b25bc8e30a4b67b25e9b324fb8c5c9a1b80507a7eced8784614cedd2a23524a
7
+ data.tar.gz: 6e9bc12876585d2be1642d86666c524579d4e92d21771e6daaa709f9e010dbdd54469e0d44afcdf93ff8dd7b3068bd03196313c1d541a2a48817002a628bdc9f
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.4
4
+ version: 0.7.5
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-30 00:00:00.000000000 Z
11
+ date: 2021-05-14 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email: