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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7d685dc2a380f464f63d5b78dfd5a3c967e4a22ec7b28218f8e8bd8f22d5039e
4
- data.tar.gz: ae36c6c3b520706249cf3bb917f1441cd22506f9ea0761fb14f51834406e2c7d
3
+ metadata.gz: 325bb9d01b865e2f1040d323dadadfdba96ef0a1dd2931392f24943012491764
4
+ data.tar.gz: fd8cdf3df0ba4638eea1125bb557878646cc40979c41a1522487c0af162fa052
5
5
  SHA512:
6
- metadata.gz: 91b86562577256f867aa848391004229f58200757c8ddddc9895d22d6907c15472d5e0308e292323979787687f9362a7aba9b2d7f2ec63cad8ac4151d6559069
7
- data.tar.gz: 842ece6e36fb7592cbea4a99a362af6862824cb74f60dfe4f7d28a07a0a95d7174669e7a3e68dce5152efa9a4ce35309ac6271c685e335b1990e24ebdf352ad9
6
+ metadata.gz: 0fa9781cf805f7e80bf482c27ad0cf88180f014bc88a8234c6aa219855bd6d7d745b45783b2128c4482be9785cac0884b00e2e2bb401b1a158707cf6fbfded1f
7
+ data.tar.gz: 4dfc6fe7861abd65ff323effba94baf3485a00c43d0889e8efc6d68a3540d8a93509c762c7dd3dce94c6320b15badf2afc9b842d41cb29ec574f3c34ee9a0280
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 3.0.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.6)
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 (6.1.1)
12
- actionpack (= 6.1.1)
13
- activesupport (= 6.1.1)
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 (6.1.1)
17
- actionpack (= 6.1.1)
18
- activejob (= 6.1.1)
19
- activerecord (= 6.1.1)
20
- activestorage (= 6.1.1)
21
- activesupport (= 6.1.1)
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 (6.1.1)
24
- actionpack (= 6.1.1)
25
- actionview (= 6.1.1)
26
- activejob (= 6.1.1)
27
- activesupport (= 6.1.1)
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 (6.1.1)
31
- actionview (= 6.1.1)
32
- activesupport (= 6.1.1)
33
- rack (~> 2.0, >= 2.0.9)
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 (6.1.1)
38
- actionpack (= 6.1.1)
39
- activerecord (= 6.1.1)
40
- activestorage (= 6.1.1)
41
- activesupport (= 6.1.1)
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 (6.1.1)
44
- activesupport (= 6.1.1)
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 (6.1.1)
50
- activesupport (= 6.1.1)
50
+ activejob (7.0.0)
51
+ activesupport (= 7.0.0)
51
52
  globalid (>= 0.3.6)
52
- activemodel (6.1.1)
53
- activesupport (= 6.1.1)
54
- activerecord (6.1.1)
55
- activemodel (= 6.1.1)
56
- activesupport (= 6.1.1)
57
- activestorage (6.1.1)
58
- actionpack (= 6.1.1)
59
- activejob (= 6.1.1)
60
- activerecord (= 6.1.1)
61
- activesupport (= 6.1.1)
62
- marcel (~> 0.3.1)
63
- mimemagic (~> 0.3.2)
64
- activesupport (6.1.1)
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
- zeitwerk (~> 2.3)
70
- administrate (0.14.0)
71
- actionpack (>= 4.2)
72
- actionview (>= 4.2)
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.8)
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
- execjs (2.7.0)
91
- ffi (1.14.2)
92
- globalid (0.4.2)
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.7)
91
+ i18n (1.8.11)
96
92
  concurrent-ruby (~> 1.0)
97
- i18n-tasks (0.9.34)
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.1)
107
+ kaminari (1.2.2)
112
108
  activesupport (>= 4.1.0)
113
- kaminari-actionview (= 1.2.1)
114
- kaminari-activerecord (= 1.2.1)
115
- kaminari-core (= 1.2.1)
116
- kaminari-actionview (1.2.1)
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.1)
119
- kaminari-activerecord (1.2.1)
114
+ kaminari-core (= 1.2.2)
115
+ kaminari-activerecord (1.2.2)
120
116
  activerecord
121
- kaminari-core (= 1.2.1)
122
- kaminari-core (1.2.1)
123
- loofah (2.9.0)
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.3.3)
129
- mimemagic (~> 0.3.2)
124
+ marcel (1.0.2)
130
125
  method_source (1.0.0)
