administrate-field-active_storage 0.3.8 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.ruby-version +1 -1
- data/Gemfile.lock +102 -108
- data/README.md +14 -2
- data/administrate-field-active_storage.gemspec +2 -2
- data/app/assets/stylesheets/administrate-field-active_storage/application.css +15 -0
- data/app/views/fields/active_storage/_index.html.erb +2 -5
- data/app/views/fields/active_storage/_items.html.erb +2 -0
- data/app/views/fields/active_storage/_preview.html.erb +7 -17
- data/lib/administrate/field/active_storage.rb +9 -0
- data/test_app/Gemfile +4 -4
- data/test_app/Gemfile.lock +118 -115
- metadata +6 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 325bb9d01b865e2f1040d323dadadfdba96ef0a1dd2931392f24943012491764
|
4
|
+
data.tar.gz: fd8cdf3df0ba4638eea1125bb557878646cc40979c41a1522487c0af162fa052
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0fa9781cf805f7e80bf482c27ad0cf88180f014bc88a8234c6aa219855bd6d7d745b45783b2128c4482be9785cac0884b00e2e2bb401b1a158707cf6fbfded1f
|
7
|
+
data.tar.gz: 4dfc6fe7861abd65ff323effba94baf3485a00c43d0889e8efc6d68a3540d8a93509c762c7dd3dce94c6320b15badf2afc9b842d41cb29ec574f3c34ee9a0280
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.0.
|
1
|
+
3.0.3
|
data/Gemfile.lock
CHANGED
@@ -1,77 +1,76 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
administrate-field-active_storage (0.3.
|
4
|
+
administrate-field-active_storage (0.3.8)
|
5
5
|
administrate (>= 0.2.2)
|
6
6
|
rails (>= 6.0)
|
7
7
|
|
8
8
|
GEM
|
9
9
|
remote: https://rubygems.org/
|
10
10
|
specs:
|
11
|
-
actioncable (
|
12
|
-
actionpack (=
|
13
|
-
activesupport (=
|
11
|
+
actioncable (7.0.0)
|
12
|
+
actionpack (= 7.0.0)
|
13
|
+
activesupport (= 7.0.0)
|
14
14
|
nio4r (~> 2.0)
|
15
15
|
websocket-driver (>= 0.6.1)
|
16
|
-
actionmailbox (
|
17
|
-
actionpack (=
|
18
|
-
activejob (=
|
19
|
-
activerecord (=
|
20
|
-
activestorage (=
|
21
|
-
activesupport (=
|
16
|
+
actionmailbox (7.0.0)
|
17
|
+
actionpack (= 7.0.0)
|
18
|
+
activejob (= 7.0.0)
|
19
|
+
activerecord (= 7.0.0)
|
20
|
+
activestorage (= 7.0.0)
|
21
|
+
activesupport (= 7.0.0)
|
22
22
|
mail (>= 2.7.1)
|
23
|
-
actionmailer (
|
24
|
-
actionpack (=
|
25
|
-
actionview (=
|
26
|
-
activejob (=
|
27
|
-
activesupport (=
|
23
|
+
actionmailer (7.0.0)
|
24
|
+
actionpack (= 7.0.0)
|
25
|
+
actionview (= 7.0.0)
|
26
|
+
activejob (= 7.0.0)
|
27
|
+
activesupport (= 7.0.0)
|
28
28
|
mail (~> 2.5, >= 2.5.4)
|
29
29
|
rails-dom-testing (~> 2.0)
|
30
|
-
actionpack (
|
31
|
-
actionview (=
|
32
|
-
activesupport (=
|
33
|
-
rack (~> 2.0, >= 2.0
|
30
|
+
actionpack (7.0.0)
|
31
|
+
actionview (= 7.0.0)
|
32
|
+
activesupport (= 7.0.0)
|
33
|
+
rack (~> 2.0, >= 2.2.0)
|
34
34
|
rack-test (>= 0.6.3)
|
35
35
|
rails-dom-testing (~> 2.0)
|
36
36
|
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
37
|
-
actiontext (
|
38
|
-
actionpack (=
|
39
|
-
activerecord (=
|
40
|
-
activestorage (=
|
41
|
-
activesupport (=
|
37
|
+
actiontext (7.0.0)
|
38
|
+
actionpack (= 7.0.0)
|
39
|
+
activerecord (= 7.0.0)
|
40
|
+
activestorage (= 7.0.0)
|
41
|
+
activesupport (= 7.0.0)
|
42
|
+
globalid (>= 0.6.0)
|
42
43
|
nokogiri (>= 1.8.5)
|
43
|
-
actionview (
|
44
|
-
activesupport (=
|
44
|
+
actionview (7.0.0)
|
45
|
+
activesupport (= 7.0.0)
|
45
46
|
builder (~> 3.1)
|
46
47
|
erubi (~> 1.4)
|
47
48
|
rails-dom-testing (~> 2.0)
|
48
49
|
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
49
|
-
activejob (
|
50
|
-
activesupport (=
|
50
|
+
activejob (7.0.0)
|
51
|
+
activesupport (= 7.0.0)
|
51
52
|
globalid (>= 0.3.6)
|
52
|
-
activemodel (
|
53
|
-
activesupport (=
|
54
|
-
activerecord (
|
55
|
-
activemodel (=
|
56
|
-
activesupport (=
|
57
|
-
activestorage (
|
58
|
-
actionpack (=
|
59
|
-
activejob (=
|
60
|
-
activerecord (=
|
61
|
-
activesupport (=
|
62
|
-
marcel (~> 0
|
63
|
-
|
64
|
-
activesupport (
|
53
|
+
activemodel (7.0.0)
|
54
|
+
activesupport (= 7.0.0)
|
55
|
+
activerecord (7.0.0)
|
56
|
+
activemodel (= 7.0.0)
|
57
|
+
activesupport (= 7.0.0)
|
58
|
+
activestorage (7.0.0)
|
59
|
+
actionpack (= 7.0.0)
|
60
|
+
activejob (= 7.0.0)
|
61
|
+
activerecord (= 7.0.0)
|
62
|
+
activesupport (= 7.0.0)
|
63
|
+
marcel (~> 1.0)
|
64
|
+
mini_mime (>= 1.1.0)
|
65
|
+
activesupport (7.0.0)
|
65
66
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
66
67
|
i18n (>= 1.6, < 2)
|
67
68
|
minitest (>= 5.1)
|
68
69
|
tzinfo (~> 2.0)
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
activerecord (>= 4.2)
|
74
|
-
autoprefixer-rails (>= 6.0)
|
70
|
+
administrate (0.16.0)
|
71
|
+
actionpack (>= 5.0)
|
72
|
+
actionview (>= 5.0)
|
73
|
+
activerecord (>= 5.0)
|
75
74
|
datetime_picker_rails (~> 0.0.7)
|
76
75
|
jquery-rails (>= 4.0)
|
77
76
|
kaminari (>= 1.0)
|
@@ -79,22 +78,19 @@ GEM
|
|
79
78
|
sassc-rails (~> 2.1)
|
80
79
|
selectize-rails (~> 0.6)
|
81
80
|
ast (2.4.2)
|
82
|
-
autoprefixer-rails (10.2.0.0)
|
83
|
-
execjs
|
84
81
|
builder (3.2.4)
|
85
|
-
concurrent-ruby (1.1.
|
82
|
+
concurrent-ruby (1.1.9)
|
86
83
|
crass (1.0.6)
|
87
84
|
datetime_picker_rails (0.0.7)
|
88
85
|
momentjs-rails (>= 2.8.1)
|
89
86
|
erubi (1.10.0)
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
activesupport (>= 4.2.0)
|
87
|
+
ffi (1.15.4)
|
88
|
+
globalid (1.0.0)
|
89
|
+
activesupport (>= 5.0)
|
94
90
|
highline (2.0.3)
|
95
|
-
i18n (1.8.
|
91
|
+
i18n (1.8.11)
|
96
92
|
concurrent-ruby (~> 1.0)
|
97
|
-
i18n-tasks (0.9.
|
93
|
+
i18n-tasks (0.9.37)
|
98
94
|
activesupport (>= 4.0.2)
|
99
95
|
ast (>= 2.1.0)
|
100
96
|
erubi
|
@@ -108,73 +104,71 @@ GEM
|
|
108
104
|
rails-dom-testing (>= 1, < 3)
|
109
105
|
railties (>= 4.2.0)
|
110
106
|
thor (>= 0.14, < 2.0)
|
111
|
-
kaminari (1.2.
|
107
|
+
kaminari (1.2.2)
|
112
108
|
activesupport (>= 4.1.0)
|
113
|
-
kaminari-actionview (= 1.2.
|
114
|
-
kaminari-activerecord (= 1.2.
|
115
|
-
kaminari-core (= 1.2.
|
116
|
-
kaminari-actionview (1.2.
|
109
|
+
kaminari-actionview (= 1.2.2)
|
110
|
+
kaminari-activerecord (= 1.2.2)
|
111
|
+
kaminari-core (= 1.2.2)
|
112
|
+
kaminari-actionview (1.2.2)
|
117
113
|
actionview
|
118
|
-
kaminari-core (= 1.2.
|
119
|
-
kaminari-activerecord (1.2.
|
114
|
+
kaminari-core (= 1.2.2)
|
115
|
+
kaminari-activerecord (1.2.2)
|
120
116
|
activerecord
|
121
|
-
kaminari-core (= 1.2.
|
122
|
-
kaminari-core (1.2.
|
123
|
-
loofah (2.
|
117
|
+
kaminari-core (= 1.2.2)
|
118
|
+
kaminari-core (1.2.2)
|
119
|
+
loofah (2.13.0)
|
124
120
|
crass (~> 1.0.2)
|
125
121
|
nokogiri (>= 1.5.9)
|
126
122
|
mail (2.7.1)
|
127
123
|
mini_mime (>= 0.1.1)
|
128
|
-
marcel (0.
|
129
|
-
mimemagic (~> 0.3.2)
|
124
|
+
marcel (1.0.2)
|
130
125
|
method_source (1.0.0)
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
momentjs-rails (2.20.1)
|
126
|
+
mini_mime (1.1.2)
|
127
|
+
minitest (5.15.0)
|
128
|
+
momentjs-rails (2.29.1)
|
135
129
|
railties (>= 3.1)
|
136
|
-
nio4r (2.5.
|
137
|
-
nokogiri (1.
|
130
|
+
nio4r (2.5.8)
|
131
|
+
nokogiri (1.13.3-x86_64-darwin)
|
138
132
|
racc (~> 1.4)
|
139
|
-
nokogiri (1.
|
133
|
+
nokogiri (1.13.3-x86_64-linux)
|
140
134
|
racc (~> 1.4)
|
141
|
-
parser (3.0.
|
135
|
+
parser (3.0.3.2)
|
142
136
|
ast (~> 2.4.1)
|
143
|
-
racc (1.
|
137
|
+
racc (1.6.0)
|
144
138
|
rack (2.2.3)
|
145
139
|
rack-test (1.1.0)
|
146
140
|
rack (>= 1.0, < 3)
|
147
|
-
rails (
|
148
|
-
actioncable (=
|
149
|
-
actionmailbox (=
|
150
|
-
actionmailer (=
|
151
|
-
actionpack (=
|
152
|
-
actiontext (=
|
153
|
-
actionview (=
|
154
|
-
activejob (=
|
155
|
-
activemodel (=
|
156
|
-
activerecord (=
|
157
|
-
activestorage (=
|
158
|
-
activesupport (=
|
141
|
+
rails (7.0.0)
|
142
|
+
actioncable (= 7.0.0)
|
143
|
+
actionmailbox (= 7.0.0)
|
144
|
+
actionmailer (= 7.0.0)
|
145
|
+
actionpack (= 7.0.0)
|
146
|
+
actiontext (= 7.0.0)
|
147
|
+
actionview (= 7.0.0)
|
148
|
+
activejob (= 7.0.0)
|
149
|
+
activemodel (= 7.0.0)
|
150
|
+
activerecord (= 7.0.0)
|
151
|
+
activestorage (= 7.0.0)
|
152
|
+
activesupport (= 7.0.0)
|
159
153
|
bundler (>= 1.15.0)
|
160
|
-
railties (=
|
161
|
-
sprockets-rails (>= 2.0.0)
|
154
|
+
railties (= 7.0.0)
|
162
155
|
rails-dom-testing (2.0.3)
|
163
156
|
activesupport (>= 4.2.0)
|
164
157
|
nokogiri (>= 1.6)
|
165
|
-
rails-html-sanitizer (1.
|
158
|
+
rails-html-sanitizer (1.4.2)
|
166
159
|
loofah (~> 2.3)
|
167
|
-
rails-i18n (
|
160
|
+
rails-i18n (7.0.1)
|
168
161
|
i18n (>= 0.7, < 2)
|
169
|
-
railties (>= 6.0.0, <
|
170
|
-
railties (
|
171
|
-
actionpack (=
|
172
|
-
activesupport (=
|
162
|
+
railties (>= 6.0.0, < 8)
|
163
|
+
railties (7.0.0)
|
164
|
+
actionpack (= 7.0.0)
|
165
|
+
activesupport (= 7.0.0)
|
173
166
|
method_source
|
174
|
-
rake (>=
|
167
|
+
rake (>= 12.2)
|
175
168
|
thor (~> 1.0)
|
169
|
+
zeitwerk (~> 2.5)
|
176
170
|
rainbow (3.0.0)
|
177
|
-
rake (13.0.
|
171
|
+
rake (13.0.6)
|
178
172
|
sassc (2.4.0)
|
179
173
|
ffi (~> 1.9)
|
180
174
|
sassc-rails (2.1.2)
|
@@ -187,22 +181,22 @@ GEM
|
|
187
181
|
sprockets (4.0.2)
|
188
182
|
concurrent-ruby (~> 1.0)
|
189
183
|
rack (> 1, < 3)
|
190
|
-
sprockets-rails (3.
|
191
|
-
actionpack (>=
|
192
|
-
activesupport (>=
|
184
|
+
sprockets-rails (3.4.2)
|
185
|
+
actionpack (>= 5.2)
|
186
|
+
activesupport (>= 5.2)
|
193
187
|
sprockets (>= 3.0.0)
|
194
188
|
sqlite3 (1.4.2)
|
195
|
-
terminal-table (3.0.
|
196
|
-
unicode-display_width (
|
189
|
+
terminal-table (3.0.2)
|
190
|
+
unicode-display_width (>= 1.1.1, < 3)
|
197
191
|
thor (1.1.0)
|
198
192
|
tilt (2.0.10)
|
199
193
|
tzinfo (2.0.4)
|
200
194
|
concurrent-ruby (~> 1.0)
|
201
|
-
unicode-display_width (1.
|
202
|
-
websocket-driver (0.7.
|
195
|
+
unicode-display_width (2.1.0)
|
196
|
+
websocket-driver (0.7.5)
|
203
197
|
websocket-extensions (>= 0.1.0)
|
204
198
|
websocket-extensions (0.1.5)
|
205
|
-
zeitwerk (2.
|
199
|
+
zeitwerk (2.5.2)
|
206
200
|
|
207
201
|
PLATFORMS
|
208
202
|
x86_64-darwin-20
|
@@ -214,4 +208,4 @@ DEPENDENCIES
|
|
214
208
|
sqlite3 (~> 1.4)
|
215
209
|
|
216
210
|
BUNDLED WITH
|
217
|
-
2.2.
|
211
|
+
2.2.33
|
data/README.md
CHANGED
@@ -190,6 +190,17 @@ for documentation.
|
|
190
190
|
|
191
191
|
Default to `[150, 150]` and `[800, 800]`, respectively.
|
192
192
|
|
193
|
+
### index_preview_variant and show_preview_variant
|
194
|
+
|
195
|
+
Use a named variant for image preview for the `index` and `show` actions, respectively.
|
196
|
+
Named image variants were [added in Rails 7](https://guides.rubyonrails.org/v7.0/active_storage_overview.html#has-one-attached).
|
197
|
+
|
198
|
+
It might be necessary to add to app/assets/config/manifest.js:
|
199
|
+
```rb
|
200
|
+
//= link 'administrate-field-active_storage/application.css'
|
201
|
+
```
|
202
|
+
When set, this takes precedence over `index_preview_size` and `show_preview_size`.
|
203
|
+
|
193
204
|
### index_display_count
|
194
205
|
|
195
206
|
Displays the number of attachments in the `index` action.
|
@@ -222,8 +233,9 @@ You can see translation example [here](https://github.com/Dreamersoul/administra
|
|
222
233
|
|
223
234
|
## Contribution Guide:
|
224
235
|
1. contributers are welcome (code, suggestions, and bugs).
|
225
|
-
2. please
|
226
|
-
3.
|
236
|
+
2. please test your code: `cd test_app && bundle && bundle exec rails test`.
|
237
|
+
3. please document your code.
|
238
|
+
4. add your name to the `contribute.md`.
|
227
239
|
|
228
240
|
---
|
229
241
|
Based on the [Administrate::Field::Image](https://github.com/thoughtbot/administrate-field-image) template, and inspired by [Administrate::Field::Paperclip](https://github.com/picandocodigo/administrate-field-paperclip).
|
@@ -2,7 +2,7 @@ $:.push File.expand_path("../lib", __FILE__)
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |gem|
|
4
4
|
gem.name = "administrate-field-active_storage"
|
5
|
-
gem.version = "0.
|
5
|
+
gem.version = "0.4.0"
|
6
6
|
gem.authors = ["Hamad AlGhanim"]
|
7
7
|
gem.email = ["hamadyalghanim@gmail.com"]
|
8
8
|
gem.homepage = "https://github.com/Dreamersoul/administrate-field-active_storage"
|
@@ -15,7 +15,7 @@ Gem::Specification.new do |gem|
|
|
15
15
|
gem.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
16
16
|
|
17
17
|
gem.add_dependency "administrate", ">= 0.2.2"
|
18
|
-
gem.add_dependency "rails", ">=
|
18
|
+
gem.add_dependency "rails", ">= 7.0"
|
19
19
|
|
20
20
|
gem.add_development_dependency 'sqlite3', '~> 1.4'
|
21
21
|
gem.add_development_dependency 'i18n-tasks', '~> 0.9.34'
|
@@ -16,16 +16,12 @@ By default, the attribute is rendered as an image tag.
|
|
16
16
|
%>
|
17
17
|
|
18
18
|
<% if field.attached? %>
|
19
|
-
<style type="text/css" nonce="<%= content_security_policy_nonce %>"> <%# figure out a way to remove this %>
|
20
|
-
td img {
|
21
|
-
max-height: unset !important;
|
22
|
-
}
|
23
|
-
</style>
|
24
19
|
<% if field.index_display_preview? %>
|
25
20
|
<% if field.many? %>
|
26
21
|
<%= render partial: 'fields/active_storage/items',
|
27
22
|
locals: {
|
28
23
|
field: field,
|
24
|
+
variant: field.index_preview_variant,
|
29
25
|
size: field.index_preview_size
|
30
26
|
} %>
|
31
27
|
<% else %>
|
@@ -33,6 +29,7 @@ By default, the attribute is rendered as an image tag.
|
|
33
29
|
locals: {
|
34
30
|
field: field,
|
35
31
|
attachment: field.data,
|
32
|
+
variant: field.index_preview_variant,
|
36
33
|
size: field.index_preview_size
|
37
34
|
} %>
|
38
35
|
<% end %>
|
@@ -19,6 +19,7 @@ This partial renders one or more attachments
|
|
19
19
|
|
20
20
|
<%
|
21
21
|
removable = local_assigns.fetch(:removable, false)
|
22
|
+
variant = local_assigns.fetch(:variant, field.show_preview_variant)
|
22
23
|
size = local_assigns.fetch(:size, field.show_preview_size)
|
23
24
|
%>
|
24
25
|
|
@@ -29,6 +30,7 @@ This partial renders one or more attachments
|
|
29
30
|
field: field,
|
30
31
|
attachment: attachment,
|
31
32
|
removable: removable,
|
33
|
+
variant: variant,
|
32
34
|
size: size
|
33
35
|
} %>
|
34
36
|
</div>
|
@@ -1,25 +1,15 @@
|
|
1
|
-
<
|
2
|
-
#as-field-<%= attachment.id %> {
|
3
|
-
width: <%=size[0]/2%>px;
|
4
|
-
height: auto;
|
5
|
-
overflow: hidden;
|
6
|
-
}
|
7
|
-
</style>
|
8
|
-
<div id="as-field-<%= attachment.id %>">
|
1
|
+
<div class="as-field as-field-<%= action_name %>">
|
9
2
|
<% if attachment.image? %>
|
10
3
|
<% if attachment.variable? %>
|
11
|
-
|
4
|
+
<% if variant.nil? %>
|
5
|
+
<%= image_tag(field.variant(attachment, resize_to_limit: size)) %>
|
6
|
+
<% else %>
|
7
|
+
<%= image_tag(attachment.variant(variant)) %>
|
8
|
+
<% end %>
|
12
9
|
<% else %>
|
13
10
|
<%= image_tag(field.url(attachment)) %>
|
14
11
|
<% end %>
|
15
12
|
<% elsif attachment.video? %>
|
16
|
-
<style type="text/css" nonce="<%= content_security_policy_nonce %>">
|
17
|
-
#as-field-video-<%= attachment.id %> {
|
18
|
-
object-fit: contain;
|
19
|
-
width: 100%;
|
20
|
-
height: 100%;
|
21
|
-
}
|
22
|
-
</style>
|
23
13
|
<% if attachment.previewable? %>
|
24
14
|
<%= video_tag(field.url(attachment),
|
25
15
|
poster: field.preview(attachment, resize_to_limit: size),
|
@@ -27,7 +17,7 @@
|
|
27
17
|
autobuffer: true,
|
28
18
|
id: "as-field-video-#{attachment.id}") %>
|
29
19
|
<% else %>
|
30
|
-
<%= video_tag(field.url(attachment), controls: true, autobuffer: true,
|
20
|
+
<%= video_tag(field.url(attachment), controls: true, autobuffer: true, class: "as-field-video") %>
|
31
21
|
<% end %>
|
32
22
|
<% elsif attachment.audio? %>
|
33
23
|
<%= audio_tag(field.url(attachment), autoplay: false, controls: true) %>
|
@@ -5,6 +5,7 @@ module Administrate
|
|
5
5
|
module Field
|
6
6
|
class ActiveStorage < Administrate::Field::Base
|
7
7
|
class Engine < ::Rails::Engine
|
8
|
+
Administrate::Engine.add_stylesheet "administrate-field-active_storage/application"
|
8
9
|
end
|
9
10
|
|
10
11
|
def index_display_preview?
|
@@ -15,6 +16,10 @@ module Administrate
|
|
15
16
|
options.fetch(:index_preview_size, [150, 150])
|
16
17
|
end
|
17
18
|
|
19
|
+
def index_preview_variant
|
20
|
+
options.fetch(:index_preview_variant, nil)
|
21
|
+
end
|
22
|
+
|
18
23
|
def index_display_count?
|
19
24
|
options.fetch(:index_display_count) { attached? && attachments.count != 1 }
|
20
25
|
end
|
@@ -27,6 +32,10 @@ module Administrate
|
|
27
32
|
options.fetch(:show_preview_size, [800, 800])
|
28
33
|
end
|
29
34
|
|
35
|
+
def show_preview_variant
|
36
|
+
options.fetch(:show_preview_variant, nil)
|
37
|
+
end
|
38
|
+
|
30
39
|
def many?
|
31
40
|
data.is_a? ::ActiveStorage::Attached::Many
|
32
41
|
end
|
data/test_app/Gemfile
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
source 'https://rubygems.org'
|
2
2
|
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
|
3
3
|
|
4
|
-
ruby '3.0.
|
4
|
+
ruby '3.0.3'
|
5
5
|
|
6
6
|
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
|
7
|
-
gem 'rails'
|
7
|
+
gem 'rails'
|
8
8
|
# Use sqlite3 as the database for Active Record
|
9
9
|
gem 'sqlite3', '~> 1.4'
|
10
10
|
# Use Puma as the app server
|
11
|
-
gem 'puma', '~> 5.
|
11
|
+
gem 'puma', '~> 5.6'
|
12
12
|
# Use SCSS for stylesheets
|
13
13
|
gem 'sass-rails', '>= 6'
|
14
14
|
# Use Active Model has_secure_password
|
@@ -41,5 +41,5 @@ end
|
|
41
41
|
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
|
42
42
|
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
|
43
43
|
|
44
|
-
gem "administrate"
|
44
|
+
gem "administrate"
|
45
45
|
gem "administrate-field-active_storage", path: ".."
|
data/test_app/Gemfile.lock
CHANGED
@@ -1,180 +1,181 @@
|
|
1
1
|
PATH
|
2
2
|
remote: ..
|
3
3
|
specs:
|
4
|
-
administrate-field-active_storage (0.3.
|
4
|
+
administrate-field-active_storage (0.3.8)
|
5
5
|
administrate (>= 0.2.2)
|
6
6
|
rails (>= 6.0)
|
7
7
|
|
8
8
|
GEM
|
9
9
|
remote: https://rubygems.org/
|
10
10
|
specs:
|
11
|
-
actioncable (
|
12
|
-
actionpack (=
|
13
|
-
activesupport (=
|
11
|
+
actioncable (7.0.0)
|
12
|
+
actionpack (= 7.0.0)
|
13
|
+
activesupport (= 7.0.0)
|
14
14
|
nio4r (~> 2.0)
|
15
15
|
websocket-driver (>= 0.6.1)
|
16
|
-
actionmailbox (
|
17
|
-
actionpack (=
|
18
|
-
activejob (=
|
19
|
-
activerecord (=
|
20
|
-
activestorage (=
|
21
|
-
activesupport (=
|
16
|
+
actionmailbox (7.0.0)
|
17
|
+
actionpack (= 7.0.0)
|
18
|
+
activejob (= 7.0.0)
|
19
|
+
activerecord (= 7.0.0)
|
20
|
+
activestorage (= 7.0.0)
|
21
|
+
activesupport (= 7.0.0)
|
22
22
|
mail (>= 2.7.1)
|
23
|
-
actionmailer (
|
24
|
-
actionpack (=
|
25
|
-
actionview (=
|
26
|
-
activejob (=
|
27
|
-
activesupport (=
|
23
|
+
actionmailer (7.0.0)
|
24
|
+
actionpack (= 7.0.0)
|
25
|
+
actionview (= 7.0.0)
|
26
|
+
activejob (= 7.0.0)
|
27
|
+
activesupport (= 7.0.0)
|
28
28
|
mail (~> 2.5, >= 2.5.4)
|
29
29
|
rails-dom-testing (~> 2.0)
|
30
|
-
actionpack (
|
31
|
-
actionview (=
|
32
|
-
activesupport (=
|
33
|
-
rack (~> 2.0, >= 2.0
|
30
|
+
actionpack (7.0.0)
|
31
|
+
actionview (= 7.0.0)
|
32
|
+
activesupport (= 7.0.0)
|
33
|
+
rack (~> 2.0, >= 2.2.0)
|
34
34
|
rack-test (>= 0.6.3)
|
35
35
|
rails-dom-testing (~> 2.0)
|
36
36
|
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
37
|
-
actiontext (
|
38
|
-
actionpack (=
|
39
|
-
activerecord (=
|
40
|
-
activestorage (=
|
41
|
-
activesupport (=
|
37
|
+
actiontext (7.0.0)
|
38
|
+
actionpack (= 7.0.0)
|
39
|
+
activerecord (= 7.0.0)
|
40
|
+
activestorage (= 7.0.0)
|
41
|
+
activesupport (= 7.0.0)
|
42
|
+
globalid (>= 0.6.0)
|
42
43
|
nokogiri (>= 1.8.5)
|
43
|
-
actionview (
|
44
|
-
activesupport (=
|
44
|
+
actionview (7.0.0)
|
45
|
+
activesupport (= 7.0.0)
|
45
46
|
builder (~> 3.1)
|
46
47
|
erubi (~> 1.4)
|
47
48
|
rails-dom-testing (~> 2.0)
|
48
49
|
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
49
|
-
activejob (
|
50
|
-
activesupport (=
|
50
|
+
activejob (7.0.0)
|
51
|
+
activesupport (= 7.0.0)
|
51
52
|
globalid (>= 0.3.6)
|
52
|
-
activemodel (
|
53
|
-
activesupport (=
|
54
|
-
activerecord (
|
55
|
-
activemodel (=
|
56
|
-
activesupport (=
|
57
|
-
activestorage (
|
58
|
-
actionpack (=
|
59
|
-
activejob (=
|
60
|
-
activerecord (=
|
61
|
-
activesupport (=
|
62
|
-
marcel (~> 0
|
63
|
-
|
64
|
-
activesupport (
|
53
|
+
activemodel (7.0.0)
|
54
|
+
activesupport (= 7.0.0)
|
55
|
+
activerecord (7.0.0)
|
56
|
+
activemodel (= 7.0.0)
|
57
|
+
activesupport (= 7.0.0)
|
58
|
+
activestorage (7.0.0)
|
59
|
+
actionpack (= 7.0.0)
|
60
|
+
activejob (= 7.0.0)
|
61
|
+
activerecord (= 7.0.0)
|
62
|
+
activesupport (= 7.0.0)
|
63
|
+
marcel (~> 1.0)
|
64
|
+
mini_mime (>= 1.1.0)
|
65
|
+
activesupport (7.0.0)
|
65
66
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
66
67
|
i18n (>= 1.6, < 2)
|
67
68
|
minitest (>= 5.1)
|
68
69
|
tzinfo (~> 2.0)
|
69
|
-
|
70
|
-
addressable (2.7.0)
|
70
|
+
addressable (2.8.0)
|
71
71
|
public_suffix (>= 2.0.2, < 5.0)
|
72
|
-
administrate (0.
|
73
|
-
actionpack (>=
|
74
|
-
actionview (>=
|
75
|
-
activerecord (>=
|
76
|
-
autoprefixer-rails (>= 6.0)
|
72
|
+
administrate (0.16.0)
|
73
|
+
actionpack (>= 5.0)
|
74
|
+
actionview (>= 5.0)
|
75
|
+
activerecord (>= 5.0)
|
77
76
|
datetime_picker_rails (~> 0.0.7)
|
78
77
|
jquery-rails (>= 4.0)
|
79
78
|
kaminari (>= 1.0)
|
80
79
|
momentjs-rails (~> 2.8)
|
81
80
|
sassc-rails (~> 2.1)
|
82
81
|
selectize-rails (~> 0.6)
|
83
|
-
autoprefixer-rails (10.2.0.0)
|
84
|
-
execjs
|
85
82
|
bindex (0.8.1)
|
86
83
|
builder (3.2.4)
|
87
84
|
byebug (11.1.3)
|
88
|
-
capybara (3.
|
85
|
+
capybara (3.36.0)
|
89
86
|
addressable
|
87
|
+
matrix
|
90
88
|
mini_mime (>= 0.1.3)
|
91
89
|
nokogiri (~> 1.8)
|
92
90
|
rack (>= 1.6.0)
|
93
91
|
rack-test (>= 0.6.3)
|
94
|
-
regexp_parser (
|
92
|
+
regexp_parser (>= 1.5, < 3.0)
|
95
93
|
xpath (~> 3.2)
|
96
|
-
childprocess (
|
97
|
-
concurrent-ruby (1.1.
|
94
|
+
childprocess (4.1.0)
|
95
|
+
concurrent-ruby (1.1.9)
|
98
96
|
crass (1.0.6)
|
99
97
|
datetime_picker_rails (0.0.7)
|
100
98
|
momentjs-rails (>= 2.8.1)
|
101
99
|
erubi (1.10.0)
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
i18n (1.8.7)
|
100
|
+
ffi (1.15.4)
|
101
|
+
globalid (1.0.0)
|
102
|
+
activesupport (>= 5.0)
|
103
|
+
i18n (1.8.11)
|
107
104
|
concurrent-ruby (~> 1.0)
|
108
105
|
jquery-rails (4.4.0)
|
109
106
|
rails-dom-testing (>= 1, < 3)
|
110
107
|
railties (>= 4.2.0)
|
111
108
|
thor (>= 0.14, < 2.0)
|
112
|
-
kaminari (1.2.
|
109
|
+
kaminari (1.2.2)
|
113
110
|
activesupport (>= 4.1.0)
|
114
|
-
kaminari-actionview (= 1.2.
|
115
|
-
kaminari-activerecord (= 1.2.
|
116
|
-
kaminari-core (= 1.2.
|
117
|
-
kaminari-actionview (1.2.
|
111
|
+
kaminari-actionview (= 1.2.2)
|
112
|
+
kaminari-activerecord (= 1.2.2)
|
113
|
+
kaminari-core (= 1.2.2)
|
114
|
+
kaminari-actionview (1.2.2)
|
118
115
|
actionview
|
119
|
-
kaminari-core (= 1.2.
|
120
|
-
kaminari-activerecord (1.2.
|
116
|
+
kaminari-core (= 1.2.2)
|
117
|
+
kaminari-activerecord (1.2.2)
|
121
118
|
activerecord
|
122
|
-
kaminari-core (= 1.2.
|
123
|
-
kaminari-core (1.2.
|
124
|
-
loofah (2.
|
119
|
+
kaminari-core (= 1.2.2)
|
120
|
+
kaminari-core (1.2.2)
|
121
|
+
loofah (2.13.0)
|
125
122
|
crass (~> 1.0.2)
|
126
123
|
nokogiri (>= 1.5.9)
|
127
124
|
mail (2.7.1)
|
128
125
|
mini_mime (>= 0.1.1)
|
129
|
-
marcel (0.
|
130
|
-
|
126
|
+
marcel (1.0.2)
|
127
|
+
matrix (0.4.2)
|
131
128
|
method_source (1.0.0)
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
momentjs-rails (2.20.1)
|
129
|
+
mini_mime (1.1.2)
|
130
|
+
minitest (5.15.0)
|
131
|
+
momentjs-rails (2.29.1)
|
136
132
|
railties (>= 3.1)
|
137
|
-
nio4r (2.5.
|
138
|
-
nokogiri (1.
|
133
|
+
nio4r (2.5.8)
|
134
|
+
nokogiri (1.13.3-x86_64-darwin)
|
135
|
+
racc (~> 1.4)
|
136
|
+
nokogiri (1.13.3-x86_64-linux)
|
137
|
+
racc (~> 1.4)
|
138
|
+
nokogiri (1.12.5-x86_64-linux)
|
139
139
|
racc (~> 1.4)
|
140
140
|
public_suffix (4.0.6)
|
141
|
-
puma (5.
|
141
|
+
puma (5.6.2)
|
142
142
|
nio4r (~> 2.0)
|
143
|
-
racc (1.
|
143
|
+
racc (1.6.0)
|
144
144
|
rack (2.2.3)
|
145
|
-
rack-mini-profiler (2.3.
|
145
|
+
rack-mini-profiler (2.3.3)
|
146
146
|
rack (>= 1.2.0)
|
147
147
|
rack-test (1.1.0)
|
148
148
|
rack (>= 1.0, < 3)
|
149
|
-
rails (
|
150
|
-
actioncable (=
|
151
|
-
actionmailbox (=
|
152
|
-
actionmailer (=
|
153
|
-
actionpack (=
|
154
|
-
actiontext (=
|
155
|
-
actionview (=
|
156
|
-
activejob (=
|
157
|
-
activemodel (=
|
158
|
-
activerecord (=
|
159
|
-
activestorage (=
|
160
|
-
activesupport (=
|
149
|
+
rails (7.0.0)
|
150
|
+
actioncable (= 7.0.0)
|
151
|
+
actionmailbox (= 7.0.0)
|
152
|
+
actionmailer (= 7.0.0)
|
153
|
+
actionpack (= 7.0.0)
|
154
|
+
actiontext (= 7.0.0)
|
155
|
+
actionview (= 7.0.0)
|
156
|
+
activejob (= 7.0.0)
|
157
|
+
activemodel (= 7.0.0)
|
158
|
+
activerecord (= 7.0.0)
|
159
|
+
activestorage (= 7.0.0)
|
160
|
+
activesupport (= 7.0.0)
|
161
161
|
bundler (>= 1.15.0)
|
162
|
-
railties (=
|
163
|
-
sprockets-rails (>= 2.0.0)
|
162
|
+
railties (= 7.0.0)
|
164
163
|
rails-dom-testing (2.0.3)
|
165
164
|
activesupport (>= 4.2.0)
|
166
165
|
nokogiri (>= 1.6)
|
167
|
-
rails-html-sanitizer (1.
|
166
|
+
rails-html-sanitizer (1.4.2)
|
168
167
|
loofah (~> 2.3)
|
169
|
-
railties (
|
170
|
-
actionpack (=
|
171
|
-
activesupport (=
|
168
|
+
railties (7.0.0)
|
169
|
+
actionpack (= 7.0.0)
|
170
|
+
activesupport (= 7.0.0)
|
172
171
|
method_source
|
173
|
-
rake (>=
|
172
|
+
rake (>= 12.2)
|
174
173
|
thor (~> 1.0)
|
175
|
-
|
176
|
-
|
177
|
-
|
174
|
+
zeitwerk (~> 2.5)
|
175
|
+
rake (13.0.6)
|
176
|
+
regexp_parser (2.2.0)
|
177
|
+
rexml (3.2.5)
|
178
|
+
rubyzip (2.3.2)
|
178
179
|
sass-rails (6.0.0)
|
179
180
|
sassc-rails (~> 2.1, >= 2.1.1)
|
180
181
|
sassc (2.4.0)
|
@@ -186,44 +187,46 @@ GEM
|
|
186
187
|
sprockets-rails
|
187
188
|
tilt
|
188
189
|
selectize-rails (0.12.6)
|
189
|
-
selenium-webdriver (
|
190
|
-
childprocess (>= 0.5, <
|
190
|
+
selenium-webdriver (4.1.0)
|
191
|
+
childprocess (>= 0.5, < 5.0)
|
192
|
+
rexml (~> 3.2, >= 3.2.5)
|
191
193
|
rubyzip (>= 1.2.2)
|
192
194
|
sprockets (4.0.2)
|
193
195
|
concurrent-ruby (~> 1.0)
|
194
196
|
rack (> 1, < 3)
|
195
|
-
sprockets-rails (3.
|
196
|
-
actionpack (>=
|
197
|
-
activesupport (>=
|
197
|
+
sprockets-rails (3.4.2)
|
198
|
+
actionpack (>= 5.2)
|
199
|
+
activesupport (>= 5.2)
|
198
200
|
sprockets (>= 3.0.0)
|
199
201
|
sqlite3 (1.4.2)
|
200
202
|
thor (1.1.0)
|
201
203
|
tilt (2.0.10)
|
202
204
|
tzinfo (2.0.4)
|
203
205
|
concurrent-ruby (~> 1.0)
|
204
|
-
web-console (4.
|
206
|
+
web-console (4.2.0)
|
205
207
|
actionview (>= 6.0.0)
|
206
208
|
activemodel (>= 6.0.0)
|
207
209
|
bindex (>= 0.4.0)
|
208
210
|
railties (>= 6.0.0)
|
209
|
-
websocket-driver (0.7.
|
211
|
+
websocket-driver (0.7.5)
|
210
212
|
websocket-extensions (>= 0.1.0)
|
211
213
|
websocket-extensions (0.1.5)
|
212
214
|
xpath (3.2.0)
|
213
215
|
nokogiri (~> 1.8)
|
214
|
-
zeitwerk (2.
|
216
|
+
zeitwerk (2.5.2)
|
215
217
|
|
216
218
|
PLATFORMS
|
217
219
|
x86_64-darwin-20
|
220
|
+
x86_64-linux
|
218
221
|
|
219
222
|
DEPENDENCIES
|
220
|
-
administrate
|
223
|
+
administrate
|
221
224
|
administrate-field-active_storage!
|
222
225
|
byebug
|
223
226
|
capybara (>= 3.26)
|
224
|
-
puma (~> 5.
|
227
|
+
puma (~> 5.6)
|
225
228
|
rack-mini-profiler (~> 2.0)
|
226
|
-
rails
|
229
|
+
rails
|
227
230
|
sass-rails (>= 6)
|
228
231
|
selenium-webdriver
|
229
232
|
sqlite3 (~> 1.4)
|
@@ -231,7 +234,7 @@ DEPENDENCIES
|
|
231
234
|
web-console (>= 4.1.0)
|
232
235
|
|
233
236
|
RUBY VERSION
|
234
|
-
ruby 3.0.
|
237
|
+
ruby 3.0.3p157
|
235
238
|
|
236
239
|
BUNDLED WITH
|
237
|
-
2.2.
|
240
|
+
2.2.33
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: administrate-field-active_storage
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Hamad AlGhanim
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-03-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: administrate
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '7.0'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
40
|
+
version: '7.0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: sqlite3
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -82,6 +82,7 @@ files:
|
|
82
82
|
- README.md
|
83
83
|
- _config.yml
|
84
84
|
- administrate-field-active_storage.gemspec
|
85
|
+
- app/assets/stylesheets/administrate-field-active_storage/application.css
|
85
86
|
- app/views/fields/active_storage/_form.html.erb
|
86
87
|
- app/views/fields/active_storage/_index.html.erb
|
87
88
|
- app/views/fields/active_storage/_item.html.erb
|
@@ -181,7 +182,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
181
182
|
- !ruby/object:Gem::Version
|
182
183
|
version: '0'
|
183
184
|
requirements: []
|
184
|
-
rubygems_version: 3.2.
|
185
|
+
rubygems_version: 3.2.32
|
185
186
|
signing_key:
|
186
187
|
specification_version: 4
|
187
188
|
summary: Administrate fields for active storage
|