# NOTE: It is preferable to list development dependencies in the gemspec due to increased
#       visibility and discoverability on RubyGems.org.
#       However, this gem sits underneath all my other gems, and also "depends on" many of them.
#       So instead of depending on them directly it injects them into the other gem's gemspec on install.
#       This gem, and its injected dev dependencies, will install on Ruby down to 2.3.x.
#       This gem does not inject runtime dependencies.
#       Thus, dev dependencies injected into gemspecs must have
#
#       required_ruby_version ">= 2.3" (or lower)
#
#       Development dependencies that require strictly newer Ruby versions should be in a "gemfile",
#       and preferably a modular one (see gemfiles/modular/*.gemfile).

# Security
gem "bundler-audit", "~> 0.9.2"                       # ruby >= 2.0.0

# Tasks
gem "rake", "~> 13.0"                                 # ruby >= 2.2.0

# Debugging
gem "require_bench", "~> 1.0", ">= 1.0.4"             # ruby >= 2.2.0

# Testing
gem "appraisal2", "~> 3.0"                            # ruby >= 1.8.7, for testing against multiple versions of dependencies
gem "kettle-test", "~> 1.0"                           # ruby >= 2.3
gem "rspec-pending_for"                                 # ruby >= 2.3, used to skip specs on incompatible Rubies

# Releasing
gem "ruby-progressbar", "~> 1.13"                     # ruby >= 0
gem "stone_checksums", "~> 1.0", ">= 1.0.2"           # ruby >= 2.2.0

# Git integration (optional)
# The 'git' gem is optional; kettle-dev falls back to shelling out to `git` if it is not present.
# The current release of the git gem depends on activesupport, which makes it too heavy to depend on directly
# Compatibility with the git gem is tested via appraisals instead.
# gem("git", ">= 1.19.1")                               # ruby >= 2.3

# Development tasks
gem "gitmoji-regex", "~> 1.0", ">= 1.0.3"             # ruby >= 2.3.0

# The cake is a lie. erb v2.2, the oldest release on RubyGems.org, was never compatible with Ruby 2.3.
# This means we have no choice but to use the erb that shipped with Ruby 2.3
# /opt/hostedtoolcache/Ruby/2.3.8/x64/lib/ruby/gems/2.3.0/gems/erb-2.2.2/lib/erb.rb:670:in `prepare_trim_mode': undefined method `match?' for "-":String (NoMethodError)
# gem "erb", ">= 2.2"                                   # ruby >= 2.3.0, not SemVer, old rubies get dropped in a patch.

# HTTP recording for deterministic specs
# It seems that somehow just having a newer version of appraisal installed breaks
#   Ruby 2.3 and 2.4 even if their bundle specifies an older version,
#   and as a result it can only be a dependency in the appraisals.
# | An error occurred while loading spec_helper.
# | Failure/Error: require "vcr"
# |
# | NoMethodError:
# |   undefined method `delete_prefix' for "CONTENT_LENGTH":String
# | # ./spec/config/vcr.rb:3:in `require'
# | # ./spec/config/vcr.rb:3:in `<top (required)>'
# | # ./spec/spec_helper.rb:8:in `require_relative'
# | # ./spec/spec_helper.rb:8:in `<top (required)>'
# gem "vcr", ">= 4"                    # 6.0 claims to support ruby >= 2.3, but fails on ruby 2.4
# gem "webmock", ">= 3"                # Last version to support ruby >= 2.3
