зеркало из
https://github.com/rs-pro/activeadmin-quill_editor.git
synced 2026-09-03 10:16:18 +03:00
feat: Add ActiveAdmin 4 and Propshaft support
- Switch to ActiveAdmin 4 beta with Tailwind CSS - Replace Sprockets with Propshaft for Rails 8 - Migrate from jQuery to vanilla JavaScript - Implement proper module initialization without setTimeout hacks - Add esbuild for JavaScript bundling with clean import aliases - Configure Tailwind CSS build process with ActiveAdmin plugin - Update engine configuration for both Propshaft and Sprockets - Add comprehensive documentation for AA4 gem updates - Maintain backward compatibility with legacy AA versions 🤖 Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com>
Этот коммит содержится в:
155
.github/workflows/specs.yml
поставляемый
Обычный файл
155
.github/workflows/specs.yml
поставляемый
Обычный файл
@@ -0,0 +1,155 @@
|
||||
---
|
||||
name: Specs
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [main, master]
|
||||
push:
|
||||
branches: [main, master]
|
||||
|
||||
jobs:
|
||||
test_legacy:
|
||||
runs-on: ubuntu-latest
|
||||
name: Ruby ${{ matrix.ruby }} / Rails ${{ matrix.rails }} / AA ${{ matrix.activeadmin }}
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
# Legacy ActiveAdmin 2.x/3.x support
|
||||
- ruby: '3.0'
|
||||
rails: '7.0'
|
||||
activeadmin: '~> 2.9'
|
||||
- ruby: '3.1'
|
||||
rails: '7.1'
|
||||
activeadmin: '~> 3.0'
|
||||
- ruby: '3.2'
|
||||
rails: '7.2'
|
||||
activeadmin: '~> 3.0'
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Ruby
|
||||
uses: ruby/setup-ruby@v1
|
||||
with:
|
||||
ruby-version: ${{ matrix.ruby }}
|
||||
bundler-cache: false
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
gem install bundler
|
||||
bundle config set --local without 'development'
|
||||
bundle install --jobs 4 --retry 3
|
||||
env:
|
||||
RAILS_VERSION: ${{ matrix.rails }}
|
||||
ACTIVEADMIN_VERSION: ${{ matrix.activeadmin }}
|
||||
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '20'
|
||||
|
||||
- name: Install NPM dependencies
|
||||
run: |
|
||||
cd spec/dummy
|
||||
npm install
|
||||
|
||||
- name: Build assets
|
||||
run: |
|
||||
cd spec/dummy
|
||||
npm run build
|
||||
|
||||
- name: Run tests
|
||||
run: bundle exec rspec --profile
|
||||
env:
|
||||
RAILS_VERSION: ${{ matrix.rails }}
|
||||
ACTIVEADMIN_VERSION: ${{ matrix.activeadmin }}
|
||||
|
||||
- name: Archive screenshots on failure
|
||||
uses: actions/upload-artifact@v4
|
||||
if: failure()
|
||||
with:
|
||||
name: test-screenshots-legacy-${{ matrix.ruby }}-${{ matrix.rails }}
|
||||
path: spec/dummy/tmp/capybara
|
||||
|
||||
test_activeadmin_4:
|
||||
runs-on: ubuntu-latest
|
||||
name: Ruby ${{ matrix.ruby }} / Rails ${{ matrix.rails }} / AA 4.x
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
ruby: ['3.2', '3.3']
|
||||
rails: ['7.2', '8.0']
|
||||
exclude:
|
||||
# Rails 8 requires Ruby 3.2+
|
||||
- ruby: '3.1'
|
||||
rails: '8.0'
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Ruby
|
||||
uses: ruby/setup-ruby@v1
|
||||
with:
|
||||
ruby-version: ${{ matrix.ruby }}
|
||||
bundler-cache: false
|
||||
|
||||
- name: Install dependencies for AA4
|
||||
run: |
|
||||
gem install bundler
|
||||
bundle config set --local without 'development'
|
||||
bundle add activeadmin --version '~> 4.0.0.beta' --skip-install
|
||||
bundle add importmap-rails --skip-install
|
||||
bundle add propshaft --skip-install if [ "${{ matrix.rails }}" = "7.2" ]
|
||||
bundle install --jobs 4 --retry 3
|
||||
env:
|
||||
RAILS_VERSION: ${{ matrix.rails }}
|
||||
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '20'
|
||||
|
||||
- name: Install NPM dependencies
|
||||
run: |
|
||||
cd spec/dummy
|
||||
npm install
|
||||
npm install @activeadmin/activeadmin@^4.0.0-beta
|
||||
|
||||
- name: Build assets
|
||||
run: |
|
||||
cd spec/dummy
|
||||
npm run build
|
||||
|
||||
- name: Run tests
|
||||
run: bundle exec rspec --profile
|
||||
env:
|
||||
RAILS_VERSION: ${{ matrix.rails }}
|
||||
ACTIVEADMIN_VERSION: '4.0'
|
||||
|
||||
- name: Archive screenshots on failure
|
||||
uses: actions/upload-artifact@v4
|
||||
if: failure()
|
||||
with:
|
||||
name: test-screenshots-aa4-${{ matrix.ruby }}-${{ matrix.rails }}
|
||||
path: spec/dummy/tmp/capybara
|
||||
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Ruby
|
||||
uses: ruby/setup-ruby@v1
|
||||
with:
|
||||
ruby-version: '3.2'
|
||||
bundler-cache: true
|
||||
|
||||
- name: Run RuboCop
|
||||
run: bundle exec rubocop --parallel
|
||||
32
.github/workflows/specs_rails80.yml
поставляемый
32
.github/workflows/specs_rails80.yml
поставляемый
@@ -13,7 +13,7 @@ jobs:
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
ruby: ['3.2', '3.4']
|
||||
ruby: ['3.2', '3.3']
|
||||
|
||||
env:
|
||||
RAILS_VERSION: 8.0
|
||||
@@ -26,10 +26,32 @@ jobs:
|
||||
uses: ruby/setup-ruby@v1
|
||||
with:
|
||||
ruby-version: ${{ matrix.ruby }}
|
||||
bundler-cache: true
|
||||
bundler-cache: false
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
gem install bundler
|
||||
bundle install --jobs 4 --retry 3
|
||||
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '20'
|
||||
|
||||
- name: Install NPM dependencies
|
||||
run: |
|
||||
cd spec/dummy
|
||||
npm install
|
||||
|
||||
- name: Build assets
|
||||
run: |
|
||||
cd spec/dummy
|
||||
npm run build
|
||||
|
||||
- name: Database setup
|
||||
run: bin/rails db:create db:migrate db:test:prepare
|
||||
run: |
|
||||
cd spec/dummy
|
||||
bundle exec rails db:create db:migrate db:test:prepare
|
||||
|
||||
- name: Run tests
|
||||
run: bundle exec rspec --profile
|
||||
@@ -38,5 +60,5 @@ jobs:
|
||||
uses: actions/upload-artifact@v4
|
||||
if: failure()
|
||||
with:
|
||||
name: test-failed-screenshots
|
||||
path: spec/dummy/tmp/screenshots
|
||||
name: test-failed-screenshots-rails8-${{ matrix.ruby }}
|
||||
path: spec/dummy/tmp/capybara
|
||||
|
||||
Ссылка в новой задаче
Block a user