Skip to content
Draft
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
7 changes: 7 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,11 @@ jobs:
orm: active_record
adapter: sqlite3
asset: sprockets
- ruby: "3.3"
gemfile: gemfiles/rails_8.0.gemfile
orm: active_record
adapter: sqlite3
asset: sprockets
- ruby: "3.2"
gemfile: gemfiles/composite_primary_keys.gemfile
orm: active_record
Expand Down Expand Up @@ -133,6 +138,8 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: "18"
- name: Install ImageMagick
run: sudo apt-get install imagemagick
- name: Setup application
env:
BUNDLE_GEMFILE: ../../${{ matrix.gemfile }}
Expand Down
21 changes: 20 additions & 1 deletion Appraisals
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
appraise 'rails-6.0' do
gem 'rails', '~> 6.0.0'
gem 'psych', '~> 3.3'
gem 'turbo-rails', ['!= 2.0.8', '!= 2.0.9']
gem 'turbo-rails', '< 2.0.8'

group :test do
gem 'cancancan', ['~> 3.0', '< 3.6']
Expand Down Expand Up @@ -56,6 +56,10 @@ appraise 'rails-7.0' do
gem 'importmap-rails', require: false

group :active_record do
platforms :ruby, :mswin, :mingw, :x64_mingw do
gem 'sqlite3', '~> 1.3'
end

platforms :jruby do
gem 'activerecord-jdbcmysql-adapter', '~> 70.0'
gem 'activerecord-jdbcpostgresql-adapter', '~> 70.0'
Expand All @@ -78,6 +82,12 @@ appraise 'rails-7.1' do
gem 'rails', '~> 7.1.0'
gem 'importmap-rails', require: false

group :active_record do
platforms :ruby, :mswin, :mingw, :x64_mingw do
gem 'sqlite3', '~> 1.3'
end
end

group :mongoid do
gem 'cancancan-mongoid'
gem 'carrierwave-mongoid', '>= 0.6.3', require: 'carrierwave/mongoid'
Expand All @@ -94,10 +104,19 @@ appraise 'rails-7.2' do
gem 'importmap-rails', require: false
end

appraise 'rails-8.0' do
gem 'rails', '~> 8.0.0'
gem 'importmap-rails', require: false
end

appraise 'composite_primary_keys' do
gem 'rails', '~> 7.0.0'

group :active_record do
gem 'composite_primary_keys'

platforms :ruby, :mswin, :mingw, :x64_mingw do
gem 'sqlite3', '~> 1.3'
end
end
end
18 changes: 17 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,23 @@

## [Unreleased](https://github.com/railsadminteam/rails_admin/tree/HEAD)

