administrate_batch_actions 0.3.4 → 0.4.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5bf62ca94161d9eefe69563f77a2abc7f6eba2b6d14dd3aed9442c790b213647
4
- data.tar.gz: 79389f69f7b43ab52dbbc5a039b3314fb4c7a21ff51a08f95548272c1c0effd4
3
+ metadata.gz: 0746a4349abe38810b2b33f1755d7197876245757a9ed52ee25c1c3b8cff4082
4
+ data.tar.gz: 88614f2191621f79ce08b0e1724e9da1eaca0eda3e8322bb6c1ac0ac4e45d6a4
5
5
  SHA512:
6
- metadata.gz: d5fe759872a24516bce4108e76b42fc5d203198ccbf06a13994881820a99ae617a274773551fbb4117e18f1265a291974da6b63fcfd998a1477de9708b607e35
7
- data.tar.gz: 553beb9ebd6f015493bea6fb5e2cdb212f840845c2c63ea12e0cbc91951a7f70c9bacc9d1f0fca02e8919dad8b36a119950aec2229f103f6133b885f96c36d88
6
+ metadata.gz: ebe0311465eebc8fffb539a4996ae4dcad2b2cff0da31797854d8e07a726f29deafbf74083e95fa033865fe5b7079482896f95f6afffcd491fd7c72f0723813e
7
+ data.tar.gz: e55b81b4d78727c8d4d57d9412fcc505741d6cff2b69ba82a22c467a0c59dc208d7b331e832b1481fe07bfb7dae490f306d42f7b03694d5bd942f6fd70c1ed8f
@@ -0,0 +1,29 @@
1
+ name: Specs
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+
8
+ pull_request:
9
+ branches:
10
+ - "*"
11
+
12
+ jobs:
13
+ build:
14
+ runs-on: ubuntu-latest
15
+ name: Ruby ${{ matrix.ruby }}
16
+ strategy:
17
+ matrix:
18
+ ruby:
19
+ - "3.4.6"
20
+
21
+ steps:
22
+ - uses: actions/checkout@v4
23
+ - name: Set up Ruby
24
+ uses: ruby/setup-ruby@v1
25
+ with:
26
+ ruby-version: ${{ matrix.ruby }}
27
+ bundler-cache: true
28
+ - name: Run the default task
29
+ run: bundle exec rake
data/.tool-versions ADDED
@@ -0,0 +1 @@
1
+ ruby 3.1
data/CHANGELOG.md ADDED
@@ -0,0 +1,50 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ ## [0.4.0] - 2026-03-26
6
+
7
+ ### Added
8
+ - Support for Administrate 1.0.0
9
+
10
+ ## [0.3.4] - 2023-01-10
11
+
12
+ ### Security
13
+ - Bump nokogiri from 1.13.9 to 1.13.10
14
+
15
+ ## [0.3.3] - 2022-10-18
16
+
17
+ ### Security
18
+ - Bump rails-html-sanitizer from 1.3.0 to 1.4.3
19
+ - Bump rack from 2.2.3 to 2.2.4
20
+
21
+ ## [0.3.2] - 2022-10-17
22
+
23
+ ### Fixed
24
+ - Initialize the script on page load
25
+ - Reset checkbox status after clicking browser back button
26
+
27
+ ## [0.3.1] - 2022-10-14
28
+
29
+ ### Changed
30
+ - Toggle action buttons based on selections
31
+
32
+ ## [0.3.0] - 2022-10-14
33
+
34
+ ### Changed
35
+ - Disable batch action buttons when no rows are selected
36
+
37
+ ## [0.2.0] - 2022-10-13
38
+
39
+ ### Changed
40
+ - Additional `html_options` support in the helper
41
+ - Gem renamed to `administrate_batch_actions`
42
+
43
+ ## [0.1.0] - 2022-10-12
44
+
45
+ ### Added
46
+ - Initial release
47
+ - Partials and helpers to render batch action buttons and checkboxes
48
+ - JavaScript for managing checkbox selection state
49
+ - Router to automatically load batch action paths
50
+ - Asset precompilation support
data/Gemfile CHANGED
@@ -6,5 +6,5 @@ git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
6
6
  gemspec
7
7
 
8
8
  group :test do
