administrate-field-active_storage 0.3.7 → 0.4.1

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: 400847147cef13ebaf2becff0f8d6f60ab159e42373aab67e39d7823900b7061
4
- data.tar.gz: 28dcb24685789156e988f3aa1a2065a50c6d147e1863b277cc93c6ce73d91f56
3
+ metadata.gz: 4530bec86495276cdc8910d7c8bbc611f1488800ba46b5e0cf2f0152583cb194
4
+ data.tar.gz: 431d6c5bbaafcd16240f8605668bd6a4699a3a9403d08f7917ae381a066c50b6
5
5
  SHA512:
6
- metadata.gz: a4395b379fb47e7efc923ef5c69cdc7d85f26f0cb1aa0efde7b31cd8f7dd4916f6ca650d94a8772d1a522510669fc0f125a02e69399e6d7ee0c68972c232934f
7
- data.tar.gz: c9966fd2cc8194963455def07ea138d28a19394d680c14edad1ec7d05740eedd7856dd1484ad4f16dd8db76eefaf0dab0993dde43e907d92a7a330798f53531f
6
+ metadata.gz: eb7bafb6b702ed9f61a93782489edb1d40490a2a049f6e6adc7a102abf1e1e48c3b3fe5059f54d18d28e93c55b430c9ec8b1392066269582b0a9617355cec70c
7
+ data.tar.gz: 1c654299bb0dffbe1522feaf70e81d498fab7eb46e1c2171adbb633e0a903d04dc241f6b81fbd356328fde2a325e74e9d4f352c1922a30de120ad003bd1a003c
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.7"
5
+ gem.version = "0.4.1"
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,18 +16,23 @@ By default, the attribute is rendered as an image tag.
16
16
  %>
17
17
 
18
18
  <% if field.attached? %>
19
- <style> <%# 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
- <%= render partial: 'fields/active_storage/preview',
26
- locals: {
27
- field: field,
28
- attachment: field.data,
29
- size: field.index_preview_size
30
- } %>
20
+ <% if field.many? %>
21
+ <%= render partial: 'fields/active_storage/items',
22
+ locals: {
23
+ field: field,
24
+ variant: field.index_preview_variant,
25
+ size: field.index_preview_size
26
+ } %>
27
+ <% else %>
28
+ <%= render partial: 'fields/active_storage/item',
29
+ locals: {
30
+ field: field,
31
+ attachment: field.data,
32
+ variant: field.index_preview_variant,
33
+ size: field.index_preview_size
34
+ } %>
35
+ <% end %>
31
36
  <% end %>
32
37
 
33
38
  <% if field.index_display_count? %>
@@ -11,10 +11,16 @@ This partial renders one or more attachments
11
11
  - `removable`:
12
12
  A boolean used to control the display of a `Remove` link which
13
13
  is used to destroy a single attachment. Defaults to `false`
14
+ - `size`:
15
+ [x, y]
16
+ Maximum size of the ActiveStorage preview.
17
+ Defaults to `field.show_preview_size`.
14
18
  %>
15
19
 
16
20
  <%
17
21
  removable = local_assigns.fetch(:removable, false)
22
+ variant = local_assigns.fetch(:variant, field.show_preview_variant)
23
+ size = local_assigns.fetch(:size, field.show_preview_size)
18
24
  %>
19
25
 
20
26
  <% field.attachments.each do |attachment| %>
@@ -24,7 +30,8 @@ This partial renders one or more attachments
24
30
  field: field,
25
31
  attachment: attachment,
26
32
  removable: removable,
27
- size: field.show_preview_size
33
+ variant: variant,
34
+ size: size
28
35
  } %>
29
36
  </div>
30
37
  <% end %>
@@ -1,7 +1,11 @@
1
- <div style="width: <%=size[0]%>px; height: auto; overflow: hidden;">
1
+ <div class="as-field as-field-<%= action_name %>">
2
2
  <% if attachment.image? %>
3
3
  <% if attachment.variable? %>
4
- <%= 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 %>
5
9
  <% else %>
6
10
  <%= image_tag(field.url(attachment)) %>
7
11
  <% end %>
@@ -11,9 +15,9 @@
11
15
  poster: field.preview(attachment, resize_to_limit: size),
12
16
  controls: true,
13
17
  autobuffer: true,
14
- style: "object-fit: contain; width: 100%; height: 100%;") %>
18
+ class: "as-field-video") %>
15
19
  <% else %>
16
- <%= video_tag(field.url(attachment), controls: true, autobuffer: true, style: "object-fit: contain; width: 100%; height: 100%;") %>
20
+ <%= video_tag(field.url(attachment), controls: true, autobuffer: true, class: "as-field-video") %>
17
21
  <% end %>
18
22
  <% elsif attachment.audio? %>
19
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
@@ -1 +1 @@
1
- ruby-3.0.0
1
+ 3.0.3
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,179 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- administrate-field-active_storage (0.3.6)
4
+ administrate-field-active_storage (0.4.0)
5
5
  administrate (>= 0.2.2)
6
- rails (>= 6.0)
6
+ rails (>= 7.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)
139
137
  racc (~> 1.4)
140
138
  public_suffix (4.0.6)
141
- puma (5.1.1)
139
+ puma (5.6.2)
142
140
  nio4r (~> 2.0)
