activeadmin-rails 1.7.0 → 1.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a0fbadfbfdeab69087abd64f588056156b07290b03f628c964647eb2417cb271
4
- data.tar.gz: 8cb8c6a961c9497bd41f88932248a2b631d78eebc160f3d96ee5350e5cc444d6
3
+ metadata.gz: 34770b5aac9a2079cd8c360765e1b0f1ca09b5fac462ca586b97a9f55ff66915
4
+ data.tar.gz: 79f6e989087820f88e3724c061344e7b70f233f56b76af378512a6d3ef697c05
5
5
  SHA512:
6
- metadata.gz: 666e2d4ee9f3e8c429fb5b1860aa1928933d39afaad93712c82fbdff73b6476e3228da72f90bdbcda19ca8e80157cfed5d942c185e405cc3efec3f805a0c17bc
7
- data.tar.gz: 59b7772b54d705c5560fe176278ddd5ce322af83e23951f1de92a4ee00b3d2d22c6c6ce09431c0cbd90864f89c962622207f1e44760f23b3cdd59de7de49113e
6
+ metadata.gz: 3909daf70b9cd60b09bc38891f74cd3d3102cb2946936c35f69ee73156cdb9827bd2a0d1af4baa36ecb9936c2634d117044676bb1f0ce7d8b5241f51c4ab2e31
7
+ data.tar.gz: 38982c2eaa887c737ea0ea09e4a9f609930601a561b181a02a70c5b6ad750dda2c9f33a7c882331185bc6566d3952608445e19d9785d008052eab14e018e98d0
@@ -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:
@@ -14,6 +14,9 @@ jobs:
14
14
  strategy:
15
15
  matrix:
16
16
  include:
17
+ - ruby: { name: 3.3, value: 3.3.6 }
18
+ deps: rails_71
19
+ os: ubuntu-24.04
17
20
  - ruby: { name: 3.2, value: 3.2.2 }
18
21
  deps: rails_71
19
22
  os: ubuntu-22.04
@@ -23,10 +26,10 @@ jobs:
23
26
  - ruby: { name: 3.2, value: 3.2.2 }
24
27
  deps: rails_70_hotwire
25
28
  os: ubuntu-22.04
26
- - ruby: { name: 3.0, value: 3.0.1 }
29
+ - ruby: { name: 3.1, value: 3.1.6 }
27
30
  deps: rails_70
28
31
  os: ubuntu-22.04
29
- - ruby: { name: 3.0, value: 3.0.1 }
32
+ - ruby: { name: 3.1, value: 3.1.6 }
30
33
  deps: rails_70_hotwire
31
34
  os: ubuntu-22.04
32
35
  - ruby: { name: 3.1, value: 3.1.2 }
@@ -35,12 +38,6 @@ jobs:
35
38
  - ruby: { name: 3.1, value: 3.1.2 }
36
39
  deps: rails_61_turbolinks
37
40
  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
41
  fail-fast: false
45
42
 
46
43
  env:
