gurney_client 0.2.3 → 0.3.0

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: 504e192b04318e2d0d3ec9ae31124c0c83260778a671b52499971b67d5f1a02b
4
- data.tar.gz: d0d867c6bd5a395e187a11852e53eb6851a0d6f3af696da4d83ed107750c3f02
3
+ metadata.gz: ce89572fd28ab8810c0c4783e211e984ec8675d52e5e99f7ec3c0fca0af1404d
4
+ data.tar.gz: '009d1d819bdf23e70fd0004bdf421b25f9c73f93dba47aca28f7cf6070e33e83'
5
5
  SHA512:
6
- metadata.gz: '08062d7c33bbdabf112dcb62cc329f2e5ccb2ca9d3a1b0c6356616f47c8384f1ce0c8c317f065ec654a7ac82d574d96caf66b13ff3f110c5eefe2322293971eb'
7
- data.tar.gz: f4249eee93c6096dfd29eb1f7ff75e656604fad010ec349d3ec6ac86cc999232e2a8a8ae0b3ef83af04698473e0530fb0fc44892de8b77b21b8b29f030133a9d
6
+ metadata.gz: fcdd4b685a61d3f3179d1803343f21b8554694a9f2e3af52a1629d3d22c8323eb2b4cbd3f7e0d96d860690eb67b6c158e2268e8fabd5f171663a1d550de3ca41
7
+ data.tar.gz: 2f73d012863be290165d7944fdaaecdc2d3c28de70b7ce08c2c97ca27feb933c1d514c92f9a4e1c04c44c2b7a18765658e3b3f6bc59fe1c9337ca73ecb7ba852
data/CHANGELOG.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # Gurney changelog
2
2
 
3
- ## 0.2.3 (2023-05-24)
3
+ ## 0.3.0 (2024-11-14)
4
+ * Added: Compatibility with Ruby 3
5
+ * Fixed: Support UTF-8 chars in branch names
4
6
 
7
+ ## 0.2.3 (2023-05-24)
5
8
  * Added: Suppress Bundler's "the Bundler version is older than the one in the lockfile" warning.
data/lib/gurney/cli.rb CHANGED
@@ -18,7 +18,7 @@ module Gurney
18
18
  if options.hook
19
19
  g = Git.bare(ENV['GIT_DIR'] || Dir.pwd)
20
20
  else
21
- unless Dir.exists? './.git'
21
+ unless Dir.exist? './.git'
22
22
  raise Gurney::Error.new('Must be run within a git repository')
23
23
  end
24
24
  g = Git.open('.')
@@ -49,6 +49,7 @@ module Gurney
49
49
  # we get passed changed branches and refs via stdin
50
50
  $stdin.each_line do |line|
51
51
  regex = options.client_hook ? CLIENT_HOOK_STDIN_REGEX : HOOK_STDIN_REGEX
52
+ line.force_encoding(Encoding::UTF_8)
52
53
  matches = line.match(regex)
53
54
  if matches && matches[:new] != '0' * 40
54
55
  if options.branches.include? matches[:ref]
@@ -109,7 +110,7 @@ module Gurney
109
110
  # happens if branch does not exist
110
111
  end
111
112
  else
112
- if File.exists? filename
113
+ if File.exist? filename
113
114
  return File.read filename
114
115
  end
115
116
  end
@@ -1,3 +1,3 @@
1
1
  module Gurney
2
- VERSION = "0.2.3"
2
+ VERSION = '0.3.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gurney_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martin Schaflitzl
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-05-24 00:00:00.000000000 Z
11
+ date: 2024-11-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: colorize