[Full Changelog](https://github.com/railsadminteam/rails_admin/compare/v3.2.0...HEAD)
[Full Changelog](https://github.com/railsadminteam/rails_admin/compare/v3.3.0...HEAD)

## [3.3.0](https://github.com/railsadminteam/rails_admin/tree/v3.3.0) - 2024-12-08

[Full Changelog](https://github.com/railsadminteam/rails_admin/compare/v3.2.1...v3.3.0)

### Added

- Rails 8.0 support ([#3702](https://github.com/railsadminteam/rails_admin/pull/3702))

## [3.2.1](https://github.com/railsadminteam/rails_admin/tree/v3.2.0) - 2024-10-10

[Full Changelog](https://github.com/railsadminteam/rails_admin/compare/v3.2.0...v3.2.1)

### Fixed

- Disable Turbo's prefetch behavior globally, to prevent custom actions unintentionally triggered ([f54a102](https://github.com/railsadminteam/rails_admin/commit/f54a102c6b0a420244ef044503944574ef1dfbd2), [#3701](https://github.com/railsadminteam/rails_admin/issues/3701))

## [3.2.0](https://github.com/railsadminteam/rails_admin/tree/v3.2.0) - 2024-09-08

Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ group :active_record do
platforms :ruby, :mswin, :mingw, :x64_mingw do
gem 'mysql2', '>= 0.3.14'
gem 'pg', '>= 1.0.0'
gem 'sqlite3', '~> 1.3'
gem 'sqlite3', '>= 1.3.0'
end
end

Expand Down
1 change: 1 addition & 0 deletions app/views/layouts/rails_admin/_head.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<meta content="width=device-width, initial-scale=1" name="viewport; charset=utf-8">
<meta content="NONE,NOARCHIVE" name="robots">
<meta content="false" name="turbo-prefetch">
<%= csrf_meta_tag %>
<% case RailsAdmin::config.asset_source
when :webpacker %>
Expand Down
4 changes: 2 additions & 2 deletions gemfiles/rails_6.0.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ gem "devise", "~> 4.7"
gem "net-smtp", require: false
gem "rails", "~> 6.0.0"
gem "sassc-rails", "~> 2.1"
gem "turbo-rails", ["!= 2.0.8", "!= 2.0.9"]
gem "turbo-rails", "< 2.0.8"
gem "vite_rails", require: false
gem "webpacker", require: false
gem "webrick"
Expand Down Expand Up @@ -48,7 +48,7 @@ group :active_record do
platforms :ruby, :mswin, :mingw, :x64_mingw do
gem "mysql2", ">= 0.3.14"
gem "pg", ">= 1.0.0"
gem "sqlite3", "~> 1.3"
gem "sqlite3", ">= 1.3.0"
end

platforms :jruby do
Expand Down
2 changes: 1 addition & 1 deletion gemfiles/rails_6.1.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ group :active_record do
platforms :ruby, :mswin, :mingw, :x64_mingw do
gem "mysql2", ">= 0.3.14"
gem "pg", ">= 1.0.0"
gem "sqlite3", "~> 1.3"
gem "sqlite3", ">= 1.3.0"
end

platforms :jruby do
Expand Down
2 changes: 1 addition & 1 deletion gemfiles/rails_7.2.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ group :active_record do
platforms :ruby, :mswin, :mingw, :x64_mingw do
gem "mysql2", ">= 0.3.14"
gem "pg", ">= 1.0.0"
gem "sqlite3", "~> 1.3"
gem "sqlite3", ">= 1.3.0"
end
end

Expand Down
55 changes: 55 additions & 0 deletions gemfiles/rails_8.0.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# This file was generated by Appraisal

source "https://rubygems.org"

gem "appraisal", ">= 2.0"
gem "devise", "~> 4.7"
gem "net-smtp", require: false
gem "rails", "~> 8.0.0"
gem "sassc-rails", "~> 2.1"
gem "turbo-rails"
gem "vite_rails", require: false
gem "webpacker", require: false
gem "webrick"
gem "importmap-rails", require: false

group :development, :test do
gem "pry", ">= 0.9"
end

group :test do
gem "cancancan", "~> 3.0"
gem "carrierwave", [">= 2.0.0.rc", "< 3"]
gem "cuprite", "!= 0.15.1"
gem "database_cleaner-active_record", ">= 2.0", require: false
gem "dragonfly", "~> 1.0"
gem "factory_bot", ">= 4.2", "!= 6.4.5"
gem "generator_spec", ">= 0.8"
gem "kt-paperclip"
gem "launchy", ">= 2.2"
gem "mini_magick", ">= 3.4"
gem "pundit"
gem "rack-cache", require: "rack/cache"
gem "rspec-expectations", "!= 3.8.3"
gem "rspec-rails", ">= 4.0.0.beta2"
gem "rspec-retry"
gem "rubocop", ["~> 1.20", "!= 1.22.2"], require: false
gem "rubocop-performance", require: false
gem "shrine", "~> 3.0"
gem "simplecov", ">= 0.9", require: false
gem "simplecov-lcov", require: false
gem "timecop", ">= 0.5"
gem "tzinfo-data", platforms: [:mingw, :mswin, :x64_mingw, :jruby]
end

group :active_record do
gem "paper_trail", ">= 12.0"

platforms :ruby, :mswin, :mingw, :x64_mingw do
gem "mysql2", ">= 0.3.14"
gem "pg", ">= 1.0.0"
gem "sqlite3", ">= 1.3.0"
end
end

gemspec path: "../"
2 changes: 1 addition & 1 deletion lib/rails_admin/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
module RailsAdmin
class Version
MAJOR = 3
MINOR = 2
MINOR = 3
PATCH = 0
PRE = nil

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rails_admin",
"version": "3.2.0",
"version": "3.3.0",
"description": "RailsAdmin is a Rails engine that provides an easy-to-use interface for managing your data.",
"homepage": "https://github.com/railsadminteam/rails_admin",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion rails_admin.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Gem::Specification.new do |spec|
spec.add_dependency 'csv'
spec.add_dependency 'kaminari', '>= 0.14', '< 2.0'
spec.add_dependency 'nested_form', '~> 0.3'
spec.add_dependency 'rails', ['>= 6.0', '< 8']
spec.add_dependency 'rails', ['>= 6.0', '< 9']
spec.add_dependency 'turbo-rails', ['>= 1.0', '< 3']
spec.add_development_dependency 'bundler', '>= 1.0'
spec.authors = ['Erik Michaels-Ober', 'Bogdan Gaza', 'Petteri Kaapa', 'Benoit Benezech', 'Mitsuhiro Shibuya']
Expand Down
4 changes: 2 additions & 2 deletions spec/dummy_app/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ group :active_record do
platforms :ruby, :mswin, :mingw do
gem 'mysql2', '>= 0.3.14'
gem 'pg', '>= 0.14'
gem 'sqlite3', '~> 1.3'
gem 'sqlite3', '>= 1.3.0'
end

gem 'paper_trail', '>= 12.0'
Expand All @@ -26,7 +26,7 @@ gem 'devise', '>= 3.2'
gem 'dragonfly', '~> 1.0'
gem 'importmap-rails', require: false
gem 'mini_magick', '>= 3.4'
gem 'mlb', '>= 0.7', github: 'mshibuya/mlb', branch: 'ruby-3'
gem 'mlb', '>= 0.7'
gem 'paperclip', '>= 3.4'
gem 'rails_admin', path: '../../'
gem 'shrine', '~> 3.0'
Expand Down
49 changes: 0 additions & 49 deletions spec/dummy_app/Gemfile.rails6

This file was deleted.

7 changes: 7 additions & 0 deletions spec/integration/rails_admin_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,13 @@
is_expected.to have_content 'Player failed to be updated'
is_expected.to have_css '.filtering-select[data-input-for="player_team_id"]'
end

it 'does not prefetch pages' do
allow_any_instance_of(RailsAdmin::Config::Actions::Index).to receive(:controller).and_raise('index prefetched')
visit dashboard_path
find('.sidebar a.nav-link[href$="/player"]').hover
sleep 0.3 # Turbo waits 100ms before prefetch
end
end

describe 'dom_ready events', js: true do
Expand Down
4 changes: 2 additions & 2 deletions spec/rails_admin/config/fields/types/json_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
it 'returns correct value for empty json' do
allow(object).to receive(:json_field) { {} }
actual = field.with(bindings).formatted_value
expect(actual).to match(/{\n+}/)
expect(actual).to match(/{\n*}/)
end

it 'retuns correct value' do
Expand Down Expand Up @@ -72,7 +72,7 @@
it 'returns correct value for empty json' do
allow(object).to receive(:json_field) { {} }
actual = field.with(bindings).export_value
expect(actual).to match(/{\n+}/)
expect(actual).to match(/{\n*}/)
end

it 'returns correct value' do
Expand Down
Loading