131
- mimemagic (0.3.5)
132
- mini_mime (1.0.2)
133
- minitest (5.14.3)
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.4)
137
- nokogiri (1.11.1-x86_64-darwin)
130
+ nio4r (2.5.8)
131
+ nokogiri (1.13.3-x86_64-darwin)
138
132
  racc (~> 1.4)
139
- nokogiri (1.11.1-x86_64-linux)
133
+ nokogiri (1.13.3-x86_64-linux)
140
134
  racc (~> 1.4)
141
- parser (3.0.0.0)
135
+ parser (3.0.3.2)
142
136
  ast (~> 2.4.1)
143
- racc (1.5.2)
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 (6.1.1)
148
- actioncable (= 6.1.1)
149
- actionmailbox (= 6.1.1)
150
- actionmailer (= 6.1.1)
151
- actionpack (= 6.1.1)
152
- actiontext (= 6.1.1)
153
- actionview (= 6.1.1)
154
- activejob (= 6.1.1)
155
- activemodel (= 6.1.1)
156
- activerecord (= 6.1.1)
157
- activestorage (= 6.1.1)
158
- activesupport (= 6.1.1)
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 (= 6.1.1)
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.3.0)
158
+ rails-html-sanitizer (1.4.2)
166
159
  loofah (~> 2.3)
167
- rails-i18n (6.0.0)
160
+ rails-i18n (7.0.1)
168
161
  i18n (>= 0.7, < 2)
169
- railties (>= 6.0.0, < 7)
170
- railties (6.1.1)
171
- actionpack (= 6.1.1)
172
- activesupport (= 6.1.1)
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 (>= 0.8.7)
167
+ rake (>= 12.2)
175
168
  thor (~> 1.0)
169
+ zeitwerk (~> 2.5)
176
170
  rainbow (3.0.0)
177
- rake (13.0.3)
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.2.2)
191
- actionpack (>= 4.0)
192
- activesupport (>= 4.0)
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.0)
196
- unicode-display_width (~> 1.1, >= 1.1.1)
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.7.0)
202
- websocket-driver (0.7.3)
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.4.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.14
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 document your code.
226
- 3. add your name to the `contribute.md`.
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.3.8"
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", ">= 6.0"
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'
@@ -0,0 +1,15 @@
1
+ td img {
2
+ max-height: unset !important;
3
+ }
4
+ .as-field {
5
+ height: auto;
6
+ overflow: hidden;
7
+ }
8
+ .as-field-index img {
9
+ width: 50%;
10
+ }
11
+ .as-field-video {
12
+ object-fit: contain;
13
+ width: 100%;
14
+ height: 100%;
15
+ }
@@ -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
- <style type="text/css" nonce="<%= content_security_policy_nonce %>">
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
- <%= image_tag(field.variant(attachment, resize_to_limit: size)) %>
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, id: "as-field-video-#{attachment.id}") %>
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.0'
4
+ ruby '3.0.3'
5
5
 
6
6
  # Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
7
- gem 'rails', '~> 6.1.1'
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.0'
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", "~> 0.14.0"
44
+ gem "administrate"
45
45
  gem "administrate-field-active_storage", path: ".."
@@ -1,180 +1,181 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- administrate-field-active_storage (0.3.6)
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 (6.1.1)
12
- actionpack (= 6.1.1)
13
- activesupport (= 6.1.1)
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 (6.1.1)
17
- actionpack (= 6.1.1)
18
- activejob (= 6.1.1)
19
- activerecord (= 6.1.1)
20
- activestorage (= 6.1.1)
21
- activesupport (= 6.1.1)
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 (6.1.1)
24
- actionpack (= 6.1.1)
25
- actionview (= 6.1.1)
26
- activejob (= 6.1.1)
27
- activesupport (= 6.1.1)
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 (6.1.1)
31
- actionview (= 6.1.1)
32
- activesupport (= 6.1.1)
33
- rack (~> 2.0, >= 2.0.9)
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 (6.1.1)
38
- actionpack (= 6.1.1)
39
- activerecord (= 6.1.1)
40
- activestorage (= 6.1.1)
41
- activesupport (= 6.1.1)
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 (6.1.1)
44
- activesupport (= 6.1.1)
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 (6.1.1)
50
- activesupport (= 6.1.1)
50
+ activejob (7.0.0)
51
+ activesupport (= 7.0.0)
51
52
  globalid (>= 0.3.6)