9
- gem 'tzinfo-data', platforms: %i[mingw mswin x64_mingw jruby]
10
- end
9
+ gem 'tzinfo-data', platforms: %i[mswin mswin64 mingw x64_mingw]
10
+ end
data/Gemfile.lock CHANGED
@@ -1,213 +1,252 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- administrate_batch_actions (0.1.0)
4
+ administrate_batch_actions (0.4.0)
5
5
  administrate
6
6
  rails (>= 5.2)
7
+ sprockets-rails
7
8
 
8
9
  GEM
9
10
  remote: https://rubygems.org/
10
11
  specs:
11
- actioncable (6.1.4)
12
- actionpack (= 6.1.4)
13
- activesupport (= 6.1.4)
12
+ actioncable (7.0.10)
13
+ actionpack (= 7.0.10)
14
+ activesupport (= 7.0.10)
14
15
  nio4r (~> 2.0)
15
16
  websocket-driver (>= 0.6.1)
16
- actionmailbox (6.1.4)
17
- actionpack (= 6.1.4)
18
- activejob (= 6.1.4)
19
- activerecord (= 6.1.4)
20
- activestorage (= 6.1.4)
21
- activesupport (= 6.1.4)
17
+ actionmailbox (7.0.10)
18
+ actionpack (= 7.0.10)
19
+ activejob (= 7.0.10)
20
+ activerecord (= 7.0.10)
21
+ activestorage (= 7.0.10)
22
+ activesupport (= 7.0.10)
22
23
  mail (>= 2.7.1)
23
- actionmailer (6.1.4)
24
- actionpack (= 6.1.4)
25
- actionview (= 6.1.4)
26
- activejob (= 6.1.4)
27
- activesupport (= 6.1.4)
24
+ net-imap
25
+ net-pop
26
+ net-smtp
27
+ actionmailer (7.0.10)
28
+ actionpack (= 7.0.10)
29
+ actionview (= 7.0.10)
30
+ activejob (= 7.0.10)
31
+ activesupport (= 7.0.10)
28
32
  mail (~> 2.5, >= 2.5.4)
33
+ net-imap
34
+ net-pop
35
+ net-smtp
29
36
  rails-dom-testing (~> 2.0)
30
- actionpack (6.1.4)
31
- actionview (= 6.1.4)
32
- activesupport (= 6.1.4)
33
- rack (~> 2.0, >= 2.0.9)
37
+ actionpack (7.0.10)
38
+ actionview (= 7.0.10)
39
+ activesupport (= 7.0.10)
40
+ racc
41
+ rack (~> 2.0, >= 2.2.4)
34
42
  rack-test (>= 0.6.3)
35
43
  rails-dom-testing (~> 2.0)
36
44
  rails-html-sanitizer (~> 1.0, >= 1.2.0)
37
- actiontext (6.1.4)
38
- actionpack (= 6.1.4)
39
- activerecord (= 6.1.4)
40
- activestorage (= 6.1.4)
41
- activesupport (= 6.1.4)
45
+ actiontext (7.0.10)
46
+ actionpack (= 7.0.10)
47
+ activerecord (= 7.0.10)
48
+ activestorage (= 7.0.10)
49
+ activesupport (= 7.0.10)
50
+ globalid (>= 0.6.0)
42
51
  nokogiri (>= 1.8.5)
43
- actionview (6.1.4)
44
- activesupport (= 6.1.4)
52
+ actionview (7.0.10)
53
+ activesupport (= 7.0.10)
45
54
  builder (~> 3.1)
46
55
  erubi (~> 1.4)
47
56
  rails-dom-testing (~> 2.0)
48
57
  rails-html-sanitizer (~> 1.1, >= 1.2.0)
49
- activejob (6.1.4)
50
- activesupport (= 6.1.4)
58
+ activejob (7.0.10)
59
+ activesupport (= 7.0.10)
51
60
  globalid (>= 0.3.6)
52
- activemodel (6.1.4)
53
- activesupport (= 6.1.4)
54
- activerecord (6.1.4)
55
- activemodel (= 6.1.4)
56
- activesupport (= 6.1.4)
57
- activestorage (6.1.4)
58
- actionpack (= 6.1.4)
59
- activejob (= 6.1.4)
60
- activerecord (= 6.1.4)
61
- activesupport (= 6.1.4)
62
- marcel (~> 1.0.0)
61
+ activemodel (7.0.10)
62
+ activesupport (= 7.0.10)
63
+ activerecord (7.0.10)
64
+ activemodel (= 7.0.10)
65
+ activesupport (= 7.0.10)
66
+ activestorage (7.0.10)
67
+ actionpack (= 7.0.10)
68
+ activejob (= 7.0.10)
69
+ activerecord (= 7.0.10)
70
+ activesupport (= 7.0.10)
71
+ marcel (~> 1.0)
63
72
  mini_mime (>= 1.1.0)
