activeadmin-ajax_filter 0.5.0 → 0.7.0

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.
Files changed (108) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/main.yaml +29 -0
  3. data/.gitignore +1 -0
  4. data/.ruby-version +1 -1
  5. data/Gemfile +1 -0
  6. data/Gemfile.lock +175 -136
  7. data/README.md +14 -13
  8. data/activeadmin-ajax_filter.gemspec +5 -4
  9. data/app/assets/javascripts/activeadmin-ajax_filter.js.coffee +4 -0
  10. data/lib/active_admin/ajax_filter/version.rb +1 -1
  11. data/lib/active_admin/inputs/ajax_core.rb +10 -0
  12. data/test_app/blog/.gitattributes +7 -0
  13. data/test_app/blog/.gitignore +35 -0
  14. data/test_app/blog/.ruby-version +1 -0
  15. data/test_app/blog/Gemfile +83 -0
  16. data/test_app/blog/Gemfile.lock +345 -0
  17. data/test_app/blog/README.md +24 -0
  18. data/test_app/blog/Rakefile +6 -0
  19. data/test_app/blog/app/admin/admin_users.rb +28 -0
  20. data/test_app/blog/app/admin/categories.rb +7 -0
  21. data/test_app/blog/app/admin/dashboard.rb +32 -0
  22. data/test_app/blog/app/admin/items.rb +38 -0
  23. data/test_app/blog/app/admin/subcategories.rb +8 -0
  24. data/test_app/blog/app/admin/tags.rb +22 -0
  25. data/test_app/blog/app/assets/config/manifest.js +2 -0
  26. data/test_app/blog/app/assets/images/.keep +0 -0
  27. data/test_app/blog/app/assets/javascripts/active_admin.js +4 -0
  28. data/test_app/blog/app/assets/stylesheets/active_admin.scss +21 -0
  29. data/test_app/blog/app/assets/stylesheets/application.css +15 -0
  30. data/test_app/blog/app/channels/application_cable/channel.rb +4 -0
  31. data/test_app/blog/app/channels/application_cable/connection.rb +4 -0
  32. data/test_app/blog/app/controllers/application_controller.rb +2 -0
  33. data/test_app/blog/app/controllers/concerns/.keep +0 -0
  34. data/test_app/blog/app/decorators/subcategory_decorator.rb +5 -0
  35. data/test_app/blog/app/helpers/application_helper.rb +2 -0
  36. data/test_app/blog/app/jobs/application_job.rb +7 -0
  37. data/test_app/blog/app/mailers/application_mailer.rb +4 -0
  38. data/test_app/blog/app/models/admin_user.rb +6 -0
  39. data/test_app/blog/app/models/application_record.rb +3 -0
  40. data/test_app/blog/app/models/category.rb +6 -0
  41. data/test_app/blog/app/models/concerns/.keep +0 -0
  42. data/test_app/blog/app/models/item.rb +6 -0
  43. data/test_app/blog/app/models/subcategory.rb +8 -0
  44. data/test_app/blog/app/models/tag.rb +6 -0
  45. data/test_app/blog/app/views/layouts/application.html.erb +15 -0
  46. data/test_app/blog/app/views/layouts/mailer.html.erb +13 -0
  47. data/test_app/blog/app/views/layouts/mailer.text.erb +1 -0
  48. data/test_app/blog/bin/bundle +114 -0
  49. data/test_app/blog/bin/rails +4 -0
  50. data/test_app/blog/bin/rake +4 -0
  51. data/test_app/blog/bin/setup +33 -0
  52. data/test_app/blog/config/application.rb +22 -0
  53. data/test_app/blog/config/boot.rb +4 -0
  54. data/test_app/blog/config/cable.yml +10 -0
  55. data/test_app/blog/config/credentials.yml.enc +1 -0
  56. data/test_app/blog/config/database.yml +25 -0
  57. data/test_app/blog/config/environment.rb +5 -0
  58. data/test_app/blog/config/environments/development.rb +70 -0
  59. data/test_app/blog/config/environments/production.rb +93 -0
  60. data/test_app/blog/config/environments/test.rb +60 -0
  61. data/test_app/blog/config/initializers/active_admin.rb +335 -0
  62. data/test_app/blog/config/initializers/assets.rb +12 -0
  63. data/test_app/blog/config/initializers/content_security_policy.rb +25 -0
  64. data/test_app/blog/config/initializers/devise.rb +313 -0
  65. data/test_app/blog/config/initializers/filter_parameter_logging.rb +8 -0
  66. data/test_app/blog/config/initializers/inflections.rb +16 -0
  67. data/test_app/blog/config/initializers/permissions_policy.rb +11 -0
  68. data/test_app/blog/config/locales/devise.en.yml +65 -0
  69. data/test_app/blog/config/locales/en.yml +33 -0
  70. data/test_app/blog/config/puma.rb +43 -0
  71. data/test_app/blog/config/routes.rb +8 -0
  72. data/test_app/blog/config/storage.yml +34 -0
  73. data/test_app/blog/config.ru +6 -0
  74. data/test_app/blog/db/migrate/20230425060437_devise_create_admin_users.rb +44 -0
  75. data/test_app/blog/db/migrate/20230425060439_create_active_admin_comments.rb +16 -0
  76. data/test_app/blog/db/migrate/20230425060707_initial_schema.rb +17 -0
  77. data/test_app/blog/db/migrate/20230425060708_create_tags.rb +13 -0
  78. data/test_app/blog/db/schema.rb +69 -0
  79. data/test_app/blog/db/seeds.rb +33 -0
  80. data/test_app/blog/lib/assets/.keep +0 -0
  81. data/test_app/blog/lib/tasks/.keep +0 -0
  82. data/test_app/blog/log/.keep +0 -0
  83. data/test_app/blog/public/404.html +67 -0
  84. data/test_app/blog/public/422.html +67 -0
  85. data/test_app/blog/public/500.html +66 -0
  86. data/test_app/blog/public/apple-touch-icon-precomposed.png +0 -0
  87. data/test_app/blog/public/apple-touch-icon.png +0 -0
  88. data/test_app/blog/public/favicon.ico +0 -0
  89. data/test_app/blog/public/robots.txt +1 -0
  90. data/test_app/blog/storage/.keep +0 -0
  91. data/test_app/blog/test/application_system_test_case.rb +5 -0
  92. data/test_app/blog/test/channels/application_cable/connection_test.rb +11 -0
  93. data/test_app/blog/test/controllers/.keep +0 -0
  94. data/test_app/blog/test/fixtures/admin_users.yml +11 -0
  95. data/test_app/blog/test/fixtures/files/.keep +0 -0
  96. data/test_app/blog/test/helpers/.keep +0 -0
  97. data/test_app/blog/test/integration/.keep +0 -0
  98. data/test_app/blog/test/mailers/.keep +0 -0
  99. data/test_app/blog/test/models/.keep +0 -0
  100. data/test_app/blog/test/models/admin_user_test.rb +7 -0
  101. data/test_app/blog/test/system/.keep +0 -0
  102. data/test_app/blog/test/test_helper.rb +13 -0
  103. data/test_app/blog/tmp/.keep +0 -0
  104. data/test_app/blog/tmp/pids/.keep +0 -0
  105. data/test_app/blog/tmp/storage/.keep +0 -0
  106. data/test_app/blog/vendor/.keep +0 -0
  107. metadata +121 -32
  108. data/.travis.yml +0 -26
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e1c3b1529c52840fb04649b4f78d20102fa2f1c7540540af12b826ef649f7724
4
- data.tar.gz: b7a810bdaf0c5d19aecc341ec2006b3f0327160117ab574685da0edf8d578807
3
+ metadata.gz: 725b2ae6c0e936bc82dca2a8ac32f67e712c84e8289bb3fefc95a43b2e9aad33
4
+ data.tar.gz: 7a5c881412a081d40fc128519077b8ef9883218c34203ed38c8b1c7652b06b68
5
5
  SHA512:
