Skip to content

Commit bea9423

Browse files
authored
Merge pull request #479 from platanus/v1-backport-AA-v3-support-and-release-new-version
V1 backport ActiveAdmin v3 support and release new version
2 parents 3f5a834 + 9bed815 commit bea9423

22 files changed

+117
-65
lines changed

.circleci/config.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ executors:
1515
parameters:
1616
ruby-version:
1717
description: "Ruby version"
18-
default: "2.7"
18+
default: "3.2"
1919
type: string
2020
docker:
2121
- image: *ruby-image
@@ -27,7 +27,6 @@ commands:
2727
steps:
2828
- checkout
2929
- browser-tools/install-chrome
30-
- browser-tools/install-chromedriver
3130
- restore_cache:
3231
keys:
3332
- bundler-dependencies-{{ checksum "Gemfile.lock" }}
@@ -140,7 +139,7 @@ workflows:
140139
- test:
141140
matrix:
142141
parameters:
143-
ruby-version: ["2.6", "2.7", "3.0", "3.1"]
142+
ruby-version: ["3.0", "3.1", "3.2"]
144143
- deploy:
145144
context: org-global
146145
filters:

.ruby-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.7
1+
3.2

CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
All notable changes to this project will be documented in this file.
33
This project adheres to [Semantic Versioning](http://semver.org/).
44

5-
### Unreleased
5+
### 1.10.1
6+
7+
* Backport [#477](https://github.com/platanus/activeadmin_addons/pull/477) to have ActiveAdmin v3 compatibility [#479](https://github.com/platanus/activeadmin_addons/pull/479)
68

79
### 1.10.0
810

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ gemspec
1212

1313
# To use debugger
1414
# gem "debugger"
15-
gem "activeadmin"
15+
gem "activeadmin", '~> 3.0'
1616
gem "mimemagic", github: "mimemagicrb/mimemagic", ref: "01f92d86d15d85cfd0f20dabd025dcbd36a8a60f"
1717

1818
gem "webpacker", "~> 5.0", require: ENV["SPROCKETS"] != "true"

Gemfile.lock

Lines changed: 33 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -61,15 +61,15 @@ GEM
6161
rails-dom-testing (~> 2.0)
6262
rails-html-sanitizer (~> 1.1, >= 1.2.0)
6363
active_material (1.5.2)
64-
activeadmin (2.13.1)
64+
activeadmin (3.0.0)
6565
arbre (~> 1.2, >= 1.2.1)
6666
formtastic (>= 3.1, < 5.0)
6767
formtastic_i18n (~> 0.4)
6868
inherited_resources (~> 1.7)
6969
jquery-rails (~> 4.2)
7070
kaminari (~> 1.0, >= 1.2.1)
7171
railties (>= 6.1, < 7.1)
72-
ransack (>= 2.1.1, < 4)
72+
ransack (>= 4.0, < 5)
7373
activejob (6.1.7)
7474
activesupport (= 6.1.7)
7575
globalid (>= 0.3.6)
@@ -91,25 +91,22 @@ GEM
9191
minitest (>= 5.1)
9292
tzinfo (~> 2.0)
9393
zeitwerk (~> 2.3)
94-
addressable (2.8.0)
95-
public_suffix (>= 2.0.2, < 5.0)
96-
arbre (1.5.0)
94+
addressable (2.8.5)
95+
public_suffix (>= 2.0.2, < 6.0)
96+
arbre (1.6.0)
9797
activesupport (>= 3.0.0, < 7.1)
9898
ruby2_keywords (>= 0.0.2, < 1.0)
9999
ast (2.4.0)
100100
builder (3.2.4)
101-
capybara (3.31.0)
101+
capybara (3.39.2)
102102
addressable
103+
matrix
103104
mini_mime (>= 0.1.3)
104105
nokogiri (~> 1.8)
105106
rack (>= 1.6.0)
106107
rack-test (>= 0.6.3)
107-
regexp_parser (~> 1.5)
108+
regexp_parser (>= 1.5, < 3.0)
108109
xpath (~> 3.2)
109-
capybara-selenium (0.0.6)
110-
capybara
111-
selenium-webdriver
112-
childprocess (3.0.0)
113110
climate_control (0.2.0)
114111
coderay (1.1.2)
115112
concurrent-ruby (1.1.10)
@@ -148,7 +145,7 @@ GEM
148145
guard (~> 2.1)
149146
guard-compat (~> 1.1)
150147
rspec (>= 2.99.0, < 4.0)
151-
has_scope (0.8.0)
148+
has_scope (0.8.1)
152149
actionpack (>= 5.2)
153150
activesupport (>= 5.2)
154151
i18n (1.12.0)
@@ -194,13 +191,13 @@ GEM
194191
mime-types-data (~> 3.2015)
195192
mime-types-data (3.2019.1009)
196193
mini_magick (4.11.0)
197-
mini_mime (1.1.2)
198-
mini_portile2 (2.8.0)
194+
mini_mime (1.1.5)
195+
mini_portile2 (2.8.4)
199196
minitest (5.16.3)
200197
nenv (0.3.0)
201198
nio4r (2.5.8)
202-
nokogiri (1.13.9)
203-
mini_portile2 (~> 2.8.0)
199+
nokogiri (1.15.4)
200+
mini_portile2 (~> 2.8.2)
204201
racc (~> 1.4)
205202
notiffany (0.1.3)
206203
nenv (~> 0.1)
@@ -221,14 +218,14 @@ GEM
221218
pry-rails (0.3.9)
222219
pry (>= 0.10.4)
223220
psych (3.1.0)
224-
public_suffix (4.0.6)
221+
public_suffix (5.0.3)
225222
puma (5.3.1)
226223
nio4r (~> 2.0)
227-
racc (1.6.0)
228-
rack (2.2.4)
224+
racc (1.7.1)
225+
rack (2.2.8)
229226
rack-proxy (0.6.5)
230227
rack
231-
rack-test (2.0.2)
228+
rack-test (2.1.0)
232229
rack (>= 1.3)
233230
rails (6.1.7)
234231
actioncable (= 6.1.7)
@@ -258,19 +255,19 @@ GEM
258255
thor (~> 1.0)
259256
rainbow (3.0.0)
260257
rake (13.0.6)
261-
ransack (3.0.1)
262-
activerecord (>= 6.0.4)
263-
activesupport (>= 6.0.4)
258+
ransack (4.0.0)
259+
activerecord (>= 6.1.5)
260+
activesupport (>= 6.1.5)
264261
i18n
265262
rb-fsevent (0.11.2)
266263
rb-inotify (0.10.1)
267264
ffi (~> 1.0)
268265
redcarpet (3.6.0)
269-
regexp_parser (1.6.0)
266+
regexp_parser (2.8.1)
270267
require_all (3.0.0)
271-
responders (3.0.1)
272-
actionpack (>= 5.0)
273-
railties (>= 5.0)
268+
responders (3.1.0)
269+
actionpack (>= 5.2)
270+
railties (>= 5.2)
274271
rexml (3.2.5)
275272
rspec (3.9.0)
276273
rspec-core (~> 3.9.0)
@@ -308,7 +305,7 @@ GEM
308305
ruby-vips (2.1.4)
309306
ffi (~> 1.12)
310307
ruby2_keywords (0.0.5)
311-
rubyzip (2.2.0)
308+
rubyzip (2.3.2)
312309
sassc (2.4.0)
313310
ffi (~> 1.9)
314311
sassc-rails (2.1.2)
@@ -317,9 +314,10 @@ GEM
317314
sprockets (> 3.0)
318315
sprockets-rails
319316
tilt
320-
selenium-webdriver (3.142.7)
321-
childprocess (>= 0.5, < 4.0)
322-
rubyzip (>= 1.2.2)
317+
selenium-webdriver (4.11.0)
318+
rexml (~> 3.2, >= 3.2.5)
319+
rubyzip (>= 1.2.2, < 3.0)
320+
websocket (~> 1.0)
323321
semantic_range (3.0.0)
324322
shellany (0.0.1)
325323
shoulda-matchers (4.2.0)
@@ -342,15 +340,12 @@ GEM
342340
tzinfo (2.0.5)
343341
concurrent-ruby (~> 1.0)
344342
unicode-display_width (1.4.1)
345-
webdrivers (4.2.0)
346-
nokogiri (~> 1.6)
347-
rubyzip (>= 1.3.0)
348-
selenium-webdriver (>= 3.0, < 4.0)
349343
webpacker (5.3.0)
350344
activesupport (>= 5.2)
351345
rack-proxy (>= 0.6.1)
352346
railties (>= 5.2)
353347
semantic_range (>= 2.3.0)
348+
websocket (1.2.9)
354349
websocket-driver (0.7.5)
355350
websocket-extensions (>= 0.1.0)
356351
websocket-extensions (0.1.5)
@@ -366,9 +361,9 @@ PLATFORMS
366361

367362
DEPENDENCIES
368363
aasm
369-
activeadmin
364+
activeadmin (~> 3.0)
370365
activeadmin_addons!
371-
capybara-selenium
366+
capybara
372367
database_cleaner
373368
enumerize (~> 2.0)
374369
factory_bot_rails
@@ -385,10 +380,10 @@ DEPENDENCIES
385380
rspec-rails
386381
rspec_junit_formatter
387382
rubocop (~> 0.65.0)
383+
selenium-webdriver (~> 4.10)
388384
shoulda-matchers
389385
shrine (~> 3.0)
390386
sqlite3
391-
webdrivers
392387
webpacker (~> 5.0)
393388

394389
BUNDLED WITH

activeadmin_addons.gemspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Gem::Specification.new do |s|
2727
s.add_dependency "xdan-datetimepicker-rails", "~> 2.5.1"
2828

2929
s.add_development_dependency "aasm"
30-
s.add_development_dependency "capybara-selenium"
30+
s.add_development_dependency "capybara"
3131
s.add_development_dependency "database_cleaner"
3232
s.add_development_dependency "enumerize", "~> 2.0"
3333
s.add_development_dependency "factory_bot_rails"
@@ -43,8 +43,8 @@ Gem::Specification.new do |s|
4343
s.add_development_dependency "rspec-rails"
4444
s.add_development_dependency "rspec_junit_formatter"
4545
s.add_development_dependency "rubocop", "~> 0.65.0"
46+
s.add_development_dependency "selenium-webdriver", '~> 4.10'
4647
s.add_development_dependency "shoulda-matchers"
4748
s.add_development_dependency "shrine", "~> 3.0"
4849
s.add_development_dependency "sqlite3"
49-
s.add_development_dependency "webdrivers"
5050
end

app/inputs/nested_level_input.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def render_custom_input
1616
def load_control_attributes
1717
load_class(@options[:class])
1818
load_data_attr(:fields, default: ["name"], formatter: :to_json)
19-
load_data_attr(:predicate, default: "contains")
19+
load_data_attr(:predicate, default: "cont")
2020
load_data_attr(:filters)
2121
load_data_attr(:model, value: model_name)
2222
load_data_attr(:display_name, default: "name")

app/inputs/search_select_input.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ def input_method
1414
def load_control_attributes
1515
load_class(@options[:class])
1616
load_data_attr(:fields, default: ["name"], formatter: :to_json)
17-
load_data_attr(:predicate, default: "contains")
17+
load_data_attr(:predicate, default: "cont")
1818
load_data_attr(:url, default: url_from_method)
1919
load_data_attr(:response_root, default: tableize_method)
2020
load_data_attr(:display_name, default: "name")

app/inputs/selected_list_input.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ def load_control_attributes
1111
load_data_attr(:url, default: url_from_method)
1212
load_data_attr(:response_root, default: tableize_method)
1313
load_data_attr(:fields, default: ["name"], formatter: :to_json)
14-
load_data_attr(:predicate, default: "contains")
14+
load_data_attr(:predicate, default: "cont")
1515
load_data_attr(:display_name, default: "name")
1616
load_data_attr(:minimum_input_length, default: 1)
1717
load_data_attr(:width, default: "100%")

docs/select2_nested_select.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ Nested select, allows you to customize the general behavior of the input:
9191
* `display_name`: **(optional)** You can pass an optional `display_name` to set the attribute (or method) to show results on the select. It **defaults to**: `name`
9292
* `minimum_input_length`: **(optional)** Minimum number of characters required to initiate the search. It **defaults to**: `1`. Set this value to `0` to disable type-to-search and show a static list.
9393
* `response_root`: **(optional)** If you have defined the `url` attribute and a request to that url responds with a root, you can indicate the name of that root with this attribute. By default, the gem will try to infer the root from url. For example: if `url` is `GET /admin/countries`, the root will be `countries`. If you have a rootless api, you don't need to worry about this attribute.
94-
* `predicate`: **(optional)** You can change the default [ransack predicate](https://github.com/activerecord-hackery/ransack#search-matchers). It **defaults to** `contains`
94+
* `predicate`: **(optional)** You can change the default [ransack predicate](https://github.com/activerecord-hackery/ransack#search-matchers). It **defaults to** `cont`
9595

9696
```ruby
9797
f.input :city_id, as: :nested_select,
@@ -139,7 +139,7 @@ f.input :city_id, as: :nested_select,
139139
level_1: { attribute: :country_id },
140140
level_2: {
141141
attribute: :region_id,
142-
filters: { name_contains: "Cuy", id_gt: 22 }
142+
filters: { name_cont: "Cuy", id_gt: 22 }
143143
},
144144
level_3: { attribute: :city_id }
145145
```

0 commit comments

Comments
 (0)