Skip to content

Commit f48930d

Browse files
authored
Update minimum required version of Ruby and Git (#685)
* Update min required version of Ruby and Git Signed-off-by: James Couball <jcouball@yahoo.com>
1 parent 4979923 commit f48930d

File tree

4 files changed

+33
-43
lines changed

4 files changed

+33
-43
lines changed

.github/workflows/continuous_integration.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,16 @@ jobs:
1313
strategy:
1414
fail-fast: false
1515
matrix:
16-
ruby: [2.7, 3.0, 3.1, 3.2]
16+
ruby: [3.0, 3.1, 3.2, 3.3]
1717
operating-system: [ubuntu-latest]
1818
include:
1919
- ruby: head
2020
operating-system: ubuntu-latest
21-
- ruby: truffleruby-head
21+
- ruby: truffleruby-23.1.1
2222
operating-system: ubuntu-latest
23-
- ruby: 2.7
23+
- ruby: 3.0
2424
operating-system: windows-latest
25-
- ruby: jruby-head
25+
- ruby: jruby-9.4.5.0
2626
operating-system: windows-latest
2727

2828
name: Ruby ${{ matrix.ruby }} on ${{ matrix.operating-system }}

README.md

Lines changed: 23 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,14 @@ command line. The API can be used for working with Git in complex interactions
1717
including branching and merging, object inspection and manipulation, history, patch
1818
generation and more.
1919

20+
Get started by obtaining a repository object by:
21+
22+
* opening an existing working copy with [Git.open](https://rubydoc.info/gems/git/Git#open-class_method)
23+
* initializing a new repository with [Git.init](https://rubydoc.info/gems/git/Git#init-class_method)
24+
* cloning a repository with [Git.clone](https://rubydoc.info/gems/git/Git#clone-class_method)
25+
26+
Methods that can be called on a repository object are documented in [Git::Base](https://rubydoc.info/gems/git/Git/Base)
27+
2028
## v2.0.0 pre-release
2129

2230
git 2.0.0 is available as a pre-release version for testing! Please give it a try.
@@ -41,36 +49,19 @@ the feedback received during the pre-release period.
4149
The `master` branch will be used for `2.x` development. If needed, fixes for `1.x`
4250
version will be done on the `v1` branch.
4351

44-
## Homepage
45-
46-
The project source code is at:
47-
48-
http://github.com/ruby-git/ruby-git
49-
50-
## Documentation
51-
52-
Detailed documentation can be found at:
53-
54-
https://rubydoc.info/gems/git/Git.html
55-
56-
Get started by obtaining a repository object by:
57-
58-
* opening an existing working copy with [Git.open](https://rubydoc.info/gems/git/Git#open-class_method)
59-
* initializing a new repository with [Git.init](https://rubydoc.info/gems/git/Git#init-class_method)
60-
* cloning a repository with [Git.clone](https://rubydoc.info/gems/git/Git#clone-class_method)
61-
62-
Methods that can be called on a repository object are documented in [Git::Base](https://rubydoc.info/gems/git/Git/Base)
63-
6452
## Install
6553

66-
You can install Ruby/Git like this:
54+
Install the gem and add to the application's Gemfile by executing:
6755

68-
```
69-
sudo gem install git
56+
```shell
57+
bundle add git
7058
```
7159

72-
## Code Status
60+
If bundler is not being used to manage dependencies, install the gem by executing:
7361

62+
```shell
63+
gem install git
64+
```
7465

7566
## Major Objects
7667

@@ -103,12 +94,6 @@ Pass the `--all` option to `git log` as follows:
10394

10495
Here are a bunch of examples of how to use the Ruby/Git package.
10596

106-
Ruby < 1.9 will require rubygems to be loaded.
107-
108-
```ruby
109-
require 'rubygems'
110-
```
111-
11297
Require the 'git' gem.
11398
```ruby
11499
require 'git'
@@ -422,6 +407,14 @@ g.with_temp_working(dir) do
422407
end
423408
```
424409

410+
## Ruby version support policy
411+
412+
This gem will be expected to function correctly on:
413+
414+
* All non-EOL versions of the MRI Ruby on Mac, Linux, and Windows
415+
* The latest version of JRuby on Linux and Windows
416+
* The latest version of Truffle Ruby on Linus
417+
425418
## License
426419

427420
licensed under MIT License Copyright (c) 2008 Scott Chacon. See LICENSE for further details.

git.gemspec

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,22 +24,19 @@ Gem::Specification.new do |s|
2424
s.metadata['documentation_uri'] = "https://rubydoc.info/gems/#{s.name}/#{s.version}"
2525

2626
s.require_paths = ['lib']
27-
s.required_ruby_version = '>= 2.3'
28-
s.required_rubygems_version = Gem::Requirement.new('>= 0') if s.respond_to?(:required_rubygems_version=)
29-
s.requirements = ['git 1.6.0.0, or greater']
27+
s.required_ruby_version = '>= 3.0.0'
28+
s.requirements = ['git 2.28.0 or greater']
3029

3130
s.add_runtime_dependency 'addressable', '~> 2.8'
3231
s.add_runtime_dependency 'rchardet', '~> 1.8'
3332

34-
s.add_development_dependency 'bump', '~> 0.10'
35-
s.add_development_dependency 'create_github_release', '~> 0.2'
3633
s.add_development_dependency 'minitar', '~> 0.9'
3734
s.add_development_dependency 'mocha', '~> 2.1'
38-
s.add_development_dependency 'rake', '~> 13.0'
39-
s.add_development_dependency 'test-unit', '~> 3.3'
35+
s.add_development_dependency 'rake', '~> 13.1'
36+
s.add_development_dependency 'test-unit', '~> 3.6'
4037

4138
unless RUBY_PLATFORM == 'java'
42-
s.add_development_dependency 'redcarpet', '~> 3.5'
39+
s.add_development_dependency 'redcarpet', '~> 3.6'
4340
s.add_development_dependency 'yard', '~> 0.9', '>= 0.9.28'
4441
s.add_development_dependency 'yardstick', '~> 0.9'
4542
end

lib/git/lib.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1115,7 +1115,7 @@ def compare_version_to(*other_version)
11151115
end
11161116

11171117
def required_command_version
1118-
[1, 6]
1118+
[2, 28]
11191119
end
11201120

11211121
def meets_required_version?

0 commit comments

Comments
 (0)