64
- activesupport (6.1.4)
73
+ activesupport (7.0.10)
74
+ base64
75
+ benchmark (>= 0.3)
76
+ bigdecimal
65
77
  concurrent-ruby (~> 1.0, >= 1.0.2)
78
+ drb
66
79
  i18n (>= 1.6, < 2)
80
+ logger (>= 1.4.2)
67
81
  minitest (>= 5.1)
82
+ mutex_m
83
+ securerandom (>= 0.3)
68
84
  tzinfo (~> 2.0)
69
- zeitwerk (~> 2.3)
70
- administrate (0.16.0)
71
- actionpack (>= 5.0)
72
- actionview (>= 5.0)
73
- activerecord (>= 5.0)
74
- datetime_picker_rails (~> 0.0.7)
75
- jquery-rails (>= 4.0)
76
- kaminari (>= 1.0)
77
- momentjs-rails (~> 2.8)
78
- sassc-rails (~> 2.1)
79
- selectize-rails (~> 0.6)
80
- builder (3.2.4)
85
+ administrate (1.0.0)
86
+ actionpack (>= 6.0, < 9.0)
87
+ actionview (>= 6.0, < 9.0)
88
+ activerecord (>= 6.0, < 9.0)
89
+ kaminari (~> 1.2.2)
90
+ base64 (0.3.0)
91
+ benchmark (0.5.0)
92
+ bigdecimal (4.0.1)
93
+ builder (3.3.0)
81
94
  coderay (1.1.3)
82
- concurrent-ruby (1.1.9)
95
+ concurrent-ruby (1.3.6)
83
96
  crass (1.0.6)
84
- datetime_picker_rails (0.0.7)
85
- momentjs-rails (>= 2.8.1)
86
- diff-lcs (1.3)
87
- erubi (1.10.0)
88
- ffi (1.15.3)
89
- globalid (0.5.2)
90
- activesupport (>= 5.0)
91
- i18n (1.8.10)
97
+ date (3.5.1)
98
+ diff-lcs (1.6.2)
99
+ drb (2.2.3)
100
+ erubi (1.13.1)
101
+ globalid (1.3.0)
102
+ activesupport (>= 6.1)
103
+ i18n (1.14.8)
92
104
  concurrent-ruby (~> 1.0)
93
- jquery-rails (4.4.0)
94
- rails-dom-testing (>= 1, < 3)
95
- railties (>= 4.2.0)
96
- thor (>= 0.14, < 2.0)
97
- kaminari (1.2.1)
105
+ io-console (0.8.2)
106
+ kaminari (1.2.2)
98
107
  activesupport (>= 4.1.0)
99
- kaminari-actionview (= 1.2.1)
100
- kaminari-activerecord (= 1.2.1)
101
- kaminari-core (= 1.2.1)
102
- kaminari-actionview (1.2.1)
108
+ kaminari-actionview (= 1.2.2)
109
+ kaminari-activerecord (= 1.2.2)
110
+ kaminari-core (= 1.2.2)
111
+ kaminari-actionview (1.2.2)
103
112
  actionview
104
- kaminari-core (= 1.2.1)
105
- kaminari-activerecord (1.2.1)
113
+ kaminari-core (= 1.2.2)
114
+ kaminari-activerecord (1.2.2)
106
115
  activerecord
107
- kaminari-core (= 1.2.1)
108
- kaminari-core (1.2.1)
109
- loofah (2.19.0)
116
+ kaminari-core (= 1.2.2)
117
+ kaminari-core (1.2.2)
118
+ logger (1.7.0)
119
+ loofah (2.25.1)
110
120
  crass (~> 1.0.2)
111
- nokogiri (>= 1.5.9)
112
- mail (2.7.1)
121
+ nokogiri (>= 1.12.0)
122
+ mail (2.9.0)
123
+ logger
113
124
  mini_mime (>= 0.1.1)