143
- racc (1.5.2)
141
+ racc (1.6.0)
144
142
  rack (2.2.3)
145
- rack-mini-profiler (2.3.0)
143
+ rack-mini-profiler (2.3.3)
146
144
  rack (>= 1.2.0)
147
145
  rack-test (1.1.0)
148
146
  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)
147
+ rails (7.0.0)
148
+ actioncable (= 7.0.0)
149
+ actionmailbox (= 7.0.0)
150
+ actionmailer (= 7.0.0)
151
+ actionpack (= 7.0.0)
152
+ actiontext (= 7.0.0)
153
+ actionview (= 7.0.0)
154
+ activejob (= 7.0.0)
155
+ activemodel (= 7.0.0)
156
+ activerecord (= 7.0.0)
157
+ activestorage (= 7.0.0)
158
+ activesupport (= 7.0.0)
161
159
  bundler (>= 1.15.0)
162
- railties (= 6.1.1)
163
- sprockets-rails (>= 2.0.0)
160
+ railties (= 7.0.0)
164
161
  rails-dom-testing (2.0.3)
165
162
  activesupport (>= 4.2.0)
166
163
  nokogiri (>= 1.6)
167
- rails-html-sanitizer (1.3.0)
164
+ rails-html-sanitizer (1.4.2)
168
165
  loofah (~> 2.3)
169
- railties (6.1.1)
170
- actionpack (= 6.1.1)
171
- activesupport (= 6.1.1)
166
+ railties (7.0.0)
167
+ actionpack (= 7.0.0)
168
+ activesupport (= 7.0.0)
172
169
  method_source
173
- rake (>= 0.8.7)
170
+ rake (>= 12.2)
174
171
  thor (~> 1.0)
175
- rake (13.0.3)
176
- regexp_parser (1.8.2)
177
- rubyzip (2.3.0)
172
+ zeitwerk (~> 2.5)
173
+ rake (13.0.6)
174
+ regexp_parser (2.2.0)
175
+ rexml (3.2.5)
176
+ rubyzip (2.3.2)
178
177
  sass-rails (6.0.0)
179
178
  sassc-rails (~> 2.1, >= 2.1.1)
180
179
  sassc (2.4.0)
@@ -186,44 +185,47 @@ GEM
186
185
  sprockets-rails
187
186
  tilt
188
187
  selectize-rails (0.12.6)
189
- selenium-webdriver (3.142.7)
190
- childprocess (>= 0.5, < 4.0)
188
+ selenium-webdriver (4.1.0)
189
+ childprocess (>= 0.5, < 5.0)
190
+ rexml (~> 3.2, >= 3.2.5)
191
191
  rubyzip (>= 1.2.2)
192
192
  sprockets (4.0.2)
193
193
  concurrent-ruby (~> 1.0)
194
194
  rack (> 1, < 3)
195
- sprockets-rails (3.2.2)
196
- actionpack (>= 4.0)
197
- activesupport (>= 4.0)
195
+ sprockets-rails (3.4.2)
196
+ actionpack (>= 5.2)
197
+ activesupport (>= 5.2)
198
198
  sprockets (>= 3.0.0)
199
199
  sqlite3 (1.4.2)
200
200
  thor (1.1.0)
201
201
  tilt (2.0.10)
202
202
  tzinfo (2.0.4)
203
203
  concurrent-ruby (~> 1.0)
204
- web-console (4.1.0)
204
+ web-console (4.2.0)
205
205
  actionview (>= 6.0.0)
206
206
  activemodel (>= 6.0.0)
207
207
  bindex (>= 0.4.0)
208
208
  railties (>= 6.0.0)
209
- websocket-driver (0.7.3)
209
+ websocket-driver (0.7.5)
210
210
  websocket-extensions (>= 0.1.0)
211
211
  websocket-extensions (0.1.5)
212
212
  xpath (3.2.0)
213
213
  nokogiri (~> 1.8)
214
- zeitwerk (2.4.2)
214
+ zeitwerk (2.5.2)
215
215
 
216
216
  PLATFORMS
217
217
  x86_64-darwin-20
218
+ x86_64-darwin-21
219
+ x86_64-linux
218
220
 
219
221
  DEPENDENCIES
220
- administrate (~> 0.14.0)
222
+ administrate
221
223
  administrate-field-active_storage!
222
224
  byebug
223
225
  capybara (>= 3.26)
224
- puma (~> 5.0)
226
+ puma (~> 5.6)
225
227
  rack-mini-profiler (~> 2.0)
226
- rails (~> 6.1.1)
228
+ rails
227
229
  sass-rails (>= 6)
228
230
  selenium-webdriver
229
231
  sqlite3 (~> 1.4)
@@ -231,7 +233,7 @@ DEPENDENCIES
231
233
  web-console (>= 4.1.0)
232
234
 
233
235
  RUBY VERSION
234
- ruby 3.0.0p0
236
+ ruby 3.0.3p157
235
237
 
236
238
  BUNDLED WITH
237
- 2.2.5
239
+ 2.2.33
@@ -2,3 +2,4 @@
2
2
  //= link_directory ../stylesheets .css
3
3
  //= link administrate/application.css
4
4
  //= link administrate/application.js
5
+ //= link administrate-field-active_storage/application.css
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.7
4
+ version: 0.4.1
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-03-30 00:00:00.000000000 Z
11
+ date: 2022-03-31 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