Skip to content

Commit

Permalink
Merge pull request #129 from SuperTux88/update-ruby-and-gems
Browse files Browse the repository at this point in the history
Update ruby to 3.2 and update gems
  • Loading branch information
SuperTux88 committed Jun 11, 2023
2 parents c8c2523 + 9298b2a commit 758ca03
Show file tree
Hide file tree
Showing 17 changed files with 155 additions and 298 deletions.
26 changes: 20 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,39 @@ on:

jobs:
test:
name: 'Ruby: ${{ matrix.ruby }}, Rails: ${{ matrix.rails }}'
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ruby:
- "3.2"
- "3.1"
- "3.0"
- "2.7"
gemfile:
- Gemfile
- test/gemfiles/no-rails.Gemfile
rails:
- "7.0"
- "6.1"
- "6.0"
- "5.2"
- "none"
exclude:
- ruby: "3.2"
rails: "5.2"
- ruby: "3.1"
rails: "5.2"
- ruby: "3.0"
rails: "5.2"
env:
BUNDLE_GEMFILE: ${{ matrix.gemfile }}
RAILS_VERSION: ${{ matrix.rails }}
BUNDLE_WITHOUT: development
BUNDLE_FROZEN: true
BUNDLE_DISABLE_SHARED_GEMS: true
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Delete Gemfile.lock
run: rm Gemfile.lock
if: matrix.rails != '7.0' # Gemfile.lock is only generated for latest rails version
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
Expand Down
4 changes: 4 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,10 @@ Rails/NegateInclude:
Rails/RakeEnvironment:
Enabled: false

# only available on rails >= 6.0
Rails/IndexWith:
Enabled: false

Lint/ConstantDefinitionInBlock:
Exclude:
- "spec/**/*"
Expand Down
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.1
3.2
28 changes: 19 additions & 9 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ gemspec name: "diaspora_federation"

Dir["diaspora_federation-*.gemspec"].each do |gemspec|
plugin = gemspec.scan(/diaspora_federation-(.*)\.gemspec/).flatten.first
gemspec(name: "diaspora_federation-#{plugin}", development_group: plugin)
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
Expand All @@ -19,10 +21,10 @@ end

group :development do
# code style
gem "pronto", "0.11.0", require: false
gem "pronto-rubocop", "0.11.2", require: false
gem "rubocop", "1.32.0", require: false
gem "rubocop-rails", "2.15.2", require: false
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
Expand All @@ -42,11 +44,11 @@ group :test do
gem "nyan-cat-formatter", require: false

# test coverage
gem "simplecov", "0.21.2", require: false
gem "simplecov", "0.22.0", require: false
gem "simplecov-rcov", "0.3.1", require: false

# test helpers
gem "json-schema", "~> 3.0"
gem "json-schema", "~> 4.0"
gem "rspec-collection_matchers", "~> 1.2.0"
gem "rspec-json_expectations", "~> 2.1"
gem "webmock", "~> 3.0"
Expand All @@ -56,6 +58,14 @@ group :development, :test do
gem "rake"

# unit tests
gem "rspec", "~> 3.11.0"
gem "rspec-rails", "~> 5.1.2"
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
Loading

0 comments on commit 758ca03

Please sign in to comment.