114
- marcel (1.0.1)
115
- method_source (1.0.0)
116
- mini_mime (1.1.0)
117
- mini_portile2 (2.8.0)
118
- minitest (5.14.4)
119
- momentjs-rails (2.20.1)
120
- railties (>= 3.1)
121
- nio4r (2.5.8)
122
- nokogiri (1.13.9)
123
- mini_portile2 (~> 2.8.0)
125
+ net-imap
126
+ net-pop
127
+ net-smtp
128
+ marcel (1.1.0)
129
+ method_source (1.1.0)
130
+ mini_mime (1.1.5)
131
+ minitest (5.27.0)
132
+ mutex_m (0.3.0)
133
+ net-imap (0.5.13)
134
+ date
135
+ net-protocol
136
+ net-pop (0.1.2)
137
+ net-protocol
138
+ net-protocol (0.2.2)
139
+ timeout
140
+ net-smtp (0.5.1)
141
+ net-protocol
142
+ nio4r (2.7.5)
143
+ nokogiri (1.18.10-aarch64-linux-gnu)
144
+ racc (~> 1.4)
145
+ nokogiri (1.18.10-aarch64-linux-musl)
146
+ racc (~> 1.4)
147
+ nokogiri (1.18.10-arm-linux-gnu)
148
+ racc (~> 1.4)
149
+ nokogiri (1.18.10-arm-linux-musl)
150
+ racc (~> 1.4)
151
+ nokogiri (1.18.10-arm64-darwin)
124
152
  racc (~> 1.4)
125
- pry (0.14.1)
153
+ nokogiri (1.18.10-x86_64-darwin)
154
+ racc (~> 1.4)
155
+ nokogiri (1.18.10-x86_64-linux-gnu)
156
+ racc (~> 1.4)
157
+ nokogiri (1.18.10-x86_64-linux-musl)
158
+ racc (~> 1.4)
159
+ pry (0.16.0)
126
160
  coderay (~> 1.1)
127
161
  method_source (~> 1.0)
128
- racc (1.6.0)
129
- rack (2.2.4)
130
- rack-test (1.1.0)
131
- rack (>= 1.0, < 3)
132
- rails (6.1.4)
133
- actioncable (= 6.1.4)
134
- actionmailbox (= 6.1.4)
135
- actionmailer (= 6.1.4)
136
- actionpack (= 6.1.4)
137
- actiontext (= 6.1.4)
138
- actionview (= 6.1.4)
139
- activejob (= 6.1.4)
140
- activemodel (= 6.1.4)
141
- activerecord (= 6.1.4)
142
- activestorage (= 6.1.4)
143
- activesupport (= 6.1.4)
162
+ reline (>= 0.6.0)
163
+ racc (1.8.1)
164
+ rack (2.2.22)
165
+ rack-test (2.2.0)
166
+ rack (>= 1.3)
167
+ rails (7.0.10)
168
+ actioncable (= 7.0.10)
169
+ actionmailbox (= 7.0.10)
170
+ actionmailer (= 7.0.10)
171
+ actionpack (= 7.0.10)
172
+ actiontext (= 7.0.10)
173
+ actionview (= 7.0.10)
174
+ activejob (= 7.0.10)
175
+ activemodel (= 7.0.10)
176
+ activerecord (= 7.0.10)
177
+ activestorage (= 7.0.10)
178
+ activesupport (= 7.0.10)
144
179
  bundler (>= 1.15.0)
145
- railties (= 6.1.4)
146
- sprockets-rails (>= 2.0.0)
147
- rails-dom-testing (2.0.3)
148
- activesupport (>= 4.2.0)
180
+ railties (= 7.0.10)
181
+ rails-dom-testing (2.3.0)
182
+ activesupport (>= 5.0.0)
183
+ minitest
149
184
  nokogiri (>= 1.6)
150
- rails-html-sanitizer (1.4.3)
151
- loofah (~> 2.3)
152
- railties (6.1.4)
153
- actionpack (= 6.1.4)
154
- activesupport (= 6.1.4)
185
+ rails-html-sanitizer (1.7.0)
186
+ loofah (~> 2.25)
187
+ nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0)
188
+ railties (7.0.10)
189
+ actionpack (= 7.0.10)
190
+ activesupport (= 7.0.10)
155
191
  method_source
156
- rake (>= 0.13)
192
+ rake (>= 12.2)
157
193
  thor (~> 1.0)