52
- activemodel (6.1.1)
53
- activesupport (= 6.1.1)
54
- activerecord (6.1.1)
55
- activemodel (= 6.1.1)
56
- activesupport (= 6.1.1)
57
- activestorage (6.1.1)
58
- actionpack (= 6.1.1)
59
- activejob (= 6.1.1)
60
- activerecord (= 6.1.1)
61
- activesupport (= 6.1.1)
62
- marcel (~> 0.3.1)
63
- mimemagic (~> 0.3.2)
64
- activesupport (6.1.1)
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
- zeitwerk (~> 2.3)
70
- addressable (2.7.0)
70
+ addressable (2.8.0)
71
71
  public_suffix (>= 2.0.2, < 5.0)
72
- administrate (0.14.0)
73
- actionpack (>= 4.2)
74
- actionview (>= 4.2)
75
- activerecord (>= 4.2)
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.34.0)
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 (~> 1.5)
92
+ regexp_parser (>= 1.5, < 3.0)
95
93
  xpath (~> 3.2)
96
- childprocess (3.0.0)
97
- concurrent-ruby (1.1.8)
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
- execjs (2.7.0)
103
- ffi (1.14.2)
104
- globalid (0.4.2)
105
- activesupport (>= 4.2.0)
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.1)
109
+ kaminari (1.2.2)
113
110
  activesupport (>= 4.1.0)
114
- kaminari-actionview (= 1.2.1)
115
- kaminari-activerecord (= 1.2.1)
116
- kaminari-core (= 1.2.1)
117
- kaminari-actionview (1.2.1)
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.1)
120
- kaminari-activerecord (1.2.1)
116
+ kaminari-core (= 1.2.2)
117
+ kaminari-activerecord (1.2.2)
121
118
  activerecord
122
- kaminari-core (= 1.2.1)
123
- kaminari-core (1.2.1)
124
- loofah (2.9.0)
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.3.3)
130
- mimemagic (~> 0.3.2)
126
+ marcel (1.0.2)
127
+ matrix (0.4.2)
131
128
  method_source (1.0.0)
132
- mimemagic (0.3.5)
133
- mini_mime (1.0.2)
134
- minitest (5.14.3)
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.4)
138
- nokogiri (1.11.1-x86_64-darwin)
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.1.1)
141
+ puma (5.6.2)
142
142
  nio4r (~> 2.0)
143
- racc (1.5.2)
143
+ racc (1.6.0)
144
144
  rack (2.2.3)
145
- rack-mini-profiler (2.3.0)
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 (6.1.1)
150
- actioncable (= 6.1.1)
151
- actionmailbox (= 6.1.1)
152
- actionmailer (= 6.1.1)
153
- actionpack (= 6.1.1)
154
- actiontext (= 6.1.1)
155
- actionview (= 6.1.1)
156
- activejob (= 6.1.1)
157
- activemodel (= 6.1.1)
158
- activerecord (= 6.1.1)
159
- activestorage (= 6.1.1)
160
- activesupport (= 6.1.1)
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 (= 6.1.1)
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.3.0)
166
+ rails-html-sanitizer (1.4.2)
168
167
  loofah (~> 2.3)
169
- railties (6.1.1)
170
- actionpack (= 6.1.1)
171
- activesupport (= 6.1.1)
168
+ railties (7.0.0)
169
+ actionpack (= 7.0.0)
170
+ activesupport (= 7.0.0)
172
171
  method_source
173
- rake (>= 0.8.7)
172
+ rake (>= 12.2)
174
173
  thor (~> 1.0)
175
- rake (13.0.3)
176
- regexp_parser (1.8.2)
177
- rubyzip (2.3.0)
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 (3.142.7)
190
- childprocess (>= 0.5, < 4.0)
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.2.2)
196
- actionpack (>= 4.0)
197
- activesupport (>= 4.0)
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.1.0)
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.3)
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.4.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 (~> 0.14.0)
223
+ administrate
221
224
  administrate-field-active_storage!
222
225
  byebug
223
226
  capybara (>= 3.26)
224
- puma (~> 5.0)
227
+ puma (~> 5.6)
225
228
  rack-mini-profiler (~> 2.0)
226
- rails (~> 6.1.1)
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.0p0
237
+ ruby 3.0.3p157
235
238
 
236
239
  BUNDLED WITH
237
- 2.2.5
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.3.8
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: 2021-12-20 00:00:00.000000000 Z
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: '6.0'
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: '6.0'
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.3
185
+ rubygems_version: 3.2.32
185
186
  signing_key:
186
187
  specification_version: 4
187
188
  summary: Administrate fields for active storage