зеркало из
https://github.com/rs-pro/activeadmin-quill_editor.git
synced 2026-09-06 03:35:50 +03:00
refactor!: update minimum Ruby version to 3.0
Этот коммит содержится в:
2
.github/workflows/linters.yml
поставляемый
2
.github/workflows/linters.yml
поставляемый
@@ -19,7 +19,7 @@ jobs:
|
|||||||
- name: Set up Ruby
|
- name: Set up Ruby
|
||||||
uses: ruby/setup-ruby@v1
|
uses: ruby/setup-ruby@v1
|
||||||
with:
|
with:
|
||||||
ruby-version: '2.7'
|
ruby-version: '3.0'
|
||||||
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
|
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
|
||||||
|
|
||||||
- uses: reviewdog/action-setup@v1
|
- uses: reviewdog/action-setup@v1
|
||||||
|
|||||||
42
.github/workflows/specs_rails60.yml
поставляемый
42
.github/workflows/specs_rails60.yml
поставляемый
@@ -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
|
|
||||||
2
.github/workflows/specs_rails61.yml
поставляемый
2
.github/workflows/specs_rails61.yml
поставляемый
@@ -15,7 +15,7 @@ jobs:
|
|||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
ruby: ['2.6', '2.7', '3.0']
|
ruby: ['3.0', '3.1', '3.2']
|
||||||
gemfile: ['rails61_activeadmin29', 'rails61_activeadmin']
|
gemfile: ['rails61_activeadmin29', 'rails61_activeadmin']
|
||||||
|
|
||||||
env:
|
env:
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ AllCops:
|
|||||||
- spec/dummy/**/*
|
- spec/dummy/**/*
|
||||||
- vendor/**/*
|
- vendor/**/*
|
||||||
NewCops: enable
|
NewCops: enable
|
||||||
|
TargetRubyVersion: 3.0
|
||||||
|
|
||||||
RSpec/ExampleLength:
|
RSpec/ExampleLength:
|
||||||
# default 5
|
# default 5
|
||||||
|
|||||||
@@ -13,6 +13,8 @@ Please :star: if you like it.
|
|||||||
|
|
||||||
## Install
|
## 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*)
|
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):
|
If you installed Active Admin without Webpacker support (default for now):
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ Gem::Specification.new do |spec|
|
|||||||
spec.email = 'mat@blocknot.es'
|
spec.email = 'mat@blocknot.es'
|
||||||
spec.homepage = 'https://github.com/blocknotes/activeadmin_quill_editor'
|
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['homepage_uri'] = spec.homepage
|
||||||
spec.metadata['changelog_uri'] = 'https://github.com/blocknotes/activeadmin_quill_editor/blob/main/CHANGELOG.md'
|
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_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
|
end
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ require 'rspec/rails'
|
|||||||
require 'capybara/rails'
|
require 'capybara/rails'
|
||||||
require 'rspec/retry'
|
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.
|
# Force deprecations to raise an exception.
|
||||||
ActiveSupport::Deprecation.behavior = :raise
|
ActiveSupport::Deprecation.behavior = :raise
|
||||||
@@ -27,7 +27,7 @@ rescue ActiveRecord::PendingMigrationError => e
|
|||||||
end
|
end
|
||||||
|
|
||||||
RSpec.configure do |config|
|
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.infer_spec_type_from_file_location!
|
||||||
config.filter_rails_from_backtrace!
|
config.filter_rails_from_backtrace!
|
||||||
|
|
||||||
|
|||||||
@@ -9,18 +9,16 @@ Capybara.register_driver(:cuprite) do |app|
|
|||||||
|
|
||||||
Capybara::Cuprite::Driver.new(
|
Capybara::Cuprite::Driver.new(
|
||||||
app,
|
app,
|
||||||
**{
|
window_size: [1600, 1280],
|
||||||
window_size: [1600, 1280],
|
# See additional options for Dockerized environment in the respective section of this article
|
||||||
# See additional options for Dockerized environment in the respective section of this article
|
browser_options: browser_options,
|
||||||
browser_options: browser_options,
|
# Increase Chrome startup wait time (required for stable CI builds)
|
||||||
# Increase Chrome startup wait time (required for stable CI builds)
|
process_timeout: 20,
|
||||||
process_timeout: 20,
|
# The number of seconds we'll wait for a response when communicating with browser. Default is 5
|
||||||
# The number of seconds we'll wait for a response when communicating with browser. Default is 5
|
timeout: 20,
|
||||||
timeout: 20,
|
# Enable debugging capabilities
|
||||||
# Enable debugging capabilities
|
inspector: true,
|
||||||
inspector: true,
|
# Allow running Chrome in a headful mode by setting HEADLESS env var to a falsey value
|
||||||
# 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])
|
||||||
headless: !ENV['CUPRITE_HEADLESS'].in?(%w[n 0 no false])
|
|
||||||
}
|
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# frozen_string_literal: true
|
# 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(:author) { Author.create!(email: 'some_email@example.com', name: 'John Doe', age: 30) }
|
||||||
let!(:post) { Post.create!(title: 'Test', author: author, description: 'Some content...') }
|
let!(:post) { Post.create!(title: 'Test', author: author, description: 'Some content...') }
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# frozen_string_literal: true
|
# 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
|
it 'has a Javascript function defined and returns the version', :aggregate_failures do
|
||||||
visit '/admin/posts'
|
visit '/admin/posts'
|
||||||
|
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user