158
- rake (13.0.6)
159
- rspec (3.8.0)
160
- rspec-core (~> 3.8.0)
161
- rspec-expectations (~> 3.8.0)
162
- rspec-mocks (~> 3.8.0)
163
- rspec-core (3.8.0)
164
- rspec-support (~> 3.8.0)
165
- rspec-expectations (3.8.1)
194
+ zeitwerk (~> 2.5)
195
+ rake (13.3.1)
196
+ reline (0.6.3)
197
+ io-console (~> 0.5)
198
+ rspec (3.9.0)
199
+ rspec-core (~> 3.9.0)
200
+ rspec-expectations (~> 3.9.0)
201
+ rspec-mocks (~> 3.9.0)
202
+ rspec-core (3.9.3)
203
+ rspec-support (~> 3.9.3)
204
+ rspec-expectations (3.9.4)
166
205
  diff-lcs (>= 1.2.0, < 2.0)
167
- rspec-support (~> 3.8.0)
168
- rspec-mocks (3.8.0)
206
+ rspec-support (~> 3.9.0)
207
+ rspec-mocks (3.9.1)
169
208
  diff-lcs (>= 1.2.0, < 2.0)
170
- rspec-support (~> 3.8.0)
171
- rspec-rails (3.8.3)
209
+ rspec-support (~> 3.9.0)
210
+ rspec-rails (3.9.1)
172
211
  actionpack (>= 3.0)
173
212
  activesupport (>= 3.0)
174
213
  railties (>= 3.0)
175
- rspec-core (~> 3.8.0)
176
- rspec-expectations (~> 3.8.0)
177
- rspec-mocks (~> 3.8.0)
178
- rspec-support (~> 3.8.0)
179
- rspec-support (3.8.0)
180
- sassc (2.4.0)
181
- ffi (~> 1.9)
182
- sassc-rails (2.1.2)
183
- railties (>= 4.0.0)
184
- sassc (>= 2.0)
185
- sprockets (> 3.0)
186
- sprockets-rails
187
- tilt
188
- selectize-rails (0.12.6)
189
- sprockets (4.0.2)
214
+ rspec-core (~> 3.9.0)
215
+ rspec-expectations (~> 3.9.0)
216
+ rspec-mocks (~> 3.9.0)
217
+ rspec-support (~> 3.9.0)
218
+ rspec-support (3.9.4)
219
+ securerandom (0.4.1)
220
+ sprockets (4.2.2)
190
221
  concurrent-ruby (~> 1.0)
191
- rack (> 1, < 3)
192
- sprockets-rails (3.2.2)
193
- actionpack (>= 4.0)
194
- activesupport (>= 4.0)
222
+ logger
223
+ rack (>= 2.2.4, < 4)
224
+ sprockets-rails (3.5.2)
225
+ actionpack (>= 6.1)
226
+ activesupport (>= 6.1)
195
227
  sprockets (>= 3.0.0)
196
- thor (1.1.0)
197
- tilt (2.0.10)
198
- tzinfo (2.0.4)
228
+ thor (1.5.0)
229
+ timeout (0.6.1)
230
+ tzinfo (2.0.6)
199
231
  concurrent-ruby (~> 1.0)
200
- websocket-driver (0.7.5)
232
+ websocket-driver (0.8.0)
233
+ base64
201
234
  websocket-extensions (>= 0.1.0)
202
235
  websocket-extensions (0.1.5)
203
- zeitwerk (2.4.2)
236
+ zeitwerk (2.6.18)
204
237
 
205
238
  PLATFORMS
206
- ruby
239
+ aarch64-linux-gnu
240
+ aarch64-linux-musl
241
+ arm-linux-gnu
242
+ arm-linux-musl
243
+ arm64-darwin
244
+ x86_64-darwin
245
+ x86_64-linux-gnu
246
+ x86_64-linux-musl
207
247
 
208
248
  DEPENDENCIES
209
249
  administrate_batch_actions!
210
- bundler (~> 1.16)
211
250
  pry
212
251
  rake (~> 13.0)
213
252
  rspec (~> 3.0)
@@ -215,4 +254,4 @@ DEPENDENCIES
215
254
  tzinfo-data
216
255
 
217
256
  BUNDLED WITH
218
- 1.16.3
257
+ 2.6.9
data/README.md CHANGED
@@ -1,10 +1,14 @@
1
1
  # AdministrateBatchActions
2
2
 