6
- metadata.gz: a5c3cea3ccdcbf370e84904d52c487776b91eac047c785fb38c88d020f63a9dd5a770ee6faa3994864ac9bf54dfd915a3572177c573111d4f28c9dee974e3350
7
- data.tar.gz: debfbb96573653c059a8c8c64fb0ac88110cdb8f3e6103c3529309a5fe1a763ebb425172182408e85a4fa02bb4e6a94db779c01e456becd2e4c1a2eed8af5e23
6
+ metadata.gz: 7f1a73050c44cd9c0ded2626b8b6ab0c15be42fe65d362f3d247677380a7b5f1750cc256c7b795d91ac0fabb7f79a14b378bd0bec75365fbb4b37ca355540250
7
+ data.tar.gz: ee1a8c47f73218780d41b62fc169ea9e9daf7ee36d02574bd6d4abfb26cf429906dd19211f8069d6c720c5ed6213b7c16ef03d9757c3e59bc9ff441ef2f382e7
@@ -0,0 +1,29 @@
1
+ name: Tests
2
+ on:
3
+ push:
4
+ branches:
5
+ - master
6
+ pull_request:
7
+ branches:
8
+ - master
9
+
10
+ jobs:
11
+ build:
12
+ runs-on: ubuntu-latest
13
+
14
+ strategy:
15
+ fail-fast: false
16
+ matrix:
17
+ ruby-version: ['2.7', '3.0', '3.1']
18
+
19
+ steps:
20
+ - uses: actions/checkout@v3
21
+ - name: Set up Ruby ${{ matrix.ruby-version }}
22
+ uses: ruby/setup-ruby@ec02537da5712d66d4d50a0f33b7eb52773b5ed1
23
+ with:
24
+ ruby-version: ${{ matrix.ruby-version }}
25
+ bundler-cache: true
26
+
27
+ - run: bundle install --retry=3
28
+ - run: bundle exec rake dummy:prepare
29
+ - run: bundle exec rspec
data/.gitignore CHANGED
@@ -10,5 +10,6 @@
10
10
  /spec/dummy/.sass-cache
