Repository: ruby-git/ruby-git (Ruby)

Issue:
1.17.0 broke compatibility with ruby <2.7
### Subject of the issue
The addition of the `activesupport` dependency in 1.17.0 (https://github.com/ruby-git/ruby-git/pull/645) broke us (via [`danger` v8.4.*](https://github.com/danger/danger/blob/314bb927605beb862137498e36a3b4bfff413dc7/danger.gemspec#L25)):
```
ERROR:  Error installing danger:
	The last version of activesupport (>= 4.0.0) to support your Ruby & RubyGems was 6.1.7.2. Try installing it with `gem install activesupport -v 6.1.7.2` and then running the current command again
	activesupport requires Ruby version >= 2.7.0. The current ruby version is 2.6.10.210.
```

This is probably desirable in a sense (see https://github.com/ruby-git/ruby-git/issues/550), but it seems like it would merit a major version bump?

### Your environment
* version of ruby: 2.6

### Steps to reproduce
Try to install `danger` v8.6 using Ruby 2.6, which has a runtime dependency on `git ~> 1.7`.

### Expected behaviour
Success

### Actual behaviour
Failure


Discussion: I will revert the change which brought in ActiveSupport and tag it for the next major release which will also upgrade the minimum dependencies for Ruby and git. In the meantime, can you pin yourself to 1.16.0?
> In the meantime, can you pin yourself to 1.16.0?

We actually just upgraded to ruby 2.7, was not a big deal for our use case (running Danger in CI). Just thought I would flag the semver implications since the breakage was unexpected (and could potentially affect others in more serious ways).
Fixed in v1.7.1

The Ruby dependency change was inadvertent, but something I plan on doing very soon anyway.

FWIW, since Ruby MRI 2.7.x will not receive updates after March 30th, 2023, I was planning on bumping the dependency of this gem to 3.0.x. I am curious on your thoughts of that.
> FWIW, since Ruby MRI 2.7.x will not receive updates after March 30th, 2023, I was planning on bumping the dependency of this gem to 3.0.x. I am curious on your thoughts of that.

We only rely on this gem via Danger, so I think that wouldn't be an issue for us (a quick try with ruby 3.0 or 3.2 seems to cause no issues).
Thanks @gavinsharp, I appreciate the feedback.



Fix (patch):
diff --git a/README.md b/README.md
index 578cd1c6..661fad7a 100644
--- a/README.md
+++ b/README.md
@@ -3,73 +3,47 @@
 # @title README
 -->
 
-# The `git` Gem
+# The Git Gem
 
-[![Gem Version](https://badge.fury.io/rb/git.svg)](https://badge.fury.io/rb/git)
-[![Change Log](https://img.shields.io/badge/change%20log-Latest-green)](https://rubydoc.info/gems/git/file/CHANGELOG.md)
-[![Build Status](https://github.com/ruby-git/ruby-git/actions/workflows/continuous_integration.yml/badge.svg)](https://github.com/ruby-git/ruby-git/actions/workflows/continuous_integration.yml)
-[![Code Climate](https://codeclimate.com/github/ruby-git/ruby-git.png)](https://codeclimate.com/github/ruby-git/ruby-git)
-[![Source Code](https://img.shields.io/badge/source-GitHub-green)](https://github.com/ruby-git/ruby-git)
-[![Documentation](https://img.shields.io/badge/documentation-Latest-green)](https://rubydoc.info/gems/git)
-[![License: MIT](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/ruby-git/ruby-git/blob/master/LICENSE)
-
-The git Gem provides an API that can be used to create, read, and manipulate
+The Git Gem provides an API that can be used to create, read, and manipulate
 Git repositories by wrapping system calls to the `git` binary. 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.
 
-## Basic Usage
+## Homepage
 
-Get started by obtaining a repository object by:
+The project source code is at:
 
-* 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)
+http://github.com/ruby-git/ruby-git
 
-Methods that can be called on a repository object are documented in [Git::Base](https://rubydoc.info/gems/git/Git/Base)
+## Documentation
 
-## Install
+Detailed documentation can be found at:
 
-You can install the `git` gem with the following command:
+https://rubydoc.info/gems/git/Git.html
 
-```shell
-gem install git
-```
-
-## Deprecation Warnings
+Get started by obtaining a repository object by:
 
-Deprecation warnings are managed with the `Git.deprecation` attribute.
+* 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)
 
-Use this object to define deprecations in the source code:
+Methods that can be called on a repository object are documented in [Git::Base](https://rubydoc.info/gems/git/Git/Base)
 
-```ruby
-Git.deprecation.deprecate_methods(Git::Branch, stashes: 'use Git::Base#stash_list instead')
-```
+## Install
 
-The default action when using deprecated items (methods, classes, etc.) is to output
-a **DEPRECATION WARNING** to `$stderr` like the following:
+You can install Ruby/Git like this:
 
-```text
-DEPRECATION WARNING: stashes is deprecated and will be removed from git 2.0.0 (use Git::Base.stash_list instead)
 ```
-
-The action taken when a deprecated item is used is defined by setting the behavior
-on the deprecation object:
-
-```ruby
-# Log all deprecation warnings to $stderr (the default)
-Git.deprecation = :stderr
-
-# Raise an ActiveSupport::DeprecationException
-Git.deprecation = :raise
-
-# Do nothing
-Git.deprecation = :silence
+sudo gem install git
 ```
 
-See [ActiveSupport::Deprecation](https://api.rubyonrails.org/classes/ActiveSupport/Deprecation.html)
-for more details on how to use deprecations.
+## Code Status
+
+* [![Build Status](https://github.com/ruby-git/ruby-git/workflows/CI/badge.svg?branch=master)](https://github.com/ruby-git/ruby-git/actions?query=workflow%3ACI)
+* [![Code Climate](https://codeclimate.com/github/ruby-git/ruby-git.png)](https://codeclimate.com/github/ruby-git/ruby-git)
+* [![Gem Version](https://badge.fury.io/rb/git.svg)](https://badge.fury.io/rb/git)
 
 ## Major Objects
 
diff --git a/Rakefile b/Rakefile
index e2d8ef2a..8504a180 100644
--- a/Rakefile
+++ b/Rakefile
@@ -18,7 +18,7 @@ task :test do
 end
 default_tasks << :test
 
-unless RUBY_PLATFORM == 'java' || RUBY_ENGINE == 'truffleruby'
+unless RUBY_PLATFORM == 'java'
   #
   # YARD documentation for this project can NOT be built with JRuby.
   # This project uses the redcarpet gem which can not be installed on JRuby.
diff --git a/git.gemspec b/git.gemspec
index 42c4298f..50b9c140 100644
--- a/git.gemspec
+++ b/git.gemspec
@@ -26,7 +26,6 @@ Gem::Specification.new do |s|
   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.add_runtime_dependency 'activesupport', '>= 4.0.0'
   s.add_runtime_dependency 'addressable', '~> 2.8'
   s.add_runtime_dependency 'rchardet', '~> 1.8'
 
diff --git a/lib/git.rb b/lib/git.rb
index 4c2012b9..10f25d60 100644
--- a/lib/git.rb
+++ b/lib/git.rb
@@ -1,32 +1,7 @@
-require 'active_support/deprecation'
-
-module Git
-  # An object used to manage deprecations
-  #
-  # A ActiveSupport::Deprecation object used to manage the deprecations scheduled
-  # to be removed in the next major release of the `git`` gem.
-  #
-  # @example Deprecate a method
-  #   Git.deprecation.deprecate_methods(Git::Branch, stashes: 'use Git::Base#stash_list instead')
-  #
-  # @example Set the deprecation behavior
-  #   # Log all deprecation warnings to $stderr (the default)
-  #   Git.deprecation.behavior = :stderr
-  #
-  #   # Raise an ActiveSupport::DeprecationException
-  #   Git.deprecation.behavior = :raise
-  #
-  #   # Do nothing
-  #   Git.deprecation.behavior = :raise
-  #
-  # @see https://api.rubyonrails.org/classes/ActiveSupport/Deprecation.html ActiveSupport::Deprecation
-  #
-  # @return [ActiveSupport::Deprecation]
-  #
-  def self.deprecation
-    @deprecation ||= ActiveSupport::Deprecation.new('2.0.0', 'git')
-  end
-end
+# Add the directory containing this file to the start of the load path if it
+# isn't there already.
+$:.unshift(File.dirname(__FILE__)) unless
+  $:.include?(File.dirname(__FILE__)) || $:.include?(File.expand_path(File.dirname(__FILE__)))
 
 require 'git/author'
 require 'git/base'