activeadmin-rails 1.7.0 → 1.7.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a0fbadfbfdeab69087abd64f588056156b07290b03f628c964647eb2417cb271
4
- data.tar.gz: 8cb8c6a961c9497bd41f88932248a2b631d78eebc160f3d96ee5350e5cc444d6
3
+ metadata.gz: 8ad955d098046e0a908d6f53f22a2270935149a031c22e4f17110aae675fec2e
4
+ data.tar.gz: cfe0421fe309a57bc56570e752b0c932f08a837e70d9d047477f3e26b178c9dc
5
5
  SHA512:
6
- metadata.gz: 666e2d4ee9f3e8c429fb5b1860aa1928933d39afaad93712c82fbdff73b6476e3228da72f90bdbcda19ca8e80157cfed5d942c185e405cc3efec3f805a0c17bc
7
- data.tar.gz: 59b7772b54d705c5560fe176278ddd5ce322af83e23951f1de92a4ee00b3d2d22c6c6ce09431c0cbd90864f89c962622207f1e44760f23b3cdd59de7de49113e
6
+ metadata.gz: 796317e632daaff7738a1fd4f63a2deeb9782709720d1c75ee9fe3bd57f67948e737eb89933a3e713229434f4b2f598e48726c54685634a9bbdf38676236ee45
7
+ data.tar.gz: 3bbe2316011379e3b5cede0121b0fb91af778145631d38faa6dad9282b1ebfc752b6e188a849c937bc19c6bf45aaeab5c2344ea231c9da0b289a9318612d8b99
@@ -14,6 +14,15 @@ jobs:
14
14
  strategy:
15
15
  matrix:
16
16
  include:
17
+ - ruby: { name: 3.3, value: 3.3.6 }
18
+ deps: rails_80
19
+ os: ubuntu-24.04
20
+ - ruby: { name: 3.3, value: 3.3.6 }
21
+ deps: rails_72
22
+ os: ubuntu-24.04
23
+ - ruby: { name: 3.3, value: 3.3.6 }
24
+ deps: rails_71
25
+ os: ubuntu-24.04
17
26
  - ruby: { name: 3.2, value: 3.2.2 }
18
27
  deps: rails_71
19
28
  os: ubuntu-22.04
@@ -23,10 +32,10 @@ jobs:
23
32
  - ruby: { name: 3.2, value: 3.2.2 }
24
33
  deps: rails_70_hotwire
25
34
  os: ubuntu-22.04
26
- - ruby: { name: 3.0, value: 3.0.1 }
35
+ - ruby: { name: 3.1, value: 3.1.6 }
27
36
  deps: rails_70
28
37
  os: ubuntu-22.04
29
- - ruby: { name: 3.0, value: 3.0.1 }
38
+ - ruby: { name: 3.1, value: 3.1.6 }
30
39
  deps: rails_70_hotwire
31
40
  os: ubuntu-22.04
32
41
  - ruby: { name: 3.1, value: 3.1.2 }
@@ -35,12 +44,6 @@ jobs:
35
44
  - ruby: { name: 3.1, value: 3.1.2 }
36
45
  deps: rails_61_turbolinks
37
46
  os: ubuntu-22.04
38
- - ruby: { name: 3.0, value: 3.0.1 }
39
- deps: rails_61
40
- os: ubuntu-22.04
41
- - ruby: { name: 3.0, value: 3.0.1 }
42
- deps: rails_61_turbolinks
43
- os: ubuntu-22.04
44
47
  fail-fast: false
45
48
 
46
49
  env:
@@ -14,6 +14,12 @@ jobs:
14
14
  strategy:
15
15
  matrix:
16
16
  include:
17
+ - ruby: { name: 3.3, value: 3.3.6 }
18
+ deps: rails_72
19
+ os: ubuntu-24.04
20
+ - ruby: { name: 3.3, value: 3.3.6 }
21
+ deps: rails_71
22
+ os: ubuntu-24.04
17
23
  - ruby: { name: 3.2, value: 3.2.2 }
18
24
  deps: rails_71
19
25
  os: ubuntu-22.04
@@ -23,10 +29,10 @@ jobs:
23
29
  - ruby: { name: 3.2, value: 3.2.2 }
24
30
  deps: rails_70_hotwire
25
31
  os: ubuntu-22.04
26
- - ruby: { name: 3.0, value: 3.0.1 }
32
+ - ruby: { name: 3.1, value: 3.1.6 }
27
33
  deps: rails_70
