git 2.0.0.pre2 → 2.0.0

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.
data/lib/git.rb CHANGED
@@ -1,22 +1,21 @@
1
- # Add the directory containing this file to the start of the load path if it
2
- # isn't there already.
3
- $:.unshift(File.dirname(__FILE__)) unless
4
- $:.include?(File.dirname(__FILE__)) || $:.include?(File.expand_path(File.dirname(__FILE__)))
1
+ require 'active_support'
2
+ require 'active_support/deprecation'
3
+
4
+ module Git
5
+ Deprecation = ActiveSupport::Deprecation.new('3.0', 'Git')
6
+ end
5
7
 
6
8
  require 'git/author'
7
9
  require 'git/base'
8
10
  require 'git/branch'
9
11
  require 'git/branches'
10
- require 'git/command_line_error'
11
12
  require 'git/command_line_result'
12
13
  require 'git/command_line'
13
14
  require 'git/config'
14
15
  require 'git/diff'
15
16
  require 'git/encoding_utils'
16
- require 'git/error'
17
+ require 'git/errors'
17
18
  require 'git/escaped_path'
18
- require 'git/failed_error'
19
- require 'git/git_execute_error'
20
19
  require 'git/index'
21
20
  require 'git/lib'
22
21
  require 'git/log'
@@ -24,11 +23,9 @@ require 'git/object'
24
23
  require 'git/path'
25
24
  require 'git/remote'
26
25
  require 'git/repository'
27
- require 'git/signaled_error'
28
26
  require 'git/status'
29
27
  require 'git/stash'
30
28
  require 'git/stashes'
31
- require 'git/timeout_error'
32
29
  require 'git/url'
33
30
  require 'git/version'
34
31
  require 'git/working_directory'
metadata CHANGED
@@ -1,15 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: git
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0.pre2
4
+ version: 2.0.0
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-02-24 00:00:00.000000000 Z
11
+ date: 2024-05-11 00:00:00.000000000 Z
12
12
  dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: activesupport
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '5.0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '5.0'
13
27
  - !ruby/object:Gem::Dependency
14
28
  name: addressable
15
29
  requirement: !ruby/object:Gem::Requirement
@@ -52,6 +66,20 @@ dependencies:
52
66
  - - "~>"
53
67
  - !ruby/object:Gem::Version
54
68
  version: '1.8'
69
+ - !ruby/object:Gem::Dependency
70
+ name: create_github_release
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: '1.4'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: '1.4'
55
83
  - !ruby/object:Gem::Dependency
56
84
  name: minitar
57
85
  requirement: !ruby/object:Gem::Requirement
@@ -167,18 +195,17 @@ executables: []
167
195
  extensions: []
168
196
  extra_rdoc_files: []
169
197
  files:
170
- - ".github/stale.yml"
198
+ - ".github/issue_template.md"
199
+ - ".github/pull_request_template.md"
171
200
  - ".github/workflows/continuous_integration.yml"
201
+ - ".github/workflows/experimental_continuous_integration.yml"
172
202
  - ".gitignore"
173
203
  - ".yardopts"
174
204
  - CHANGELOG.md
175
205
  - CONTRIBUTING.md
176
- - Dockerfile.changelog-rs
177
206
  - Gemfile
178
- - ISSUE_TEMPLATE.md
179
207
  - LICENSE
180
208
  - MAINTAINERS.md
181
- - PULL_REQUEST_TEMPLATE.md
182
209
  - README.md
183
210
  - RELEASING.md
184
211
  - Rakefile
@@ -190,15 +217,12 @@ files:
190
217
  - lib/git/branch.rb
191
218
  - lib/git/branches.rb
192
219
  - lib/git/command_line.rb
193
- - lib/git/command_line_error.rb
194
220
  - lib/git/command_line_result.rb
195
221
  - lib/git/config.rb
196
222
  - lib/git/diff.rb
197
223
  - lib/git/encoding_utils.rb
198
- - lib/git/error.rb
224
+ - lib/git/errors.rb
199
225
  - lib/git/escaped_path.rb
200
- - lib/git/failed_error.rb
201
- - lib/git/git_execute_error.rb
202
226
  - lib/git/index.rb
203
227
  - lib/git/lib.rb
204
228
  - lib/git/log.rb
@@ -206,11 +230,9 @@ files:
206
230
  - lib/git/path.rb
207
231
  - lib/git/remote.rb
208
232
  - lib/git/repository.rb
209
- - lib/git/signaled_error.rb
210
233
  - lib/git/stash.rb
