Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/workflows/linters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,17 @@ jobs:
name: Reviewdog
runs-on: ubuntu-latest

env:
RAILS_VERSION: 7.0.0

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '2.7'
ruby-version: '3.0'
bundler-cache: true

- name: Set up Reviewdog
Expand Down
43 changes: 43 additions & 0 deletions .github/workflows/specs_rails61.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
name: Specs Rails 6.1 with ActiveAdmin 2.9

on:
pull_request:
branches: [main]
push:
branches: [main]

jobs:
test:
runs-on: ubuntu-latest

strategy:
matrix:
ruby: ['3.0']

env:
RAILS_VERSION: 6.0
ACTIVEADMIN_VERSION: 2.9.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: true

- name: Database setup
run: bin/rails db:reset db:test:prepare

- name: Run tests
run: bundle exec rspec --profile

- name: On failure, archive screenshots as artifacts
uses: actions/upload-artifact@v4
if: failure()
with:
name: test-failed-screenshots
path: spec/dummy/tmp/screenshots
3 changes: 1 addition & 2 deletions .github/workflows/specs_rails70.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,9 @@ jobs:
strategy:
matrix:
ruby: ['3.0', '3.2']
gemfile: ['rails70_activeadmin']

env:
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile
RAILS_VERSION: 7.0.0

steps:
- name: Checkout repository
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/specs_rails71.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,9 @@ jobs:
strategy:
matrix:
ruby: ['3.2', '3.4']
gemfile: ['rails71_activeadmin']

env:
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile
RAILS_VERSION: 7.1.0

steps:
- name: Checkout repository
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/specs_rails72.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,9 @@ jobs:
strategy:
matrix:
ruby: ['3.2', '3.4']
gemfile: ['rails72_activeadmin']

env:
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile
RAILS_VERSION: 7.2.0

steps:
- name: Checkout repository
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/specs_rails80.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,9 @@ jobs:
strategy:
matrix:
ruby: ['3.2', '3.4']
gemfile: ['rails80_activeadmin']

env:
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile
RAILS_VERSION: 8.0.0

steps:
- name: Checkout repository
Expand Down
1 change: 1 addition & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ require:
- rubocop-rspec

AllCops:
TargetRubyVersion: 3.0
Exclude:
- bin/*
- db/schema.rb
Expand Down
46 changes: 0 additions & 46 deletions Appraisals

This file was deleted.

41 changes: 18 additions & 23 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,34 +3,29 @@
source 'https://rubygems.org'

if ENV['DEVEL'] == '1'
rails_ver = ENV.fetch('RAILS_VERSION', '')
activeadmin_ver = ENV.fetch('ACTIVEADMIN_VERSION', '')

if rails_ver.empty?
gem 'rails'
else
gem 'rails', "~> #{rails_ver}"
end

if activeadmin_ver.empty?
gem 'activeadmin'
else
gem 'activeadmin', "~> #{activeadmin_ver}"
end

gem 'activeadmin_dynamic_fields', path: './'
gem 'appraisal', '~> 2.4'

if rails_ver.start_with?('7.0')
gem 'concurrent-ruby', '1.3.4'
gem 'sqlite3', '~> 1.4'
else
gem 'sqlite3'
end
else
gemspec
end

ruby_ver = ENV.fetch('RUBY_VERSION', '')
rails_ver = ENV.fetch('RAILS_VERSION', '')
activeadmin_ver = ENV.fetch('ACTIVEADMIN_VERSION', '')

rails = rails_ver.empty? ? ['rails'] : ['rails', "~> #{rails_ver}"]
gem(*rails)

activeadmin = activeadmin_ver.empty? ? ['activeadmin'] : ['activeadmin', "~> #{activeadmin_ver}"]
gem(*activeadmin)

ruby32 = Gem::Version.new(ruby_ver) >= Gem::Version.new('3.2')
rails72 = Gem::Version.new(rails_ver) >= Gem::Version.new('7.2')
sqlite3 = ruby32 || rails72 ? ['sqlite3'] : ['sqlite3', '~> 1.4']
gem(*sqlite3)

# NOTE: to avoid error: uninitialized constant ActiveSupport::LoggerThreadSafeLevel::Logger
gem 'concurrent-ruby', '1.3.4'

gem 'bigdecimal'
gem 'mutex_m'
gem 'puma'
Expand Down
3 changes: 0 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,5 @@ specs:
lint:
@docker compose -f extra/docker-compose.yml exec app bin/rubocop

appraisal_update:
@docker compose -f extra/docker-compose.yml exec app bin/appraisal update

shell:
@docker compose -f extra/docker-compose.yml exec app bash
2 changes: 0 additions & 2 deletions activeadmin_dynamic_fields.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,4 @@ Gem::Specification.new do |spec|
spec.require_paths = ['lib']

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

spec.add_development_dependency 'appraisal', '~> 2.4' # rubocop:disable Gemspec/DevelopmentDependencies
end
29 changes: 0 additions & 29 deletions bin/appraisal

This file was deleted.

2 changes: 2 additions & 0 deletions extra/development.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
## Development

### Dev setup

There 3 ways to interact with this project:

1) Using Docker:
Expand Down
28 changes: 0 additions & 28 deletions gemfiles/rails61_activeadmin.gemfile

This file was deleted.

Loading