data/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.7.1 [☰](https://github.com/varyonic/activeadmin-rails/compare/v1.7.0...v1.7.1)
4
+
5
+ #### Minor
6
+
7
+ * Rails 7.2 support. [#53] by [@varyonic]
8
+ * Verify Ruby 3.3 support. [#50] by [@varyonic]
9
+
10
+ ### Bug Fixes
11
+
12
+ * Fix streaming CSV export. [#52] by [@varyonic]
13
+
14
+ ### Security Fixes
15
+
16
+ * Don't restrict jquery-ui-rails upgrades. [#49] by [@varyonic]
17
+
3
18
  ## 1.7.0 [☰](https://github.com/varyonic/activeadmin-rails/compare/v1.6.0...v1.7.0)
4
19
 
5
20
  This release replaces Arbre::Pages with a conventional Rails layout and view partials.
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_72.gemfile
40
40
  ```
41
41
 
42
42
  Now install the development dependencies:
data/Gemfile CHANGED
@@ -5,6 +5,7 @@ gem 'arbo'
5
5
  # Optional dependencies
6
6
  gem 'cancan'
7
7
  gem 'pundit'
8
+ gem 'sqlite3', '~> 1.x'
8
9
  gem 'jruby-openssl', '~> 0.10.1', platforms: :jruby
9
10
 
10
11
  # Utility gems used in both development & test environments
@@ -41,7 +42,7 @@ group :test do
41
42
  gem 'capybara'
42
43
  gem 'simplecov', require: false # Test coverage generator. Go to /coverage/ after running tests
43
44
  gem 'codecov', require: false # Test coverage website. Go to https://codecov.io
44
- gem 'cucumber-rails', github: 'cucumber/cucumber-rails', require: false
45
+ gem 'cucumber-rails', require: false
45
46
  gem 'cucumber'
46
47
  gem 'database_cleaner'
47
48
  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|
@@ -9,7 +9,6 @@ gem "sprockets", ">= 4.0.x"
9
9
  gem "bootsnap"
10
10
  gem "devise", "~> 4.4"
11
11
  gem "draper"
12
- gem 'sqlite3', platforms: :mri
13
12
  gem "activerecord-jdbcsqlite3-adapter", ">= 60.0.x", platform: :jruby
14
13
 
15
14
  gemspec path: "../"
@@ -9,7 +9,6 @@ gem "sprockets", ">= 4.0.x"
9
9
  gem "bootsnap"
10
10
  gem "devise", "~> 4.4"
11
11
  gem "draper"
12
- gem 'sqlite3', platforms: :mri
13
12
  gem "activerecord-jdbcsqlite3-adapter", ">= 60.0.x", platform: :jruby
14
13
 
15
14
  gemspec path: "../"
@@ -9,7 +9,6 @@ gem "sprockets", ">= 4.0.x"
9
9
  gem "bootsnap"
10
10
  gem "devise", "~> 4.4"
11
11
  gem "draper"
12
- gem 'sqlite3', platforms: :mri
13
12
  gem "activerecord-jdbcsqlite3-adapter", ">= 60.0.x", platform: :jruby
14
13
 
15
14
  gemspec path: "../"
@@ -9,7 +9,6 @@ gem "sprockets", ">= 4.0.x"
9
9
  gem "bootsnap"
10
10
  gem "devise", "~> 4.9" # support for Hotwire + Turbo, default in Rails 7+
11
11
  gem "draper"
12
- gem 'sqlite3', platforms: :mri
13
12
  gem "activerecord-jdbcsqlite3-adapter", ">= 60.0.x", platform: :jruby
14
13
 
15
14
  gemspec path: "../"
@@ -11,7 +11,6 @@ gem 'devise', '>= 4.9.3'
11
11
  gem 'rack', '~> 2.2'
12
12
  gem 'bootsnap'
13
13
  gem 'draper'
14
- gem 'sqlite3', platforms: :mri
15
14
  gem 'activerecord-jdbcsqlite3-adapter', '>= 60.0.x', platform: :jruby
16
15
 
17
16
  gemspec path: '../'
@@ -0,0 +1,16 @@
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 'activerecord-jdbcsqlite3-adapter', '>= 70.0.x', platform: :jruby
15
+
16
+ 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}", callstack
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.1'
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
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.1
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: 2024-11-22 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,7 @@ 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
477
478
  - lib/active_admin.rb
478
479
  - lib/active_admin/abstract_view_factory.rb
479
480
  - lib/active_admin/application.rb
@@ -672,6 +673,7 @@ files:
672
673
  - spec/support/templates/policies/store_policy.rb
673
674
  - spec/support/templates/policies/user_policy.rb
674
675
  - spec/support/templates/post_decorator.rb
676
+ - spec/support/templates/public/favicon.ico
675
677
  - spec/unit/abstract_view_factory_spec.rb
676
678
  - spec/unit/action_builder_spec.rb
677
679
  - spec/unit/active_admin_spec.rb
@@ -789,7 +791,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
789
791
  - !ruby/object:Gem::Version
790
792
  version: '0'
791
793
  requirements: []
792
- rubygems_version: 3.3.7
794
+ rubygems_version: 3.3.26
793
795
  signing_key:
794
796
  specification_version: 4
795
797
  summary: A rapid development framework for Ruby on Rails.
@@ -921,6 +923,7 @@ test_files:
921
923
  - spec/support/templates/policies/store_policy.rb
922
924
  - spec/support/templates/policies/user_policy.rb
923
925
  - spec/support/templates/post_decorator.rb
926
+ - spec/support/templates/public/favicon.ico
924
927
  - spec/unit/abstract_view_factory_spec.rb
925
928
  - spec/unit/action_builder_spec.rb
926
929
  - spec/unit/active_admin_spec.rb