211
234
  - lib/git/stashes.rb
212
235
  - lib/git/status.rb
213
- - lib/git/timeout_error.rb
214
236
  - lib/git/url.rb
215
237
  - lib/git/version.rb
216
238
  - lib/git/working_directory.rb
@@ -222,8 +244,8 @@ licenses:
222
244
  metadata:
223
245
  homepage_uri: http://github.com/ruby-git/ruby-git
224
246
  source_code_uri: http://github.com/ruby-git/ruby-git
225
- changelog_uri: https://rubydoc.info/gems/git/2.0.0.pre2/file/CHANGELOG.md
226
- documentation_uri: https://rubydoc.info/gems/git/2.0.0.pre2
247
+ changelog_uri: https://rubydoc.info/gems/git/2.0.0/file/CHANGELOG.md
248
+ documentation_uri: https://rubydoc.info/gems/git/2.0.0
227
249
  post_install_message:
228
250
  rdoc_options: []
229
251
  require_paths:
@@ -240,7 +262,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
240
262
  version: '0'
241
263
  requirements:
242
264
  - git 2.28.0 or greater
243
- rubygems_version: 3.5.3
265
+ rubygems_version: 3.5.9
244
266
  signing_key:
245
267
  specification_version: 4
246
268
  summary: An API to create, read, and manipulate Git repositories
