git 2.3.2 → 2.3.3
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 +4 -4
- data/CHANGELOG.md +10 -0
- data/lib/git/base.rb +17 -6
- data/lib/git/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5bc80ed5447f019e983721b8d5b9658be3acda92512312f81d9cad47d7b751e1
|
4
|
+
data.tar.gz: 3cfb80132b7dc28a0e10f7513e688bf8b43bc0786460cdfc93d00ce547533e83
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 86e89789bc17358bf813f46896bb509491b8db027104d440c0a3e8f7bb7716da0c76d6a264a589e188a1e7d5331c833d5b161536a6bd6dccf44ef3df64b6c780
|
7
|
+
data.tar.gz: 8e54f34cb83b0d3027870b1eea35eb23896cd572fc23c167655fb308e15e19ac3a24f7c7c5173fdb734aacfe410516d2bf2793baf4660b443a049a3259176cf0
|
data/CHANGELOG.md
CHANGED
@@ -5,6 +5,16 @@
|
|
5
5
|
|
6
6
|
# Change Log
|
7
7
|
|
8
|
+
## v2.3.3 (2024-12-04)
|
9
|
+
|
10
|
+
[Full Changelog](https://github.com/ruby-git/ruby-git/compare/v2.3.2..v2.3.3)
|
11
|
+
|
12
|
+
Changes since v2.3.2:
|
13
|
+
|
14
|
+
* c25e5e0 test: add tests for spaces in the git binary path or the working dir
|
15
|
+
* 5f43a1a fix: open3 errors on binary paths with spaces
|
16
|
+
* 60b58ba test: add #run_command for tests to use instead of backticks
|
17
|
+
|
8
18
|
## v2.3.2 (2024-11-19)
|
9
19
|
|
10
20
|
[Full Changelog](https://github.com/ruby-git/ruby-git/compare/v2.3.1..v2.3.2)
|
data/lib/git/base.rb
CHANGED
@@ -37,9 +37,15 @@ module Git
|
|
37
37
|
end
|
38
38
|
|
39
39
|
def self.binary_version(binary_path)
|
40
|
-
|
41
|
-
|
42
|
-
|
40
|
+
result = nil
|
41
|
+
status = nil
|
42
|
+
|
43
|
+
begin
|
44
|
+
result, status = Open3.capture2e(binary_path, "-c", "core.quotePath=true", "-c", "color.ui=false", "version")
|
45
|
+
result = result.chomp
|
46
|
+
rescue Errno::ENOENT
|
47
|
+
raise RuntimeError, "Failed to get git version: #{binary_path} not found"
|
48
|
+
end
|
43
49
|
|
44
50
|
if status.success?
|
45
51
|
version = result[/\d+(\.\d+)+/]
|
@@ -81,9 +87,14 @@ module Git
|
|
81
87
|
result = working_dir
|
82
88
|
status = nil
|
83
89
|
|
84
|
-
|
85
|
-
|
86
|
-
|
90
|
+
raise ArgumentError, "'#{working_dir}' does not exist" unless Dir.exist?(working_dir)
|
91
|
+
|
92
|
+
begin
|
93
|
+
result, status = Open3.capture2e(Git::Base.config.binary_path, "-c", "core.quotePath=true", "-c", "color.ui=false", "rev-parse", "--show-toplevel", chdir: File.expand_path(working_dir))
|
94
|
+
result = result.chomp
|
95
|
+
rescue Errno::ENOENT
|
96
|
+
raise ArgumentError, "Failed to find the root of the worktree: git binary not found"
|
97
|
+
end
|
87
98
|
|
88
99
|
raise ArgumentError, "'#{working_dir}' is not in a git working tree" unless status.success?
|
89
100
|
result
|
data/lib/git/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: git
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.3.
|
4
|
+
version: 2.3.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Scott Chacon and others
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-12-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -243,8 +243,8 @@ licenses:
|
|
243
243
|
metadata:
|
244
244
|
homepage_uri: http://github.com/ruby-git/ruby-git
|
245
245
|
source_code_uri: http://github.com/ruby-git/ruby-git
|
246
|
-
changelog_uri: https://rubydoc.info/gems/git/2.3.
|
247
|
-
documentation_uri: https://rubydoc.info/gems/git/2.3.
|
246
|
+
changelog_uri: https://rubydoc.info/gems/git/2.3.3/file/CHANGELOG.md
|
247
|
+
documentation_uri: https://rubydoc.info/gems/git/2.3.3
|
248
248
|
post_install_message:
|
249
249
|
rdoc_options: []
|
250
250
|
require_paths:
|