Skip to content

Commit

Permalink
Update minimum required version of Ruby and Git (#685)
Browse files Browse the repository at this point in the history
* Update min required version of Ruby and Git

Signed-off-by: James Couball <jcouball@yahoo.com>
  • Loading branch information
jcouball committed Jan 14, 2024
1 parent 4979923 commit f48930d
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 43 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/continuous_integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@ jobs:
strategy:
fail-fast: false
matrix:
ruby: [2.7, 3.0, 3.1, 3.2]
ruby: [3.0, 3.1, 3.2, 3.3]
operating-system: [ubuntu-latest]
include:
- ruby: head
operating-system: ubuntu-latest
- ruby: truffleruby-head
- ruby: truffleruby-23.1.1
operating-system: ubuntu-latest
- ruby: 2.7
- ruby: 3.0
operating-system: windows-latest
- ruby: jruby-head
- ruby: jruby-9.4.5.0
operating-system: windows-latest

name: Ruby ${{ matrix.ruby }} on ${{ matrix.operating-system }}
Expand Down
53 changes: 23 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,14 @@ command line. The API can be used for working with Git in complex interactions
including branching and merging, object inspection and manipulation, history, patch
generation and more.

Get started by obtaining a repository object by:

* opening an existing working copy with [Git.open](https://rubydoc.info/gems/git/Git#open-class_method)
* initializing a new repository with [Git.init](https://rubydoc.info/gems/git/Git#init-class_method)
* cloning a repository with [Git.clone](https://rubydoc.info/gems/git/Git#clone-class_method)

Methods that can be called on a repository object are documented in [Git::Base](https://rubydoc.info/gems/git/Git/Base)

## v2.0.0 pre-release

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

## Homepage

The project source code is at:

http://github.com/ruby-git/ruby-git

## Documentation

Detailed documentation can be found at:

https://rubydoc.info/gems/git/Git.html

Get started by obtaining a repository object by:

* opening an existing working copy with [Git.open](https://rubydoc.info/gems/git/Git#open-class_method)
* initializing a new repository with [Git.init](https://rubydoc.info/gems/git/Git#init-class_method)
* cloning a repository with [Git.clone](https://rubydoc.info/gems/git/Git#clone-class_method)

Methods that can be called on a repository object are documented in [Git::Base](https://rubydoc.info/gems/git/Git/Base)

## Install

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

```
sudo gem install git
```shell
bundle add git
```

## Code Status
If bundler is not being used to manage dependencies, install the gem by executing:

```shell
gem install git
```

## Major Objects

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

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

Ruby < 1.9 will require rubygems to be loaded.

```ruby
require 'rubygems'
```

Require the 'git' gem.
```ruby
require 'git'
Expand Down Expand Up @@ -422,6 +407,14 @@ g.with_temp_working(dir) do
end
```

## Ruby version support policy

This gem will be expected to function correctly on:

* All non-EOL versions of the MRI Ruby on Mac, Linux, and Windows
* The latest version of JRuby on Linux and Windows
* The latest version of Truffle Ruby on Linus

## License

licensed under MIT License Copyright (c) 2008 Scott Chacon. See LICENSE for further details.
13 changes: 5 additions & 8 deletions git.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -24,22 +24,19 @@ Gem::Specification.new do |s|
s.metadata['documentation_uri'] = "https://rubydoc.info/gems/#{s.name}/#{s.version}"

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

s.add_runtime_dependency 'addressable', '~> 2.8'
s.add_runtime_dependency 'rchardet', '~> 1.8'

s.add_development_dependency 'bump', '~> 0.10'
s.add_development_dependency 'create_github_release', '~> 0.2'
s.add_development_dependency 'minitar', '~> 0.9'
s.add_development_dependency 'mocha', '~> 2.1'
s.add_development_dependency 'rake', '~> 13.0'
s.add_development_dependency 'test-unit', '~> 3.3'
s.add_development_dependency 'rake', '~> 13.1'
s.add_development_dependency 'test-unit', '~> 3.6'

unless RUBY_PLATFORM == 'java'
s.add_development_dependency 'redcarpet', '~> 3.5'
s.add_development_dependency 'redcarpet', '~> 3.6'
s.add_development_dependency 'yard', '~> 0.9', '>= 0.9.28'
s.add_development_dependency 'yardstick', '~> 0.9'
end
Expand Down
2 changes: 1 addition & 1 deletion lib/git/lib.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1115,7 +1115,7 @@ def compare_version_to(*other_version)
end

def required_command_version
[1, 6]
[2, 28]
end

def meets_required_version?
Expand Down

0 comments on commit f48930d

Please sign in to comment.