11
11
  /spec/dummy/log/*.log
12
12
  /tmp/
13
+ .DS_Store
13
14
  *.sqlite3
14
15
  *.gem
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.6.5
1
+ 2.7.2
data/Gemfile CHANGED
@@ -2,4 +2,5 @@ source 'https://rubygems.org'
2
2
 
3
3
  # Specify your gem's dependencies in activeadmin-ajax_filter.gemspec
4
4
  gemspec
5
+ gem 'sprockets-rails'
5
6
  gem 'draper', group: 'test'
data/Gemfile.lock CHANGED
@@ -1,76 +1,97 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- activeadmin-ajax_filter (0.5.0)
4
+ activeadmin-ajax_filter (0.7.0)
5
5
  activeadmin (>= 1.0)
6
6
  coffee-rails (>= 4.1.0)
7
- has_scope (>= 0.6.0)
8
- rails (>= 5.0)
7
+ rails (>= 7.0)
9
8
  selectize-rails (>= 0.12.6)
10
9
 
11
10
  GEM
12
11
  remote: https://rubygems.org/
13
12
  specs:
14
- actioncable (5.2.4.2)
15
- actionpack (= 5.2.4.2)
13
+ actioncable (7.0.4.3)
14
+ actionpack (= 7.0.4.3)
15
+ activesupport (= 7.0.4.3)
16
16
  nio4r (~> 2.0)
17
17
  websocket-driver (>= 0.6.1)
18
- actionmailer (5.2.4.2)
19
- actionpack (= 5.2.4.2)
20
- actionview (= 5.2.4.2)
21
- activejob (= 5.2.4.2)
18
+ actionmailbox (7.0.4.3)
19
+ actionpack (= 7.0.4.3)
20
+ activejob (= 7.0.4.3)
21
+ activerecord (= 7.0.4.3)
22
+ activestorage (= 7.0.4.3)
23
+ activesupport (= 7.0.4.3)
24
+ mail (>= 2.7.1)
25
+ net-imap
26
+ net-pop
27
+ net-smtp
28
+ actionmailer (7.0.4.3)
29
+ actionpack (= 7.0.4.3)
30
+ actionview (= 7.0.4.3)
31
+ activejob (= 7.0.4.3)
32
+ activesupport (= 7.0.4.3)
22
33
  mail (~> 2.5, >= 2.5.4)
34
+ net-imap
35
+ net-pop
36
+ net-smtp
23
37
  rails-dom-testing (~> 2.0)
24
- actionpack (5.2.4.2)
25
- actionview (= 5.2.4.2)
26
- activesupport (= 5.2.4.2)
27
- rack (~> 2.0, >= 2.0.8)
38
+ actionpack (7.0.4.3)
39
+ actionview (= 7.0.4.3)
40
+ activesupport (= 7.0.4.3)
41
+ rack (~> 2.0, >= 2.2.0)
28
42
  rack-test (>= 0.6.3)
29
43
  rails-dom-testing (~> 2.0)
30
- rails-html-sanitizer (~> 1.0, >= 1.0.2)
31
- actionview (5.2.4.2)
32
- activesupport (= 5.2.4.2)
44
+ rails-html-sanitizer (~> 1.0, >= 1.2.0)
45
+ actiontext (7.0.4.3)
46
+ actionpack (= 7.0.4.3)
47
+ activerecord (= 7.0.4.3)
48
+ activestorage (= 7.0.4.3)
49
+ activesupport (= 7.0.4.3)
50
+ globalid (>= 0.6.0)
51
+ nokogiri (>= 1.8.5)
52
+ actionview (7.0.4.3)
53
+ activesupport (= 7.0.4.3)
33
54
  builder (~> 3.1)
34
55
  erubi (~> 1.4)
35
56
  rails-dom-testing (~> 2.0)
36
- rails-html-sanitizer (~> 1.0, >= 1.0.3)
37
- activeadmin (2.7.0)
57
+ rails-html-sanitizer (~> 1.1, >= 1.2.0)
58
+ activeadmin (2.13.1)
38
59
  arbre (~> 1.2, >= 1.2.1)
39
- formtastic (~> 3.1)
60
+ formtastic (>= 3.1, < 5.0)
40
61
  formtastic_i18n (~> 0.4)
41
62
  inherited_resources (~> 1.7)
42
63
  jquery-rails (~> 4.2)
43
- kaminari (~> 1.0, >= 1.0.1)
44
- railties (>= 5.2, < 6.1)
45
- ransack (~> 2.1, >= 2.1.1)
46
- sassc-rails (~> 2.1)
47
- sprockets (>= 3.0, < 4.1)
48
- activejob (5.2.4.2)
49
- activesupport (= 5.2.4.2)
64
+ kaminari (~> 1.0, >= 1.2.1)
65
+ railties (>= 6.1, < 7.1)
66
+ ransack (>= 2.1.1, < 4)
67
+ activejob (7.0.4.3)
68
+ activesupport (= 7.0.4.3)
50
69
  globalid (>= 0.3.6)
51
- activemodel (5.2.4.2)
52
- activesupport (= 5.2.4.2)
70
+ activemodel (7.0.4.3)
71
+ activesupport (= 7.0.4.3)
53
72
  activemodel-serializers-xml (1.0.2)
54
73
  activemodel (> 5.x)
55
74
  activesupport (> 5.x)
56
75
  builder (~> 3.1)
57
- activerecord (5.2.4.2)
58
- activemodel (= 5.2.4.2)
59
- activesupport (= 5.2.4.2)
60
- arel (>= 9.0)
61
- activestorage (5.2.4.2)
62
- actionpack (= 5.2.4.2)
63
- activerecord (= 5.2.4.2)
64
- marcel (~> 0.3.1)
65
- activesupport (5.2.4.2)
76
+ activerecord (7.0.4.3)
77
+ activemodel (= 7.0.4.3)
78
+ activesupport (= 7.0.4.3)
79
+ activestorage (7.0.4.3)
80
+ actionpack (= 7.0.4.3)
81
+ activejob (= 7.0.4.3)
82
+ activerecord (= 7.0.4.3)
83
+ activesupport (= 7.0.4.3)
84
+ marcel (~> 1.0)
85
+ mini_mime (>= 1.1.0)
86
+ activesupport (7.0.4.3)
66
87
  concurrent-ruby (~> 1.0, >= 1.0.2)
67
- i18n (>= 0.7, < 2)
68
- minitest (~> 5.1)
69
- tzinfo (~> 1.1)
88
+ i18n (>= 1.6, < 2)
89
+ minitest (>= 5.1)
90
+ tzinfo (~> 2.0)
70
91
  addressable (2.4.0)
71
- arbre (1.2.1)
72
- activesupport (>= 3.0.0)
73
- arel (9.0.0)
92
+ arbre (1.5.0)
93
+ activesupport (>= 3.0.0, < 7.1)
94
+ ruby2_keywords (>= 0.0.2, < 1.0)
74
95
  builder (3.2.4)
75
96
  capybara (2.7.1)
76
97
  addressable
@@ -90,125 +111,136 @@ GEM
90
111
  coffee-script-source
91
112
  execjs
92
113
  coffee-script-source (1.12.2)
93
- concurrent-ruby (1.1.6)
114
+ concurrent-ruby (1.2.2)
94
115
  crass (1.0.6)
95
116
  database_cleaner (1.8.3)
117
+ date (3.3.3)
96
118
  diff-lcs (1.3)
97
- docile (1.1.5)
119
+ docile (1.4.0)
98
120
  draper (4.0.0)
99
121
  actionpack (>= 5.0)
100
122
  activemodel (>= 5.0)
101
123
  activemodel-serializers-xml (>= 1.0)
102
124
  activesupport (>= 5.0)
103
125
  request_store (>= 1.0)
104
- erubi (1.9.0)
105
- execjs (2.7.0)
126
+ erubi (1.12.0)
127
+ execjs (2.8.1)
106
128
  factory_girl (4.5.0)
107
129
  activesupport (>= 3.0.0)
108
130
  factory_girl_rails (4.5.0)
109
131
  factory_girl (~> 4.5.0)
110
132
  railties (>= 3.0.0)
111
- ffi (1.11.1)
112
- formtastic (3.1.5)
113
- actionpack (>= 3.2.13)
114
- formtastic_i18n (0.6.0)
115
- globalid (0.4.2)
116
- activesupport (>= 4.2.0)
117
- has_scope (0.7.2)
118
- actionpack (>= 4.1)
119
- activesupport (>= 4.1)
120
- i18n (1.8.2)
133
+ ffi (1.15.5)
134
+ formtastic (4.0.0)
135
+ actionpack (>= 5.2.0)
136
+ formtastic_i18n (0.7.0)
137
+ globalid (1.1.0)
138
+ activesupport (>= 5.0)
139
+ has_scope (0.8.1)
140
+ actionpack (>= 5.2)
141
+ activesupport (>= 5.2)
142
+ i18n (1.12.0)
121
143
  concurrent-ruby (~> 1.0)
122
- inherited_resources (1.11.0)
123
- actionpack (>= 5.0, < 6.1)
144
+ inherited_resources (1.13.1)
145
+ actionpack (>= 5.2, < 7.1)
124
146
  has_scope (~> 0.6)
125
- railties (>= 5.0, < 6.1)
147
+ railties (>= 5.2, < 7.1)
126
148
  responders (>= 2, < 4)
127
- jquery-rails (4.4.0)
149
+ jquery-rails (4.5.1)
128
150
  rails-dom-testing (>= 1, < 3)
129
151
  railties (>= 4.2.0)
130
152
  thor (>= 0.14, < 2.0)
131
- json (1.8.6)
132
- kaminari (1.2.0)
153
+ kaminari (1.2.2)
133
154
  activesupport (>= 4.1.0)
134
- kaminari-actionview (= 1.2.0)
135
- kaminari-activerecord (= 1.2.0)
136
- kaminari-core (= 1.2.0)
137
- kaminari-actionview (1.2.0)
155
+ kaminari-actionview (= 1.2.2)
156
+ kaminari-activerecord (= 1.2.2)
157
+ kaminari-core (= 1.2.2)
158
+ kaminari-actionview (1.2.2)
138
159
  actionview
139
- kaminari-core (= 1.2.0)
140
- kaminari-activerecord (1.2.0)
160
+ kaminari-core (= 1.2.2)
161
+ kaminari-activerecord (1.2.2)
141
162
  activerecord
142
- kaminari-core (= 1.2.0)
143
- kaminari-core (1.2.0)
163
+ kaminari-core (= 1.2.2)
164
+ kaminari-core (1.2.2)
144
165
  launchy (2.4.3)
145
166
  addressable (~> 2.3)
146
- loofah (2.4.0)
167
+ loofah (2.20.0)
147
168
  crass (~> 1.0.2)
148
169
  nokogiri (>= 1.5.9)
149
- mail (2.7.1)
170
+ mail (2.8.1)
150
171
  mini_mime (>= 0.1.1)
151
- marcel (0.3.3)
152
- mimemagic (~> 0.3.2)
172
+ net-imap
173
+ net-pop
174
+ net-smtp
175
+ marcel (1.0.2)
153
176
  method_source (1.0.0)
154
- mime-types (3.2.2)
177
+ mime-types (3.4.1)
155
178
  mime-types-data (~> 3.2015)
156
- mime-types-data (3.2018.0812)
157
- mimemagic (0.3.5)
158
- mini_mime (1.0.2)
159
- mini_portile2 (2.4.0)
160
- minitest (5.14.0)
161
- nio4r (2.5.2)
162
- nokogiri (1.10.9)
163
- mini_portile2 (~> 2.4.0)
179
+ mime-types-data (3.2023.0218.1)
180
+ mini_mime (1.1.2)
181
+ mini_portile2 (2.8.1)
182
+ minitest (5.18.0)
183
+ net-imap (0.3.4)
184
+ date
185
+ net-protocol
186
+ net-pop (0.1.2)
187
+ net-protocol
188
+ net-protocol (0.2.1)
189
+ timeout
190
+ net-smtp (0.3.3)
191
+ net-protocol
192
+ nio4r (2.5.9)
193
+ nokogiri (1.14.3)
194
+ mini_portile2 (~> 2.8.0)
195
+ racc (~> 1.4)
164
196
  phantomjs (2.1.1.0)
165
197
  poltergeist (1.10.0)
166
198
  capybara (~> 2.1)
167
199
  cliver (~> 0.3.1)
168
200
  websocket-driver (>= 0.2.0)
169
- polyamorous (2.3.2)
170
- activerecord (>= 5.2.1)
171
201
  pry (0.13.1)
172
202
  coderay (~> 1.1)
173
203
  method_source (~> 1.0)
174
- rack (2.2.2)
175
- rack-test (1.1.0)
176
- rack (>= 1.0, < 3)
177
- rails (5.2.4.2)
178
- actioncable (= 5.2.4.2)
179
- actionmailer (= 5.2.4.2)
180
- actionpack (= 5.2.4.2)
181
- actionview (= 5.2.4.2)
182
- activejob (= 5.2.4.2)
183
- activemodel (= 5.2.4.2)
184
- activerecord (= 5.2.4.2)
185
- activestorage (= 5.2.4.2)
186
- activesupport (= 5.2.4.2)
187
- bundler (>= 1.3.0)
188
- railties (= 5.2.4.2)
189
- sprockets-rails (>= 2.0.0)
204
+ racc (1.6.2)
205
+ rack (2.2.6.4)
206
+ rack-test (2.1.0)
207
+ rack (>= 1.3)
208
+ rails (7.0.4.3)
209
+ actioncable (= 7.0.4.3)
210
+ actionmailbox (= 7.0.4.3)
211
+ actionmailer (= 7.0.4.3)
212
+ actionpack (= 7.0.4.3)
213
+ actiontext (= 7.0.4.3)
214
+ actionview (= 7.0.4.3)
215
+ activejob (= 7.0.4.3)
216
+ activemodel (= 7.0.4.3)
217
+ activerecord (= 7.0.4.3)
218
+ activestorage (= 7.0.4.3)
219
+ activesupport (= 7.0.4.3)
220
+ bundler (>= 1.15.0)
221
+ railties (= 7.0.4.3)
190
222
  rails-dom-testing (2.0.3)
191
223
  activesupport (>= 4.2.0)
192
224
  nokogiri (>= 1.6)
193
- rails-html-sanitizer (1.3.0)
194
- loofah (~> 2.3)
195
- railties (5.2.4.2)
196
- actionpack (= 5.2.4.2)
197
- activesupport (= 5.2.4.2)
225
+ rails-html-sanitizer (1.5.0)
226
+ loofah (~> 2.19, >= 2.19.1)
227
+ railties (7.0.4.3)
228
+ actionpack (= 7.0.4.3)
229
+ activesupport (= 7.0.4.3)
198
230
  method_source
199
- rake (>= 0.8.7)
200
- thor (>= 0.19.0, < 2.0)
231
+ rake (>= 12.2)
232
+ thor (~> 1.0)
233
+ zeitwerk (~> 2.5)
201
234
  rake (12.3.3)
202
- ransack (2.3.2)
203
- activerecord (>= 5.2.1)
204
- activesupport (>= 5.2.1)
235
+ ransack (3.2.1)
236
+ activerecord (>= 6.1.5)
237
+ activesupport (>= 6.1.5)
205
238
  i18n
206
- polyamorous (= 2.3.2)
207
239
  request_store (1.5.0)
208
240
  rack (>= 1.4)
209
- responders (3.0.0)
210
- actionpack (>= 5.0)
211
- railties (>= 5.0)
241
+ responders (3.1.0)
242
+ actionpack (>= 5.2)
243
+ railties (>= 5.2)
212
244
  rspec (3.9.0)
213
245
  rspec-core (~> 3.9.0)
214
246
  rspec-expectations (~> 3.9.0)
@@ -230,7 +262,8 @@ GEM
230
262
  rspec-mocks (~> 3.9.0)
231
263
  rspec-support (~> 3.9.0)
232
264
  rspec-support (3.9.2)
233
- sassc (2.2.1)
265
+ ruby2_keywords (0.0.5)
266
+ sassc (2.4.0)
234
267
  ffi (~> 1.9)
235
268
  sassc-rails (2.1.2)
236
269
  railties (>= 4.0.0)
@@ -239,32 +272,36 @@ GEM
239
272
  sprockets-rails
240
273
  tilt
241
274
  selectize-rails (0.12.6)
242
- simplecov (0.11.1)
243
- docile (~> 1.1.0)
244
- json (~> 1.8)
245
- simplecov-html (~> 0.10.0)
246
- simplecov-html (0.10.0)
247
- sprockets (4.0.0)
275
+ simplecov (0.22.0)
276
+ docile (~> 1.1)
277
+ simplecov-html (~> 0.11)
278
+ simplecov_json_formatter (~> 0.1)
279
+ simplecov-html (0.12.3)
280
+ simplecov_json_formatter (0.1.4)
281
+ sprockets (4.2.0)
248
282
  concurrent-ruby (~> 1.0)
249
- rack (> 1, < 3)
250
- sprockets-rails (3.2.1)
251
- actionpack (>= 4.0)
252
- activesupport (>= 4.0)
283
+ rack (>= 2.2.4, < 4)
284
+ sprockets-rails (3.4.2)
285
+ actionpack (>= 5.2)
286
+ activesupport (>= 5.2)
253
287
  sprockets (>= 3.0.0)
254
- sqlite3 (1.3.11)
288
+ sqlite3 (1.6.2)
289
+ mini_portile2 (~> 2.8.0)
255
290
  temping (3.3.0)
256
291
  activerecord (>= 3.1)
257
292
  activesupport (>= 3.1)
258
- thor (1.0.1)
259
- thread_safe (0.3.6)
260
- tilt (2.0.10)
261
- tzinfo (1.2.6)
262
- thread_safe (~> 0.1)
263
- websocket-driver (0.7.1)
293
+ thor (1.2.1)
294
+ tilt (2.1.0)
295
+ timeout (0.3.2)
296
+ tzinfo (2.0.6)
297
+ concurrent-ruby (~> 1.0)
298
+ webrick (1.8.1)
299
+ websocket-driver (0.7.5)
264
300
  websocket-extensions (>= 0.1.0)
265
- websocket-extensions (0.1.4)
301
+ websocket-extensions (0.1.5)
266
302
  xpath (2.0.0)
267
303
  nokogiri (~> 1.3)
304
+ zeitwerk (2.6.7)
268
305
 
269
306
  PLATFORMS
270
307
  ruby
@@ -286,8 +323,10 @@ DEPENDENCIES
286
323
  rspec-rails (~> 3.3)
287
324
  sassc-rails
288
325
  selectize-rails (>= 0.11.2)
289
- sqlite3 (~> 1.3, >= 1.3.11)
326
+ sprockets-rails
327
+ sqlite3 (~> 1.4)
290
328
  temping (~> 3.3, >= 3.3.0)
329
+ webrick
291
330
 
292
331
  BUNDLED WITH
293
332
  1.17.2
data/README.md CHANGED
@@ -1,7 +1,6 @@
1
1
  [![Gem Version](https://badge.fury.io/rb/activeadmin-ajax_filter.svg)](https://badge.fury.io/rb/activeadmin-ajax_filter)
2
- [![Build Status](https://travis-ci.org/holyketzer/activeadmin-ajax_filter.svg?branch=master)](https://travis-ci.org/holyketzer/activeadmin-ajax_filter)
2
+ [![Build Status](https://github.com/holyketzer/activeadmin-ajax_filter/actions/workflows/main.yaml/badge.svg)](https://github.com/holyketzer/activeadmin-ajax_filter/actions)
3
3
  [![Code Climate](https://codeclimate.com/github/holyketzer/activeadmin-ajax_filter/badges/gpa.svg)](https://codeclimate.com/github/holyketzer/activeadmin-ajax_filter)
4
- [![Test Coverage](https://codeclimate.com/github/holyketzer/activeadmin-ajax_filter/badges/coverage.svg)](https://codeclimate.com/github/holyketzer/activeadmin-ajax_filter/coverage)
5
4
 
6
5
  # Activeadmin::AjaxFilter
7
6
 
@@ -10,15 +9,15 @@ This gem extends ActiveAdmin so that your can use filters with AJAX-powered inpu
10
9
  <img src="https://user-images.githubusercontent.com/987021/53289159-709c5000-37a3-11e9-97d5-0e61d2759b3c.gif" width="276" alt="ActiveAdmin AJAX Filter input"/>
11
10
 
12
11
 
13
- ## Prerequisites
14
-
15
- Minimum Ruby version `2.5`
12
+ ## Prerequisites and notes
16
13
 
17
14
  This extension assumes that you're using [Active Admin](https://github.com/activeadmin/activeadmin) with [Ransack](https://github.com/activerecord-hackery/ransack). And for AJAX input it uses [selectize-rails](https://github.com/manuelvanrijn/selectize-rails)
18
15
 
19
- Version `0.4.5` - could brake you build due to issue with `sprockets` version major update, now it's yanked, use `0.4.6` instead.
20
-
21
- If you on `sprockets >= 4` and `rails >= 5` use version `0.5.0`
16
+ Versions:
17
+ * `0.7.0` - Rails 7, minimum Ruby version `2.7`
18
+ * `0.6.0` - Rails 6, minimum Ruby version `2.7`
19
+ * `0.5.0` - Rails 5, minimum Ruby version `2.5`
20
+ * `0.4.5` - could break you build due to issue with `sprockets` version major update, now it's yanked, use `0.4.6` instead. If you on `sprockets >= 4` and `rails >= 5` use version `0.5.0`
22
21
 
23
22
  ## Installation
24
23
 
@@ -38,11 +37,11 @@ Or install it yourself as:
38
37
 
39
38
  ## Usage
40
39
 
41
- Include this line in your JavaScript code (active_admin.js.coffee)
40
+ Include this line in your JavaScript code (active_admin.js)
42
41
 
43
- ```coffeescript
44
- #= require selectize
45
- #= require activeadmin-ajax_filter
42
+ ```js
43
+ //= require selectize
44
+ //= require activeadmin-ajax_filter
46
45
  ```
47
46
 
48
47
  Include this line in your CSS code (active_admin.scss)
@@ -100,6 +99,8 @@ You can use next parameters in `data` hash:
100
99
  * `ajax_search_fields` - array of field names. `ajax_select` input depends on `ajax_search_fields` values: e.g. you can scope user by languages.
101
100
  * `static_ransack` - hash of ransack predicates which will be applied statically and independently from current input field value
102
101
  * `min_chars_count_to_request` - minimal count of chars in the input field to make an AJAX request
102
+ * `placeholder` - input field placeholder.
103
+ * `close_after_select` - close search results drop-down after selected a value. Default is `false`.
103
104
 
104
105
  ### Filter by belongs_to relation fields
105
106
 
@@ -119,7 +120,7 @@ f.input :patient, as: :ajax_select, collection: [], data: {
119
120
  Ordering by related fields doesn't work, e.g. this will not work: `ordering: 'user.name ASC'`
120
121
 
121
122
 
122
- ## Caveats
123
+ ## Caveats
123
124
 
124
125
  ### Ransack _cont on Integer column
125
126
 
@@ -7,7 +7,7 @@ Gem::Specification.new do |gem|
7
7
  gem.name = 'activeadmin-ajax_filter'
8
8
  gem.version = ActiveAdmin::AjaxFilter::VERSION
9
9
  gem.authors = ['Alex Emelyanov']
10
- gem.email = ['aemelyanov@spbtv.com']
10
+ gem.email = ['holyketzer@gmail.com']
11
11
 
12
12
  gem.summary = 'AJAX filters for ActiveAdmin'
13
13
  gem.description = 'Allows to define form inputs and filters by relation for ActiveAdmin resource pages using Ransacker to dynamicaly load items while user is typing symbols in filter'
@@ -20,17 +20,17 @@ Gem::Specification.new do |gem|
20
20
  gem.require_paths = ['lib']
21
21
 
22
22
  gem.add_dependency 'activeadmin', '>= 1.0'
23
- gem.add_dependency 'rails', '>= 5.0'
23
+ gem.add_dependency 'rails', '>= 7.0'
24
24
  gem.add_dependency 'coffee-rails', '>= 4.1.0'
25
25
  gem.add_dependency 'selectize-rails', '>= 0.12.6'
26
- gem.add_dependency 'has_scope', '>= 0.6.0' # Force Ruby 2.1.5 support
26
+ # gem.add_dependency 'has_scope', '>= 0.6.0' # Force Ruby 2.1.5 support
27
27
  gem.add_development_dependency 'sassc-rails'
28
28
  gem.add_development_dependency 'bundler', '~> 1.10'
29
29
  gem.add_development_dependency 'rake', '~> 12'
30
30
  gem.add_development_dependency 'rspec', '~> 3.3', '>= 3.3.0'
31
31
  gem.add_development_dependency 'rspec-rails', '~> 3.3'
32
32
  gem.add_development_dependency 'factory_girl_rails'
33
- gem.add_development_dependency 'sqlite3', '~> 1.3', '>= 1.3.11'
33
+ gem.add_development_dependency 'sqlite3', '~> 1.4'
34
34
  gem.add_development_dependency 'temping', '~> 3.3', '>= 3.3.0'
35
35
  gem.add_development_dependency 'codeclimate-test-reporter', '~> 0.4'
36
36
  gem.add_development_dependency 'capybara', '~> 2.1'
@@ -40,4 +40,5 @@ Gem::Specification.new do |gem|
40
40
  gem.add_development_dependency 'database_cleaner', '~> 1.5'
41
41
  gem.add_development_dependency 'launchy', '~> 2.4.3'
42
42
  gem.add_development_dependency 'pry'
43
+ gem.add_development_dependency 'webrick'
43
44
  end
@@ -7,10 +7,12 @@ $ ->
7
7
  $('.filter_ajax_select select, .ajax_select select').each (_, select) ->
8
8
  select = $(select)
9
9
  valueField = select.data('value-field')
10
+ closeAfterSelect = select.data('close-after-select') || false
10
11
  display_fields = select.data('display-fields').split(' ')
11
12
  searchFields = select.data('search-fields').split(' ')
12
13
  staticRansack = select.data('static-ransack')
13
14
  minCharsCountToRequest = select.data('min-chars-count-to-request') || 1
15
+ placeholder = select.data('placeholder') || ''
14
16
 
15
17
  ajaxFields = select.data('ajax-search-fields')
16
18
  if ajaxFields
@@ -48,6 +50,8 @@ $ ->
48
50
  select.selectize
49
51
  valueField: valueField
50
52
  labelField: display_fields[0]
53
+ closeAfterSelect: closeAfterSelect
54
+ placeholder: placeholder
51
55
  searchField: searchFields
52
56
  sortField: ordering.split(',').map (clause)->
53
57
  c = clause.trim().split(' ')
@@ -1,5 +1,5 @@
1
1
  module ActiveAdmin
2
2
  module AjaxFilter
3
- VERSION = '0.5.0'
3
+ VERSION = '0.7.0'
4
4
  end
5
5
  end
@@ -20,6 +20,8 @@ module ActiveAdmin
20
20
  'data-selected-value' => selected_value,
21
21
  'data-url' => url,
22
22
  'data-min-chars-count-to-request' => min_chars_count_to_request,
23
+ 'data-placeholder' => placeholder,
24
+ 'data-close-after-select' => close_after_select
23
25
  )
24
26
  end
25
27
 
@@ -67,6 +69,14 @@ module ActiveAdmin
67
69
  ajax_data[:min_chars_count_to_request] || 1
68
70
  end
69
71
 
72
+ def placeholder
73
+ ajax_data[:placeholder]
74
+ end
75
+
76
+ def close_after_select
77
+ ajax_data[:close_after_select] || false
78
+ end
79
+
70
80
  def ransackify(field_names)
71
81
  # Map fields refer to related tables user.name -> user_name
72
82
  field_names.map { |f| f.to_s.sub('.', '_') }
@@ -0,0 +1,7 @@
1
+ # See https://git-scm.com/docs/gitattributes for more about git attribute files.
2
+
3
+ # Mark the database schema as having been generated.
4
+ db/schema.rb linguist-generated
5
+
6
+ # Mark any vendored files as having been vendored.
7
+ vendor/* linguist-vendored