28
34
  os: ubuntu-22.04
29
- - ruby: { name: 3.0, value: 3.0.1 }
35
+ - ruby: { name: 3.1, value: 3.1.6 }
30
36
  deps: rails_70_hotwire
31
37
  os: ubuntu-22.04
32
38
  - ruby: { name: 3.1, value: 3.1.2 }
@@ -35,12 +41,6 @@ jobs:
35
41
  - ruby: { name: 3.1, value: 3.1.2 }
36
42
  deps: rails_61_turbolinks
37
43
  os: ubuntu-22.04
38
- - ruby: { name: 3.0, value: 3.0.1 }
39
- deps: rails_61
40
- os: ubuntu-22.04
41
- - ruby: { name: 3.0, value: 3.0.1 }
42
- deps: rails_61_turbolinks
43
- os: ubuntu-22.04
44
44
  fail-fast: false
45
45
 
46
46
  env:
data/CHANGELOG.md CHANGED
@@ -1,5 +1,26 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.7.2 [☰](https://github.com/varyonic/activeadmin-rails/compare/v1.7.1...v1.7.2)
4
+
5
+ #### Minor
6
+
7
+ * Rails 8.0 support. [#54] by [@varyonic]
8
+
9
+ ## 1.7.1 [☰](https://github.com/varyonic/activeadmin-rails/compare/v1.7.0...v1.7.1)
10
+
11
+ #### Minor
12
+
13
+ * Rails 7.2 support. [#53] by [@varyonic]
14
+ * Verify Ruby 3.3 support. [#50] by [@varyonic]
15
+
16
+ ### Bug Fixes
17
+
18
+ * Fix streaming CSV export. [#52] by [@varyonic]
19
+
20
+ ### Security Fixes
21
+
22
+ * Don't restrict jquery-ui-rails upgrades. [#49] by [@varyonic]
23
+
3
24
  ## 1.7.0 [☰](https://github.com/varyonic/activeadmin-rails/compare/v1.6.0...v1.7.0)
4
25
 
5
26
  This release replaces Arbre::Pages with a conventional Rails layout and view partials.
@@ -447,6 +468,11 @@ Please check [0-6-stable] for previous changes.
447
468
  [#42]: https://github.com/varyonic/activeadmin-rails/pull/42
448
469
  [#43]: https://github.com/varyonic/activeadmin-rails/pull/43
449
470
  [#45]: https://github.com/varyonic/activeadmin-rails/pull/45
471
+ [#49]: https://github.com/varyonic/activeadmin-rails/pull/49
472
+ [#50]: https://github.com/varyonic/activeadmin-rails/pull/50
473
+ [#52]: https://github.com/varyonic/activeadmin-rails/pull/52
474
+ [#53]: https://github.com/varyonic/activeadmin-rails/pull/53
475
+ [#54]: https://github.com/varyonic/activeadmin-rails/pull/54
450
476
 
451
477
  [@5t111111]: https://github.com/5t111111
452
478
  [@aarek]: https://github.com/aarek
data/CONTRIBUTING.md CHANGED
@@ -36,7 +36,7 @@ Make sure you're using a recent ruby and have the `bundler` gem installed.
36
36
  Select the Gemfile for your preferred Rails version, preferably the latest:
37
37
 
38
38
  ```sh
39
- export BUNDLE_GEMFILE=gemfiles/rails_71.gemfile
39
+ export BUNDLE_GEMFILE=gemfiles/rails_80.gemfile
40
40
  ```
41
41
 
42
42
  Now install the development dependencies:
data/Gemfile CHANGED
@@ -41,7 +41,7 @@ group :test do
41
41
  gem 'capybara'
42
42
  gem 'simplecov', require: false # Test coverage generator. Go to /coverage/ after running tests
43
43
  gem 'codecov', require: false # Test coverage website. Go to https://codecov.io
44
- gem 'cucumber-rails', github: 'cucumber/cucumber-rails', require: false
44
+ gem 'cucumber-rails', require: false
45
45
  gem 'cucumber'
46
46
  gem 'database_cleaner'
47
47
  gem 'jasmine'
data/README.md CHANGED
@@ -17,7 +17,6 @@ but Varyonic has no plans to provide commercial support - let us know if you do.
17
17
  [![Github Actions ][actions_badge]][actions]
18
18
  [![Quality ][codeclimate_badge]][codeclimate]
19
19
  [![Coverage ][codecov_badge]][codecov]
20
- [![Inch CI ][inch_badge]][inch]
21
20
 
22
21
  ## Goals
23
22
 
@@ -72,8 +71,6 @@ Tool | Description
72
71
  [codeclimate]: https://codeclimate.com/github/varyonic/activeadmin/maintainability
73
72
  [codecov_badge]: https://codecov.io/gh/varyonic/activeadmin/branch/main/graph/badge.svg
74
73
  [codecov]: https://codecov.io/gh/varyonic/activeadmin
75
- [inch_badge]: http://inch-ci.org/github/varyonic/activeadmin.svg?branch=main
76
- [inch]: http://inch-ci.org/github/varyonic/activeadmin
77
74
 
78
75
  [docs]: http://activeadmin.org/0-installation.html
79
76
  [demo]: http://demo.activeadmin.org/admin
@@ -29,7 +29,7 @@ Gem::Specification.new do |s|
29
29
  s.add_dependency 'formtastic_i18n'
30
30
  s.add_dependency 'inherited_resources', '>= 1.13.1'
31
31
  s.add_dependency 'jquery-rails', '>= 4.2.0'
32
- s.add_dependency 'jquery-ui-rails', '~> 6.0'
32
+ s.add_dependency 'jquery-ui-rails', '>= 6.0'
33
33
  s.add_dependency 'kaminari', '>= 1.0.1'
34
34
  s.add_dependency 'railties', '>= 5.0'
35
35
  s.add_dependency 'ransack', '>= 1.8.7'
@@ -24,11 +24,13 @@ end
24
24
  # Check first rows of the displayed CSV.
25
25
  Then /^I should download a CSV file with "([^"]*)" separator for "([^"]*)" containing:$/ do |sep, resource_name, table|
26
26
  body = page.driver.response.body
27
- content_type_header, content_disposition_header = %w[Content-Type Content-Disposition].map do |header_name|
27
+ content_type_header, content_disposition_header, last_modified_header = %w[Content-Type Content-Disposition Last-Modified].map do |header_name|
28
28
  page.response_headers[header_name]
29
29
  end
30
30
  expect(content_type_header).to eq 'text/csv; charset=utf-8'
31
31
  expect(content_disposition_header).to match /\Aattachment; filename=".+?\.csv"\z/
32
+ expect(last_modified_header).to_not be_nil
33
+ expect(Date.strptime(last_modified_header, "%a, %d %b %Y %H:%M:%S GMT")).to be_a(Date)
32
34
 
33
35
  csv = CSV.parse(body, col_sep: sep)
34
36
  table.raw.each_with_index do |expected_row, row_index|
@@ -20,6 +20,7 @@ When /^(.*) within (.*[^:]):$/ do |step_name, parent, table_or_string|
20
20
  end
21
21
 
22
22
  Given /^I am on (.+)$/ do |page_name|
23
+ Rails.application.reload_routes!
23
24
  visit path_to(page_name)
24
25
  end
25
26
 
@@ -7,9 +7,10 @@ gem "rails-i18n", "~> 6.0.x"
7
7
  gem "sass-rails", ">= 6.0.x"
8
8
  gem "sprockets", ">= 4.0.x"
9
9
  gem "bootsnap"
10
+ gem "concurrent-ruby", "<= 1.3.4"
10
11
  gem "devise", "~> 4.4"
11
12
  gem "draper"
12
- gem 'sqlite3', platforms: :mri
13
+ gem "sqlite3", "~> 1.4"
13
14
  gem "activerecord-jdbcsqlite3-adapter", ">= 60.0.x", platform: :jruby
14
15
 
15
16
  gemspec path: "../"
@@ -7,9 +7,10 @@ gem "rails-i18n", "~> 6.0.x"
7
7
  gem "sass-rails", ">= 6.0.x"
8
8
  gem "sprockets", ">= 4.0.x"
9
9
  gem "bootsnap"
10
+ gem "concurrent-ruby", "<= 1.3.4"
10
11
  gem "devise", "~> 4.4"
11
12
  gem "draper"
12
- gem 'sqlite3', platforms: :mri
13
+ gem "sqlite3", "~> 1.4"
13
14
  gem "activerecord-jdbcsqlite3-adapter", ">= 60.0.x", platform: :jruby
14
15
 
15
16
  gemspec path: "../"
@@ -7,9 +7,10 @@ gem "rails-i18n", ">= 6.0.x"
7
7
  gem "sass-rails", ">= 6.0.x"
8
8
  gem "sprockets", ">= 4.0.x"
9
9
  gem "bootsnap"
10
+ gem "concurrent-ruby", "<= 1.3.4"
10
11
  gem "devise", "~> 4.4"
11
12
  gem "draper"
12
- gem 'sqlite3', platforms: :mri
13
+ gem "sqlite3", "~> 1.4"
13
14
  gem "activerecord-jdbcsqlite3-adapter", ">= 60.0.x", platform: :jruby
14
15
 
15
16
  gemspec path: "../"
@@ -7,9 +7,10 @@ gem "rails-i18n", ">= 6.0.x"
7
7
  gem "sass-rails", ">= 6.0.x"
8
8
  gem "sprockets", ">= 4.0.x"
9
9
  gem "bootsnap"
10
+ gem "concurrent-ruby", "<= 1.3.4"
10
11
  gem "devise", "~> 4.9" # support for Hotwire + Turbo, default in Rails 7+
11
12
  gem "draper"
12
- gem 'sqlite3', platforms: :mri
13
+ gem "sqlite3", "~> 1.4"
13
14
  gem "activerecord-jdbcsqlite3-adapter", ">= 60.0.x", platform: :jruby
14
15
 
15
16
  gemspec path: "../"
@@ -11,7 +11,7 @@ gem 'devise', '>= 4.9.3'
11
11
  gem 'rack', '~> 2.2'
12
12
  gem 'bootsnap'
13
13
  gem 'draper'
14
- gem 'sqlite3', platforms: :mri
14
+ gem 'sqlite3', '~> 1.4'
15
15
  gem 'activerecord-jdbcsqlite3-adapter', '>= 60.0.x', platform: :jruby
16
16
 
17
17
  gemspec path: '../'
@@ -0,0 +1,17 @@
1
+ source 'https://rubygems.org'
2
+
3
+ eval_gemfile(File.expand_path(File.join('..', 'Gemfile'), __dir__))
4
+
5
+ gem 'rails', '~> 7.2.0'
6
+ gem 'rails-i18n'
7
+ gem 'inherited_resources', '>= 1.14.0'
8
+ gem 'formtastic', '>= 5.0.0'
9
+ gem 'ransack', '>= 4.1.0'
10
+ gem 'devise', '>= 4.9.3'
11
+ gem 'rack', '>= 2.2'
12
+ gem 'bootsnap'
13
+ gem 'draper'
14
+ gem 'sqlite3', '>= 2.x'
15
+ gem 'activerecord-jdbcsqlite3-adapter', '>= 70.0.x', platform: :jruby
16
+
17
+ gemspec path: '../'
@@ -0,0 +1,17 @@
1
+ source 'https://rubygems.org'
2
+
3
+ eval_gemfile(File.expand_path(File.join('..', 'Gemfile'), __dir__))
4
+
5
+ gem 'rails', '~> 8.0.0'
6
+ gem 'rails-i18n'
7
+ gem 'inherited_resources', '>= 1.14.0'
8
+ gem 'formtastic', '>= 5.0.0'
9
+ gem 'ransack', '>= 4.1.0'
10
+ gem 'devise', '>= 4.9.3'
11
+ gem 'rack', '>= 2.2'
12
+ gem 'bootsnap'
13
+ gem 'draper'
14
+ gem 'sqlite3', '>= 2.x'
15
+ gem 'activerecord-jdbcsqlite3-adapter', '>= 70.0.x', platform: :jruby
16
+
17
+ gemspec path: '../'
@@ -2,8 +2,12 @@ module ActiveAdmin
2
2
  module Deprecation
3
3
  module_function
4
4
 
5
+ def deprecator # :nodoc:
6
+ @deprecator ||= ActiveSupport::Deprecation.new
7
+ end
8
+
5
9
  def warn(message, callstack = caller)
6
- ActiveSupport::Deprecation.warn "Active Admin: #{message}", callstack
10
+ deprecator.warn "Active Admin: #{message}"
7
11
  end
8
12
 
9
13
  end
@@ -20,6 +20,7 @@ module ActiveAdmin
20
20
  def stream_resource(&block)
21
21
  headers['X-Accel-Buffering'] = 'no'
22
22
  headers['Cache-Control'] = 'no-cache'
23
+ headers["Last-Modified"] = Time.current.httpdate
23
24
 
24
25
  if ActiveAdmin.application.disable_streaming_in.include? Rails.env
25
26
  self.response_body = block[String.new]
@@ -1,3 +1,3 @@
1
1
  module ActiveAdmin
2
- VERSION = '1.7.0'
2
+ VERSION = '1.7.2'
3
3
  end
@@ -46,6 +46,7 @@ RSpec.describe 'layout', type: :request do
46
46
  it "should display appropriate text" do
47
47
  get edit_user_path(user), headers: { 'HTTP_USER_AGENT' => user_agent }
48
48
 
49
+ pending if ActiveAdmin::Dependency.rails >= '7.2' # Rails 7.2+ provides its own browser warning
49
50
  expect(page).to have_css 'div.unsupported_browser h1', text: /no longer supports Internet Explorer versions 8/
50
51
  expect(page).to have_css 'div.unsupported_browser p', text: /upgrade your browser/
51
52
  expect(page).to have_css 'div.unsupported_browser p', text: /turn off "Compatibility View"/
@@ -211,6 +211,8 @@ directory File.expand_path('../templates/admin', __FILE__), 'app/admin'
211
211
  # Add predefined policies
212
212
  directory File.expand_path('../templates/policies', __FILE__), 'app/policies'
213
213
 
214
+ directory File.expand_path("templates/public", __dir__), "public", force: true
215
+
214
216
  if ENV['RAILS_ENV'] != 'test'
215
217
  inject_into_file 'config/routes.rb', "\n root to: redirect('admin')", after: /.*routes.draw do/
216
218
  end
File without changes
@@ -1,6 +1,6 @@
1
1
  require 'rails_helper'
2
2
 
3
- RSpec.describe ActiveAdmin::BatchActions::ResourceExtension do
3
+ RSpec.describe 'ActiveAdmin::BatchActions::ResourceExtension' do
4
4
 
5
5
  let(:resource) do
6
6
  namespace = ActiveAdmin::Namespace.new(ActiveAdmin::Application.new, :admin)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activeadmin-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.0
4
+ version: 1.7.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Piers Chambers, Greg Bell
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-11-30 00:00:00.000000000 Z
11
+ date: 2025-02-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: arbo
@@ -84,14 +84,14 @@ dependencies:
84
84
  name: jquery-ui-rails
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - "~>"
87
+ - - ">="
88
88
  - !ruby/object:Gem::Version
89
89
  version: '6.0'
90
90
  type: :runtime
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - "~>"
94
+ - - ">="
95
95
  - !ruby/object:Gem::Version
96
96
  version: '6.0'
97
97
  - !ruby/object:Gem::Dependency
@@ -474,6 +474,8 @@ files:
474
474
  - gemfiles/rails_70.gemfile
475
475
  - gemfiles/rails_70_hotwire.gemfile
476
476
  - gemfiles/rails_71.gemfile
477
+ - gemfiles/rails_72.gemfile
478
+ - gemfiles/rails_80.gemfile
477
479
  - lib/active_admin.rb
478
480
  - lib/active_admin/abstract_view_factory.rb
479
481
  - lib/active_admin/application.rb
@@ -672,6 +674,7 @@ files:
672
674
  - spec/support/templates/policies/store_policy.rb
673
675
  - spec/support/templates/policies/user_policy.rb
674
676
  - spec/support/templates/post_decorator.rb
677
+ - spec/support/templates/public/favicon.ico
675
678
  - spec/unit/abstract_view_factory_spec.rb
676
679
  - spec/unit/action_builder_spec.rb
677
680
  - spec/unit/active_admin_spec.rb
@@ -789,7 +792,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
789
792
  - !ruby/object:Gem::Version
790
793
  version: '0'
791
794
  requirements: []
792
- rubygems_version: 3.3.7
795
+ rubygems_version: 3.4.19
793
796
  signing_key:
794
797
  specification_version: 4
795
798
  summary: A rapid development framework for Ruby on Rails.
@@ -921,6 +924,7 @@ test_files:
921
924
  - spec/support/templates/policies/store_policy.rb
922
925
  - spec/support/templates/policies/user_policy.rb
923
926
  - spec/support/templates/post_decorator.rb
927
+ - spec/support/templates/public/favicon.ico
924
928
  - spec/unit/abstract_view_factory_spec.rb
925
929
  - spec/unit/action_builder_spec.rb
926
930
  - spec/unit/active_admin_spec.rb