data/.github/stale.yml DELETED
@@ -1,25 +0,0 @@
1
- # Probot: Stale
2
- # https://github.com/probot/stale
3
-
4
- # Number of days of inactivity before an issue becomes stale
5
- daysUntilStale: 60
6
-
7
- # Number of days of inactivity before a stale issue is closed
8
- # Set to false to disable. If disabled, issues still need to be closed
9
- # manually, but will remain marked as stale.
10
- daysUntilClose: false
11
-
12
- # Issues with these labels will never be considered stale
13
- exemptLabels:
14
- - pinned
15
- - security
16
-
17
- # Label to use when marking an issue as stale
18
- staleLabel: stale
19
-
20
- # Comment to post when marking an issue as stale. Set to `false` to disable
21
- markComment: >
22
- A friendly reminder that this issue had no activity for 60 days.
23
-
24
- # Comment to post when closing a stale issue. Set to `false` to disable
25
- closeComment: false
@@ -1,12 +0,0 @@
1
- FROM rust
2
-
3
- # Build the docker image (from this project's root directory):
4
- # docker build --file Dockerfile.changelog-rs --tag changelog-rs .
5
- #
6
- # Use this image to output a changelog (from this project's root directory):
7
- # docker run --rm --volume "$PWD:/worktree" changelog-rs v1.9.1 v1.10.0
8
-
9
- RUN cargo install changelog-rs
10
- WORKDIR /worktree
11
-
12
- ENTRYPOINT ["/usr/local/cargo/bin/changelog-rs", "/worktree"]
@@ -1,9 +0,0 @@
1
- ### Your checklist for this pull request
2
- 🚨Please review the [guidelines for contributing](https://github.com/ruby-git/ruby-git/blob/master/CONTRIBUTING.md) to this repository.
3
-
4
- - [ ] Ensure all commits include DCO sign-off.
5
- - [ ] Ensure that your contributions pass unit testing.
6
- - [ ] Ensure that your contributions contain documentation if applicable.
7
-
8
- ### Description
9
- Please describe your pull request.
@@ -1,59 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require_relative 'error'
4
-
5
- module Git
6
- # Raised when a git command fails or exits because of an uncaught signal
7
- #
8
- # The git command executed, status, stdout, and stderr are available from this
9
- # object.
10
- #
11
- # Rather than creating a CommandLineError object directly, it is recommended to use
12
- # one of the derived classes for the appropriate type of error:
13
- #
14
- # * {Git::FailedError}: when the git command exits with a non-zero status
15
- # * {Git::SignaledError}: when the git command exits because of an uncaught signal
16
- # * {Git::TimeoutError}: when the git command times out
17
- #
18
- # @api public
19
- #
20
- class CommandLineError < Git::Error
21
- # Create a CommandLineError object
22
- #
23
- # @example
24
- # `exit 1` # set $? appropriately for this example
25
- # result = Git::CommandLineResult.new(%w[git status], $?, 'stdout', 'stderr')
26
- # error = Git::CommandLineError.new(result)
27
- # error.to_s #=> '["git", "status"], status: pid 89784 exit 1, stderr: "stderr"'
28
- #
29
- # @param result [Git::CommandLineResult] the result of the git command including
30
- # the git command, status, stdout, and stderr
31
- #
32
- def initialize(result)
33
- @result = result
34
- super()
35
- end
36
-
37
- # The human readable representation of this error
38
- #
39
- # @example
40
- # error.to_s #=> '["git", "status"], status: pid 89784 exit 1, stderr: "stderr"'
41
- #
42
- # @return [String]
43
- #
44
- def to_s = <<~MESSAGE.chomp
45
- #{result.git_cmd}, status: #{result.status}, stderr: #{result.stderr.inspect}
46
- MESSAGE
47
-
48
- # @attribute [r] result
49
- #
50
- # The result of the git command including the git command and its status and output
51
- #
52
- # @example
53
- # error.result #=> #<Git::CommandLineResult:0x00000001046bd488 ...>
54
- #
55
- # @return [Git::CommandLineResult]
56
- #
57
- attr_reader :result
58
- end
59
- end
data/lib/git/error.rb DELETED
@@ -1,7 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Git
4
- # Base class for all custom git module errors
5
- #
6
- class Error < StandardError; end
7
- end
@@ -1,14 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require_relative 'command_line_error'
4
-
5
- module Git
6
- # This error is raised when a git command returns a non-zero exitstatus
7
- #
8
- # The git command executed, status, stdout, and stderr are available from this
9
- # object.
10
- #
11
- # @api public
12
- #
13
- class FailedError < Git::CommandLineError; end
14
- end
@@ -1,14 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require_relative 'error'
4
-
5
- module Git
6
- # This error is raised when a git command fails
7
- #
8
- # This error class is used as an alias for Git::Error for backwards compatibility.
9
- # It is recommended to use Git::Error directly.
10
- #
11
- # @deprecated Use Git::Error instead
12
- #
13
- GitExecuteError = Git::Error
14
- end
@@ -1,14 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require_relative 'command_line_error'
4
-
5
- module Git
6
- # This error is raised when a git command exits because of an uncaught signal
7
- #
8
- # The git command executed, status, stdout, and stderr are available from this
9
- # object.
10
- #
11
- # @api public
12
- #
13
- class SignaledError < Git::CommandLineError; end
14
- end
@@ -1,60 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require_relative 'signaled_error'
4
-
5
- module Git
6
- # This error is raised when a git command takes longer than the configured timeout
7
- #
8
- # The git command executed, status, stdout, and stderr, and the timeout duration
9
- # are available from this object.
10
- #
11
- # result.status.timeout? will be `true`
12
- #
13
- # @api public
14
- #
15
- class TimeoutError < Git::SignaledError
16
- # Create a TimeoutError object
17
- #
18
- # @example
19
- # command = %w[sleep 10]
20
- # timeout_duration = 1
21
- # status = ProcessExecuter.spawn(*command, timeout: timeout_duration)
22
- # result = Git::CommandLineResult.new(command, status, 'stdout', 'err output')
23
- # error = Git::TimeoutError.new(result, timeout_duration)
24
- # error.to_s #=> '["sleep", "10"], status: pid 70144 SIGKILL (signal 9), stderr: "err output", timed out after 1s'
25
- #
26
- # @param result [Git::CommandLineResult] the result of the git command including
27
- # the git command, status, stdout, and stderr
28
- #
29
- # @param timeout_duration [Numeric] the amount of time the subprocess was allowed
30
- # to run before being killed
31
- #
32
- def initialize(result, timeout_duration)
33
- @timeout_duration = timeout_duration
34
- super(result)
35
- end
36
-
37
- # The human readable representation of this error
38
- #
39
- # @example
40
- # error.to_s #=> '["sleep", "10"], status: pid 88811 SIGKILL (signal 9), stderr: "err output", timed out after 1s'
41
- #
42
- # @return [String]
43
- #
44
- def to_s = <<~MESSAGE.chomp
45
- #{super}, timed out after #{timeout_duration}s
46
- MESSAGE
47
-
48
- # The amount of time the subprocess was allowed to run before being killed
49
- #
50
- # @example
51
- # `kill -9 $$` # set $? appropriately for this example
52
- # result = Git::CommandLineResult.new(%w[git status], $?, '', "killed")
53
- # error = Git::TimeoutError.new(result, 10)
54
- # error.timeout_duration #=> 10
55
- #
56
- # @return [Numeric]
57
- #
58
- attr_reader :timeout_duration
59
- end
60
- end
File without changes