diff --git a/.github/workflows/linters.yml b/.github/workflows/linters.yml index 1e3fc42..d448b59 100644 --- a/.github/workflows/linters.yml +++ b/.github/workflows/linters.yml @@ -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 diff --git a/.github/workflows/specs_rails60.yml b/.github/workflows/specs_rails60.yml deleted file mode 100644 index 2f2b48d..0000000 --- a/.github/workflows/specs_rails60.yml +++ /dev/null @@ -1,42 +0,0 @@ ---- -name: Specs Rails 6.0 - -on: - push: - branches: - - main - pull_request: - branches: - - main - -jobs: - tests: - runs-on: ubuntu-latest - - strategy: - matrix: - ruby: ['2.6', '2.7'] - gemfile: ['rails60_activeadmin22', 'rails60_activeadmin'] - - env: - BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile - - steps: - - name: Checkout repository - uses: actions/checkout@v2 - - - name: Set up Ruby - uses: ruby/setup-ruby@v1 - with: - ruby-version: ${{ matrix.ruby }} - bundler-cache: true - - - name: Run tests - run: bundle exec rspec --profile - - - name: On failure, archive screenshots as artifacts - uses: actions/upload-artifact@v2 - if: failure() - with: - name: test-failed-screenshots - path: spec/dummy/tmp/screenshots diff --git a/.github/workflows/specs_rails61.yml b/.github/workflows/specs_rails61.yml index 0b817f0..da0d8f7 100644 --- a/.github/workflows/specs_rails61.yml +++ b/.github/workflows/specs_rails61.yml @@ -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: diff --git a/.rubocop.yml b/.rubocop.yml index b0c80ba..4cec750 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -16,6 +16,7 @@ AllCops: - spec/dummy/**/* - vendor/**/* NewCops: enable + TargetRubyVersion: 3.0 RSpec/ExampleLength: # default 5 diff --git a/README.md b/README.md index 652df72..c67eb48 100644 --- a/README.md +++ b/README.md @@ -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): diff --git a/activeadmin_quill_editor.gemspec b/activeadmin_quill_editor.gemspec index f4e70ec..7f41071 100644 --- a/activeadmin_quill_editor.gemspec +++ b/activeadmin_quill_editor.gemspec @@ -14,7 +14,7 @@ Gem::Specification.new do |spec| spec.email = 'mat@blocknot.es' 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' @@ -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 diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb index 5ab7b81..584edee 100644 --- a/spec/rails_helper.rb +++ b/spec/rails_helper.rb @@ -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 @@ -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! diff --git a/spec/support/capybara_cuprite.rb b/spec/support/capybara_cuprite.rb index 0db5cd8..cfdc076 100644 --- a/spec/support/capybara_cuprite.rb +++ b/spec/support/capybara_cuprite.rb @@ -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 diff --git a/spec/system/quill_editor_spec.rb b/spec/system/quill_editor_spec.rb index 282df2a..97e89e7 100644 --- a/spec/system/quill_editor_spec.rb +++ b/spec/system/quill_editor_spec.rb @@ -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: 'some_email@example.com', name: 'John Doe', age: 30) } let!(:post) { Post.create!(title: 'Test', author: author, description: 'Some content...') } diff --git a/spec/system/quill_js_spec.rb b/spec/system/quill_js_spec.rb index 50c93ba..2ee79c2 100644 --- a/spec/system/quill_js_spec.rb +++ b/spec/system/quill_js_spec.rb @@ -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'