Skip to content

Commit

Permalink
refactor!: update minimum Ruby version to 3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Mattia Roccoberton committed Feb 25, 2024
1 parent 22a1c87 commit ce65cfb
Show file tree
Hide file tree
Showing 10 changed files with 22 additions and 63 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/linters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '2.7'
ruby-version: '3.0'
bundler-cache: true # runs 'bundle install' and caches installed gems automatically

- uses: reviewdog/action-setup@v1
Expand Down
42 changes: 0 additions & 42 deletions .github/workflows/specs_rails60.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/specs_rails61.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:

strategy:
matrix:
ruby: ['2.6', '2.7', '3.0']
ruby: ['3.0', '3.1', '3.2']
gemfile: ['rails61_activeadmin29', 'rails61_activeadmin']

env:
Expand Down
1 change: 1 addition & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ AllCops:
- spec/dummy/**/*
- vendor/**/*
NewCops: enable
TargetRubyVersion: 3.0

RSpec/ExampleLength:
# default 5
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ Please :star: if you like it.

## Install

_NOTE_: Ruby 2.7 is supported until version 1.1.0

After installing Active Admin, add to your Gemfile: `gem 'activeadmin_quill_editor'` (and execute *bundle*)

If you installed Active Admin without Webpacker support (default for now):
Expand Down
4 changes: 2 additions & 2 deletions activeadmin_quill_editor.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Gem::Specification.new do |spec|
spec.email = '[email protected]'
spec.homepage = 'https://github.com/blocknotes/activeadmin_quill_editor'

spec.required_ruby_version = '>= 2.6.0'
spec.required_ruby_version = '>= 3.0'

spec.metadata['homepage_uri'] = spec.homepage
spec.metadata['changelog_uri'] = 'https://github.com/blocknotes/activeadmin_quill_editor/blob/main/CHANGELOG.md'
Expand All @@ -27,5 +27,5 @@ Gem::Specification.new do |spec|

spec.add_runtime_dependency 'activeadmin', '>= 2.0', '< 4'

spec.add_development_dependency 'appraisal', '~> 2.4'
spec.add_development_dependency 'appraisal', '~> 2.4' # rubocop:disable Gemspec/DevelopmentDependencies
end
4 changes: 2 additions & 2 deletions spec/rails_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
require 'capybara/rails'
require 'rspec/retry'

Dir[File.expand_path('support/**/*.rb', __dir__)].sort.each { |f| require f }
Dir[File.expand_path('support/**/*.rb', __dir__)].each { |f| require f }

# Force deprecations to raise an exception.
ActiveSupport::Deprecation.behavior = :raise
Expand All @@ -27,7 +27,7 @@
end

RSpec.configure do |config|
config.fixture_path = "#{::Rails.root}/spec/fixtures"
config.fixture_path = Rails.root.join('spec/fixtures').to_s
config.infer_spec_type_from_file_location!
config.filter_rails_from_backtrace!

Expand Down
24 changes: 11 additions & 13 deletions spec/support/capybara_cuprite.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,16 @@

Capybara::Cuprite::Driver.new(
app,
**{
window_size: [1600, 1280],
# See additional options for Dockerized environment in the respective section of this article
browser_options: browser_options,
# Increase Chrome startup wait time (required for stable CI builds)
process_timeout: 20,
# The number of seconds we'll wait for a response when communicating with browser. Default is 5
timeout: 20,
# Enable debugging capabilities
inspector: true,
# Allow running Chrome in a headful mode by setting HEADLESS env var to a falsey value
headless: !ENV['CUPRITE_HEADLESS'].in?(%w[n 0 no false])
}
window_size: [1600, 1280],
# See additional options for Dockerized environment in the respective section of this article
browser_options: browser_options,
# Increase Chrome startup wait time (required for stable CI builds)
process_timeout: 20,
# The number of seconds we'll wait for a response when communicating with browser. Default is 5
timeout: 20,
# Enable debugging capabilities
inspector: true,
# Allow running Chrome in a headful mode by setting HEADLESS env var to a falsey value
headless: !ENV['CUPRITE_HEADLESS'].in?(%w[n 0 no false])
)
end
2 changes: 1 addition & 1 deletion spec/system/quill_editor_spec.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

RSpec.describe 'Quill editor', type: :system do
RSpec.describe 'Quill editor' do
let(:author) { Author.create!(email: '[email protected]', name: 'John Doe', age: 30) }
let!(:post) { Post.create!(title: 'Test', author: author, description: 'Some content...') }

Expand Down
2 changes: 1 addition & 1 deletion spec/system/quill_js_spec.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

RSpec.describe 'Quill JS', type: :system do
RSpec.describe 'Quill JS' do
it 'has a Javascript function defined and returns the version', :aggregate_failures do
visit '/admin/posts'

Expand Down

0 comments on commit ce65cfb

Please sign in to comment.