Before we only tested with the latest rails version and without rails, that made it possible to accidentally break with older rails versions without noticing it. The old way of keeping separate Gemfiles (and lockfiles) was too complicated to keep up to date, especially with many supported rails versions. This allows now to run with different rails version with just the same Gemfile using an env-var. For CI the Gemfile.lock is only used for the latest rails version (7.0 at the moment), as it obviously doesn't fit for other versions. I think that's fine, as if we are not compatible with a too new version of something, we need to add a maximum version there anyway. The `ruby/setup-ruby@v1` step automatically uses the deployment mode when a Gemfile.lock is present, so the `BUNDLE_FROZEN` env-var is not required, even if a Gemfile.lock is used.
71 lines
2.1 KiB
Ruby
71 lines
2.1 KiB
Ruby
# frozen_string_literal: true
|
|
|
|
source "https://rubygems.org"
|
|
|
|
# Declare your gem's dependencies in diaspora_federation.gemspec.
|
|
# Bundler will treat runtime dependencies like base dependencies, and
|
|
# development dependencies will be added by default to the :development group.
|
|
gemspec name: "diaspora_federation"
|
|
|
|
Dir["diaspora_federation-*.gemspec"].each do |gemspec|
|
|
plugin = gemspec.scan(/diaspora_federation-(.*)\.gemspec/).flatten.first
|
|
unless ENV["RAILS_VERSION"] == "none" && plugin == "rails"
|
|
gemspec(name: "diaspora_federation-#{plugin}", development_group: plugin)
|
|
end
|
|
end
|
|
|
|
# Declare any dependencies that are still in development here instead of in
|
|
# your gemspec. These might include edge Rails or gems from your path or
|
|
# Git. Remember to move these dependencies to your gemspec before releasing
|
|
# your gem to rubygems.org.
|
|
|
|
group :development do
|
|
# code style
|
|
gem "pronto", "0.11.1", require: false
|
|
gem "pronto-rubocop", "0.11.5", require: false
|
|
gem "rubocop", "1.52.0", require: false
|
|
gem "rubocop-rails", "2.19.1", require: false
|
|
gem "rubocop-rake", "0.6.0", require: false
|
|
|
|
# debugging
|
|
gem "pry"
|
|
gem "pry-byebug"
|
|
|
|
# documentation
|
|
gem "yard", require: false
|
|
|
|
# rails needs this for development
|
|
gem "listen"
|
|
end
|
|
|
|
group :test do
|
|
# rspec formatter
|
|
gem "fuubar", "2.5.1", require: false
|
|
gem "nyan-cat-formatter", require: false
|
|
|
|
# test coverage
|
|
gem "simplecov", "0.22.0", require: false
|
|
gem "simplecov-rcov", "0.3.1", require: false
|
|
|
|
# test helpers
|
|
gem "json-schema", "~> 4.0"
|
|
gem "rspec-collection_matchers", "~> 1.2.0"
|
|
gem "rspec-json_expectations", "~> 2.1"
|
|
gem "webmock", "~> 3.0"
|
|
end
|
|
|
|
group :development, :test do
|
|
gem "rake"
|
|
|
|
# unit tests
|
|
gem "rspec", "~> 3.12.0"
|
|
|
|
unless ENV["RAILS_VERSION"] == "none"
|
|
gem "rspec-rails", "~> 5.1.2"
|
|
|
|
# The default rails version needs to be kept up to date also in:
|
|
# - test/dummy/config/application.rb (config.load_defaults)
|
|
# - .github/workflows/ci.yml ('Delete Gemfile.lock' step)
|
|
gem "actionpack", "~> #{ENV['RAILS_VERSION'] || '7.0'}.0"
|
|
end
|
|
end
|