3
+ [![RSpec](https://github.com/SourceLabsLLC/administrate_batch_actions/actions/workflows/specs.yml/badge.svg)](https://github.com/SourceLabsLLC/administrate_batch_actions/actions/workflows/specs.yml)
4
+ [![Gem Version](https://badge.fury.io/rb/administrate_batch_actions.svg)](https://badge.fury.io/rb/administrate_batch_actions)
5
+
3
6
  This plugin for [Administrate](https://github.com/thoughtbot/administrate) allows you to add batch/bulk actions to your Administrate resources index lists, such as batch deletion or batch approval, etc.
4
7
 
5
8
  The available helpers add individual checkboxes, a 'select all' checkbox and batch action buttons which allow you to integrate custom batch/bulk actions.
6
9
 
7
10
  ## Demo
11
+
8
12
  ![Aug-21-2021 21-56-48](https://user-images.githubusercontent.com/541665/130339415-c69f4b53-e248-449a-8764-7a854c5b0dcb.gif)
9
13
 
10
14
  ## Installation
@@ -26,15 +30,18 @@ Or install it yourself:
26
30
  ## Usage
27
31
 
28
32
  The gem introduces three helper methods below:
33
+
29
34
  ```
30
35
  <%= administrate_batch_actions_select_all() %> # renders Select All checkbox
31
36
  ```
32
- Insert the helper between the 2 lines in [_collection.html.erb](https://github.com/thoughtbot/administrate/blob/v0.16.0/app/views/administrate/application/_collection.html.erb#L23-L24)
37
+
38
+ Insert the helper between the 2 lines in [\_collection.html.erb](https://github.com/thoughtbot/administrate/blob/v1.0.0/app/views/administrate/application/_collection.html.erb#L23-L24)
33
39
 
34
40
  ```
35
41
  <%= administrate_batch_actions_checkbox(resource.id) %> # individual row checkbox
36
42
  ```
37
- Insert the helper between the 2 lines in [_collection.html.erb](https://github.com/thoughtbot/administrate/blob/v0.16.0/app/views/administrate/application/_collection.html.erb#L61-L62)
43
+
44
+ Insert the helper between the 2 lines in [\_collection.html.erb](https://github.com/thoughtbot/administrate/blob/v1.0.0/app/views/administrate/application/_collection.html.erb#L74-L75)
38
45
 
39
46
  ```
40
47
  <%=
@@ -45,14 +52,16 @@ Insert the helper between the 2 lines in [_collection.html.erb](https://github.c
45
52
  )
46
53
  %> # batch action submit button with optional `class` and `confirm` message params
47
54
  ```
48
- Insert the helper between the 2 lines in [_index.html.erb](https://github.com/thoughtbot/administrate/blob/v0.16.0/app/views/administrate/application/index.html.erb#L34)
55
+
56
+ Insert the helper between the 2 lines in [\_index.html.erb](https://github.com/thoughtbot/administrate/blob/v1.0.0/app/views/administrate/application/_index_header.html.erb#L38)
49
57
 
50
58
  You need to create custom Administrate views and insert the helpers above.
51
59
 
52
60
  Afterwards-- define your custom controller actions named as `*_batch_action` e.g.:
53
- * `def delete_batch_action ; ...; end`
54
- * `def approve_batch_action; ...; end`
55
- * etc
61
+
62
+ - `def delete_batch_action ; ...; end`
63
+ - `def approve_batch_action; ...; end`
64
+ - etc
56
65
 
57
66
  The gem will auto-generate route entries for controller actions that match this pattern. For instance-- if I have an action below:
58
67
 
@@ -64,9 +73,11 @@ end
64
73
  ```
65
74
 
66
75
  The gem will auto-generate the following route:
76
+
67
77
  ```
68
78
  delete_batch_action_admin_users POST /admin/users/delete_batch_action(.:format) admin/users#delete_batch_action
69
79
  ```
80
+
70
81
  So you can call the method to display the button like so: `<%= administrate_batch_actions_button('Delete Selected, delete_batch_action_admin_users_path)`
71
82
 
72
83
  ## Development
@@ -28,11 +28,11 @@ Gem::Specification.new do |spec|
28
28
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
29
29
  spec.require_paths = ['lib']
30
30
 
31
- spec.add_development_dependency 'bundler', '~> 1.16'
32
31
  spec.add_development_dependency 'rake', '~> 13.0'
33
32
  spec.add_development_dependency 'rspec', '~> 3.0'
34
33
  spec.add_development_dependency 'rspec-rails', '~> 3.0'
35
34
  spec.add_development_dependency 'pry'
35
+ spec.add_dependency 'sprockets-rails'
36
36
  spec.add_dependency 'administrate'
37
37
  spec.add_dependency 'rails', '>= 5.2'
38
38
  end
@@ -1,3 +1,3 @@
1
1
  <td>
2
- <input type="checkbox" value="<%= value %>" name='batch_action_ids[]' data-batch-action-option="checkbox" />
2
+ <input type="checkbox" value="<%= value %>" name="batch_action_ids[]" data-batch-action-option="checkbox" />
3
3
  </td>
@@ -1,3 +1,3 @@
1
1
  module AdministrateBatchActions
2
- VERSION = "0.3.4"
2
+ VERSION = "0.4.0"
3
3
  end
@@ -9,11 +9,16 @@ require 'administrate_batch_actions/version'
9
9
 
10
10
  module AdministrateBatchActions
11
11
  class Engine < ::Rails::Engine
12
+ initializer "administrate_batch_actions.assets.precompile" do |app|
13
+ app.config.assets.precompile += [
14
+ "administrate_batch_actions/script.js"
15
+ ]
16
+ end
17
+
12
18
  Administrate::Engine.add_javascript 'administrate_batch_actions/script'
13
19
 
14
20
  initializer "administrate_batch_actions.engine" do |app|
15
21
  ActionView::Base.send :include, AdministrateBatchActions::Helpers
16
-
17
22
  end
18
23
  end
19
24
  end
metadata CHANGED
@@ -1,29 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: administrate_batch_actions
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.4
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sourcelabs LLC
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-10-22 00:00:00.000000000 Z
11
+ date: 2026-03-26 00:00:00.000000000 Z
12
12
  dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: bundler
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - "~>"
18
- - !ruby/object:Gem::Version
19
- version: '1.16'
20
- type: :development
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - "~>"
25
- - !ruby/object:Gem::Version
26
- version: '1.16'
27
13
  - !ruby/object:Gem::Dependency
28
14
  name: rake
29
15
  requirement: !ruby/object:Gem::Requirement
@@ -80,6 +66,20 @@ dependencies:
80
66
  - - ">="
81
67
  - !ruby/object:Gem::Version
82
68
  version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: sprockets-rails
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: administrate
85
85
  requirement: !ruby/object:Gem::Requirement
@@ -115,9 +115,11 @@ executables: []
115
115
  extensions: []
116
116
  extra_rdoc_files: []
117
117
  files:
118
+ - ".github/workflows/specs.yml"
118
119
  - ".gitignore"
119
120
  - ".rspec"
120
- - ".travis.yml"
121
+ - ".tool-versions"
122
+ - CHANGELOG.md
121
123
  - CODE_OF_CONDUCT.md
122
124
  - Gemfile
123
125
  - Gemfile.lock
@@ -131,7 +133,6 @@ files:
131
133
  - app/views/shared/administrate_batch_actions/_select_all.html.erb
132
134
  - bin/console
133
135
  - bin/setup
134
- - config/initializers/administrate_batch_actions.rb
135
136
  - config/routes.rb
136
137
  - lib/administrate_batch_actions.rb
137
138
  - lib/administrate_batch_actions/helpers.rb
@@ -140,7 +141,7 @@ homepage: https://github.com/SourceLabsLLC/administrate-batch-actions
140
141
  licenses:
141
142
  - MIT
142
143
  metadata: {}
143
- post_install_message:
144
+ post_install_message:
144
145
  rdoc_options: []
145
146
  require_paths:
146
147
  - lib
@@ -155,8 +156,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
155
156
  - !ruby/object:Gem::Version
156
157
  version: '0'
157
158
  requirements: []
158
- rubygems_version: 3.2.3
159
- signing_key:
159
+ rubygems_version: 3.0.3.1
160
+ signing_key:
160
161
  specification_version: 4
161
162
  summary: Batch Actions plugin for Administrate
162
163
  test_files: []
data/.travis.yml DELETED
@@ -1,7 +0,0 @@
1
- ---
2
- sudo: false
3
- language: ruby
4
- cache: bundler
5
- rvm:
6
- - 2.5.1
7
- before_install: gem install bundler -v 1.16.3
@@ -1 +0,0 @@
1
- Rails.application.config.assets.precompile += %w( administrate_batch_actions/script.js )