rails_admin_settings 1.4.1 → 1.7.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: 29fd0a6b9da6e78369f829515f98217818eee87ca05f4dfc6223265f8f1f177d
4
- data.tar.gz: bd6b04c0cdc0ba33004138e24d7ab082e020cffaa61b2efa4f28c1168ee8cd6b
3
+ metadata.gz: 5f1f9843ee528e7a9264626370073c5d5300c830fec7f1fd5098cce75e7982d6
4
+ data.tar.gz: 3b260282a0c0d4504d88123287111b45774eab05ca84352b8539af271b00268d
5
5
  SHA512:
6
- metadata.gz: a46ecf577c6f31320bf286d48a280717ae2a199e71fbd379edd11b18eda0a364b806e247485d26660e54836254c46f4b22a44f59722d46c5fac8cdc26129f6dc
7
- data.tar.gz: 1fc1c269cbfea981a88305204ed5b12ec9d00bd631b9687e1b42c516cddc5c5de63e91e9149bfe5c909b5965689cad12c05e5873a1206f6c7d41f17e7785bb18
6
+ metadata.gz: dc1a6ec975b5f6e802dafe7345bd9753478d3cddcd4e25a93b9501482304db19a8e59bc681c30ffaf0d30d1415493f9af5db7643a3e3e4b3160ded5ba79782be
7
+ data.tar.gz: 7061025abfd54dcbf409e7215d171474f7e1f5068eea1ce704b80038f58a4f4e5dc0252211efbe74816858a95e7bf94f9dbe20c9812946fa508ef98c8613a85b
data/.gitignore CHANGED
@@ -16,3 +16,4 @@ test/version_tmp
16
16
  tmp
17
17
  .idea
18
18
  /uploads
19
+ /public/uploads
data/.rakeTasks ADDED
@@ -0,0 +1,7 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <Settings><!--This file was automatically generated by Ruby plugin.
3
+ You are allowed to:
4
+ 1. Remove rake task
5
+ 2. Add existing rake tasks
6
+ To add existing rake tasks automatically delete this file and reload the project.
7
+ --><RakeGroup description="" fullCmd="" taksId="rake" /></Settings>
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ 2.7.2
data/.travis.yml CHANGED
@@ -14,8 +14,10 @@ env:
14
14
  matrix:
15
15
  - "UPLOADS=paperclip"
16
16
  - "UPLOADS=carrierwave"
17
+ - "UPLOADS=shrine"
17
18
  - "RAILS=1 UPLOADS=paperclip"
18
19
  - "RAILS=1 UPLOADS=carrierwave"
20
+ - "RAILS=1 UPLOADS=shrine"
19
21
 
20
22
  gemfile:
21
23
  - gemfiles/mongoid-6.0.gemfile
data/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ ## 1.6.0 (2020-06-11)
2
+
3
+ Add shrine file uploads
4
+
5
+ ## 1.5.0 (2018-06-09)
6
+
7
+ Add float type
8
+
1
9
  ## 1.4.1 (2018-03-07)
2
10
 
3
11
  Fix activerecord + paperclip uploads
data/Gemfile.lock CHANGED
@@ -1,193 +1,269 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rails_admin_settings (1.4.1)
4
+ rails_admin_settings (1.7.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
8
8
  specs:
9
- actioncable (5.1.5)
10
- actionpack (= 5.1.5)
9
+ actioncable (6.1.3.1)
10
+ actionpack (= 6.1.3.1)
11
+ activesupport (= 6.1.3.1)
11
12
  nio4r (~> 2.0)
12
- websocket-driver (~> 0.6.1)
13
- actionmailer (5.1.5)
14
- actionpack (= 5.1.5)
15
- actionview (= 5.1.5)
16
- activejob (= 5.1.5)
13
+ websocket-driver (>= 0.6.1)
14
+ actionmailbox (6.1.3.1)
15
+ actionpack (= 6.1.3.1)
16
+ activejob (= 6.1.3.1)
17
+ activerecord (= 6.1.3.1)
18
+ activestorage (= 6.1.3.1)
19
+ activesupport (= 6.1.3.1)
20
+ mail (>= 2.7.1)
21
+ actionmailer (6.1.3.1)
22
+ actionpack (= 6.1.3.1)
23
+ actionview (= 6.1.3.1)
24
+ activejob (= 6.1.3.1)
25
+ activesupport (= 6.1.3.1)
17
26
  mail (~> 2.5, >= 2.5.4)
18
27
  rails-dom-testing (~> 2.0)
19
- actionpack (5.1.5)
20
- actionview (= 5.1.5)
21
- activesupport (= 5.1.5)
22
- rack (~> 2.0)
28
+ actionpack (6.1.3.1)
29
+ actionview (= 6.1.3.1)
30
+ activesupport (= 6.1.3.1)
31
+ rack (~> 2.0, >= 2.0.9)
23
32
  rack-test (>= 0.6.3)
24
33
  rails-dom-testing (~> 2.0)
25
- rails-html-sanitizer (~> 1.0, >= 1.0.2)
26
- actionview (5.1.5)
27
- activesupport (= 5.1.5)
34
+ rails-html-sanitizer (~> 1.0, >= 1.2.0)
35
+ actiontext (6.1.3.1)
36
+ actionpack (= 6.1.3.1)
37
+ activerecord (= 6.1.3.1)
38
+ activestorage (= 6.1.3.1)
39
+ activesupport (= 6.1.3.1)
40
+ nokogiri (>= 1.8.5)
41
+ actionview (6.1.3.1)
42
+ activesupport (= 6.1.3.1)
28
43
  builder (~> 3.1)
29
44
  erubi (~> 1.4)
30
45
  rails-dom-testing (~> 2.0)
31
- rails-html-sanitizer (~> 1.0, >= 1.0.3)
32
- activejob (5.1.5)
33
- activesupport (= 5.1.5)
46
+ rails-html-sanitizer (~> 1.1, >= 1.2.0)
47
+ activejob (6.1.3.1)
48
+ activesupport (= 6.1.3.1)
34
49
  globalid (>= 0.3.6)
35
- activemodel (5.1.5)
36
- activesupport (= 5.1.5)
37
- activerecord (5.1.5)
38
- activemodel (= 5.1.5)
39
- activesupport (= 5.1.5)
40
- arel (~> 8.0)
41
- activesupport (5.1.5)
50
+ activemodel (6.1.3.1)
51
+ activesupport (= 6.1.3.1)
52
+ activerecord (6.1.3.1)
53
+ activemodel (= 6.1.3.1)
54
+ activesupport (= 6.1.3.1)
55
+ activestorage (6.1.3.1)
56
+ actionpack (= 6.1.3.1)
57
+ activejob (= 6.1.3.1)
58
+ activerecord (= 6.1.3.1)
59
+ activesupport (= 6.1.3.1)
60
+ marcel (~> 1.0.0)
61
+ mini_mime (~> 1.0.2)
62
+ activesupport (6.1.3.1)
42
63
  concurrent-ruby (~> 1.0, >= 1.0.2)
43
- i18n (~> 0.7)
44
- minitest (~> 5.1)
45
- tzinfo (~> 1.1)
46
- addressable (2.5.2)
47
- public_suffix (>= 2.0.2, < 4.0)
48
- arel (8.0.0)
49
- bson (4.3.0)
50
- builder (3.2.3)
51
- carrierwave (1.2.2)
52
- activemodel (>= 4.0.0)
53
- activesupport (>= 4.0.0)
54
- mime-types (>= 1.16)
55
- carrierwave-mongoid (1.0.0)
56
- carrierwave (>= 0.8, < 1.3)
57
- mongoid (>= 3.0, < 7.0)
64
+ i18n (>= 1.6, < 2)
65
+ minitest (>= 5.1)
66
+ tzinfo (~> 2.0)
67
+ zeitwerk (~> 2.3)
68
+ addressable (2.7.0)
69
+ public_suffix (>= 2.0.2, < 5.0)
70
+ ast (2.4.2)
71
+ bson (4.12.0)
72
+ builder (3.2.4)
73
+ carrierwave (2.2.1)
74
+ activemodel (>= 5.0.0)
75
+ activesupport (>= 5.0.0)
76
+ addressable (~> 2.6)
77
+ image_processing (~> 1.1)
78
+ marcel (~> 1.0.0)
79
+ mini_mime (>= 0.1.3)
80
+ ssrf_filter (~> 1.0)
81
+ carrierwave-mongoid (1.3.0)
82
+ carrierwave (>= 0.8, < 3)
83
+ mongoid (>= 3.0, < 8.0)
58
84
  mongoid-grid_fs (>= 1.3, < 3.0)
59
85
  climate_control (0.2.0)
60
- cocaine (0.5.8)
61
- climate_control (>= 0.0.3, < 1.0)
62
- coderay (1.1.2)
63
- concurrent-ruby (1.0.5)
64
- crass (1.0.3)
65
- database_cleaner (1.6.2)
66
- diff-lcs (1.3)
67
- docile (1.1.5)
68
- erubi (1.7.1)
69
- factory_bot (4.8.2)
70
- activesupport (>= 3.0.0)
71
- geocoder (1.4.6)
72
- globalid (0.4.1)
86
+ concurrent-ruby (1.1.8)
87
+ content_disposition (1.0.0)
88
+ crass (1.0.6)
89
+ database_cleaner (2.0.1)
90
+ database_cleaner-active_record (~> 2.0.0)
91
+ database_cleaner-active_record (2.0.0)
92
+ activerecord (>= 5.a)
93
+ database_cleaner-core (~> 2.0.0)
94
+ database_cleaner-core (2.0.1)
95
+ diff-lcs (1.4.4)
96
+ docile (1.3.5)
97
+ down (5.2.0)
98
+ addressable (~> 2.5)
99
+ erubi (1.10.0)
100
+ factory_bot (6.1.0)
101
+ activesupport (>= 5.0.0)
102
+ ffi (1.15.0)
103
+ geocoder (1.6.6)
104
+ globalid (0.4.2)
73
105
  activesupport (>= 4.2.0)
74
- i18n (0.9.5)
106
+ i18n (1.8.10)
75
107
  concurrent-ruby (~> 1.0)
76
- json (2.1.0)
77
- loofah (2.2.0)
108
+ image_processing (1.12.1)
109
+ mini_magick (>= 4.9.5, < 5)
110
+ ruby-vips (>= 2.0.17, < 3)
111
+ loofah (2.9.1)
78
112
  crass (~> 1.0.2)
79
113
  nokogiri (>= 1.5.9)
80
- mail (2.7.0)
114
+ mail (2.7.1)
81
115
  mini_mime (>= 0.1.1)
82
- method_source (0.9.0)
83
- mime-types (3.1)
116
+ marcel (1.0.1)
117
+ method_source (1.0.0)
118
+ mime-types (3.3.1)
84
119
  mime-types-data (~> 3.2015)
85
- mime-types-data (3.2016.0521)
86
- mimemagic (0.3.2)
87
- mini_mime (1.0.0)
88
- mini_portile2 (2.3.0)
89
- minitest (5.11.3)
90
- mongo (2.5.1)
91
- bson (>= 4.3.0, < 5.0.0)
92
- mongoid (6.3.0)
93
- activemodel (~> 5.1)
94
- mongo (>= 2.5.0, < 3.0.0)
120
+ mime-types-data (3.2021.0225)
121
+ mimemagic (0.3.10)
122
+ nokogiri (~> 1)
123
+ rake
124
+ mini_magick (4.11.0)
125
+ mini_mime (1.0.3)
126
+ mini_portile2 (2.5.0)
127
+ minitest (5.14.4)
128
+ mongo (2.14.0)
129
+ bson (>= 4.8.2, < 5.0.0)
130
+ mongoid (7.2.2)
131
+ activemodel (>= 5.1, < 6.2)
132
+ mongo (>= 2.10.5, < 3.0.0)
95
133
  mongoid-compatibility (0.5.1)
96
134
  activesupport
97
135
  mongoid (>= 2.0)
98
- mongoid-grid_fs (2.3.0)
136
+ mongoid-grid_fs (2.4.0)
99
137
  mime-types (>= 1.0, < 4.0)
100
- mongoid (>= 3.0, < 7.0)
138
+ mongoid (>= 3.0, < 8.0)
101
139
  mongoid-paperclip (0.0.11)
102
140
  mongoid
103
141
  paperclip (>= 2.3.6, != 4.3.0)
104
- mongoid-rspec (4.0.0)
142
+ mongoid-rspec (4.1.0)
105
143
  activesupport (>= 3.0.0)
106
- mongoid (>= 2.0)
107
- mongoid-compatibility
108
- rspec (~> 3.3)
109
- nio4r (2.2.0)
110
- nokogiri (1.8.2)
111
- mini_portile2 (~> 2.3.0)
112
- nokogumbo (1.5.0)
113
- nokogiri
114
- paperclip (5.2.1)
144
+ mongoid (>= 3.1)
145
+ mongoid-compatibility (>= 0.5.1)
146
+ rspec-core (~> 3.3)
147
+ rspec-expectations (~> 3.3)
148
+ rspec-mocks (~> 3.3)
149
+ nio4r (2.5.7)
150
+ nokogiri (1.11.3)
151
+ mini_portile2 (~> 2.5.0)
152
+ racc (~> 1.4)
153
+ nokogumbo (2.0.5)
154
+ nokogiri (~> 1.8, >= 1.8.4)
155
+ paperclip (6.1.0)
115
156
  activemodel (>= 4.2.0)
116
157
  activesupport (>= 4.2.0)
117
- cocaine (~> 0.5.5)
118
158
  mime-types
119
159
  mimemagic (~> 0.3.0)
120
- pry (0.11.3)
121
- coderay (~> 1.1.0)
122
- method_source (~> 0.9.0)
123
- public_suffix (3.0.2)
124
- rack (2.0.4)
125
- rack-test (0.8.3)
160
+ terrapin (~> 0.6.0)
161
+ parallel (1.20.1)
162
+ parser (3.0.1.0)
163
+ ast (~> 2.4.1)
164
+ public_suffix (4.0.6)
165
+ racc (1.5.2)
166
+ rack (2.2.3)
167
+ rack-test (1.1.0)
126
168
  rack (>= 1.0, < 3)
127
- rails (5.1.5)
128
- actioncable (= 5.1.5)
129
- actionmailer (= 5.1.5)
130
- actionpack (= 5.1.5)
131
- actionview (= 5.1.5)
132
- activejob (= 5.1.5)
133
- activemodel (= 5.1.5)
134
- activerecord (= 5.1.5)
135
- activesupport (= 5.1.5)
136
- bundler (>= 1.3.0)
137
- railties (= 5.1.5)
169
+ rails (6.1.3.1)
170
+ actioncable (= 6.1.3.1)
171
+ actionmailbox (= 6.1.3.1)
172
+ actionmailer (= 6.1.3.1)
173
+ actionpack (= 6.1.3.1)
174
+ actiontext (= 6.1.3.1)
175
+ actionview (= 6.1.3.1)
176
+ activejob (= 6.1.3.1)
177
+ activemodel (= 6.1.3.1)
178
+ activerecord (= 6.1.3.1)
179
+ activestorage (= 6.1.3.1)
180
+ activesupport (= 6.1.3.1)
181
+ bundler (>= 1.15.0)
182
+ railties (= 6.1.3.1)
138
183
  sprockets-rails (>= 2.0.0)
139
184
  rails-dom-testing (2.0.3)
140
185
  activesupport (>= 4.2.0)
141
186
  nokogiri (>= 1.6)
142
- rails-html-sanitizer (1.0.3)
143
- loofah (~> 2.0)
144
- railties (5.1.5)
145
- actionpack (= 5.1.5)
146
- activesupport (= 5.1.5)
187
+ rails-html-sanitizer (1.3.0)
188
+ loofah (~> 2.3)
189
+ railties (6.1.3.1)
190
+ actionpack (= 6.1.3.1)
191
+ activesupport (= 6.1.3.1)
147
192
  method_source
148
193
  rake (>= 0.8.7)
149
- thor (>= 0.18.1, < 2.0)
150
- rake (12.3.0)
151
- rspec (3.7.0)
152
- rspec-core (~> 3.7.0)
153
- rspec-expectations (~> 3.7.0)
154
- rspec-mocks (~> 3.7.0)
155
- rspec-core (3.7.1)
156
- rspec-support (~> 3.7.0)
157
- rspec-expectations (3.7.0)
194
+ thor (~> 1.0)
195
+ rainbow (3.0.0)
196
+ rake (13.0.3)
197
+ regexp_parser (2.1.1)
198
+ rexml (3.2.5)
199
+ rspec (3.10.0)
200
+ rspec-core (~> 3.10.0)
201
+ rspec-expectations (~> 3.10.0)
202
+ rspec-mocks (~> 3.10.0)
203
+ rspec-core (3.10.1)
204
+ rspec-support (~> 3.10.0)
205
+ rspec-expectations (3.10.1)
158
206
  diff-lcs (>= 1.2.0, < 2.0)
159
- rspec-support (~> 3.7.0)
160
- rspec-mocks (3.7.0)
207
+ rspec-support (~> 3.10.0)
208
+ rspec-mocks (3.10.2)
161
209
  diff-lcs (>= 1.2.0, < 2.0)
162
- rspec-support (~> 3.7.0)
163
- rspec-support (3.7.1)
164
- russian_phone (0.6.0)
165
- safe_yaml (1.0.4)
166
- sanitize (4.6.0)
210
+ rspec-support (~> 3.10.0)
211
+ rspec-support (3.10.2)
212
+ rubocop (1.12.1)
213
+ parallel (~> 1.10)
214
+ parser (>= 3.0.0.0)
215
+ rainbow (>= 2.2.2, < 4.0)
216
+ regexp_parser (>= 1.8, < 3.0)
217
+ rexml
218
+ rubocop-ast (>= 1.2.0, < 2.0)
219
+ ruby-progressbar (~> 1.7)
220
+ unicode-display_width (>= 1.4.0, < 3.0)
221
+ rubocop-ast (1.4.1)
222
+ parser (>= 2.7.1.5)
223
+ rubocop-rspec (2.2.0)
224
+ rubocop (~> 1.0)
225
+ rubocop-ast (>= 1.1.0)
226
+ ruby-progressbar (1.11.0)
227
+ ruby-vips (2.1.0)
228
+ ffi (~> 1.12)
229
+ russian_phone (0.7.0)
230
+ safe_yaml (1.0.5)
231
+ sanitize (5.2.3)
167
232
  crass (~> 1.0.2)
168
- nokogiri (>= 1.4.4)
169
- nokogumbo (~> 1.4)
170
- simplecov (0.15.1)
171
- docile (~> 1.1.0)
172
- json (>= 1.8, < 3)
173
- simplecov-html (~> 0.10.0)
174
- simplecov-html (0.10.2)
175
- sprockets (3.7.1)
233
+ nokogiri (>= 1.8.0)
234
+ nokogumbo (~> 2.0)
235
+ shrine (3.3.0)
236
+ content_disposition (~> 1.0)
237
+ down (~> 5.1)
238
+ shrine-mongoid (1.0.0)
239
+ mongoid (>= 5.0)
240
+ shrine (>= 3.0.0.beta3, < 4)
241
+ simplecov (0.21.2)
242
+ docile (~> 1.1)
243
+ simplecov-html (~> 0.11)
244
+ simplecov_json_formatter (~> 0.1)
245
+ simplecov-html (0.12.3)
246
+ simplecov_json_formatter (0.1.2)
247
+ sprockets (4.0.2)
176
248
  concurrent-ruby (~> 1.0)
177
249
  rack (> 1, < 3)
178
- sprockets-rails (3.2.1)
250
+ sprockets-rails (3.2.2)
179
251
  actionpack (>= 4.0)
180
252
  activesupport (>= 4.0)
181
253
  sprockets (>= 3.0.0)
182
- thor (0.20.0)
183
- thread_safe (0.3.6)
184
- tzinfo (1.2.5)
185
- thread_safe (~> 0.1)
254
+ ssrf_filter (1.0.7)
255
+ terrapin (0.6.0)
256
+ climate_control (>= 0.0.3, < 1.0)
257
+ thor (1.1.0)
258
+ tzinfo (2.0.4)
259
+ concurrent-ruby (~> 1.0)
260
+ unicode-display_width (2.0.0)
186
261
  validates_email_format_of (1.6.3)
187
262
  i18n
188
- websocket-driver (0.6.5)
263
+ websocket-driver (0.7.3)
189
264
  websocket-extensions (>= 0.1.0)
190
- websocket-extensions (0.1.3)
265
+ websocket-extensions (0.1.5)
266
+ zeitwerk (2.4.2)
191
267
 
192
268
  PLATFORMS
193
269
  ruby
@@ -199,19 +275,23 @@ DEPENDENCIES
199
275
  database_cleaner
200
276
  factory_bot
201
277
  geocoder
202
- mongoid (~> 6.3)
278
+ image_processing
279
+ mini_magick
280
+ mongoid (~> 7.2.2)
203
281
  mongoid-paperclip
204
282
  mongoid-rspec
205
- pry
206
283
  rails
207
284
  rails_admin_settings!
208
285
  rake
209
286
  rspec
287
+ rubocop-rspec
210
288
  russian_phone
211
289
  safe_yaml
212
290
  sanitize
291
+ shrine (~> 3.0)
292
+ shrine-mongoid (~> 1.0)
213
293
  simplecov
214
294
  validates_email_format_of
215
295
 
216
296
  BUNDLED WITH
217
- 1.16.1
297
+ 1.17.3
data/README.md CHANGED
@@ -1,7 +1,11 @@
1
1
  # RailsAdminSettings
2
2
 
3
+ Master repository has moved to gitlab, all new code will be there:
4
+
5
+ https://gitlab.com/rocket-science/rails_admin_settings
6
+
7
+
3
8
  [![Build Status](https://secure.travis-ci.org/rs-pro/rails_admin_settings.png?branch=master)](http://travis-ci.org/rs-pro/rails_admin_settings)
4
- [![Dependency Status](https://gemnasium.com/rs-pro/rails_admin_settings.svg)](https://gemnasium.com/rs-pro/rails_admin_settings)
5
9
  [![Gem Version](https://badge.fury.io/rb/rails_admin_settings.svg)](https://badge.fury.io/rb/rails_admin_settings)
6
10
  [![security](https://hakiri.io/github/rs-pro/rails_admin_settings/master.svg)](https://hakiri.io/github/rs-pro/rails_admin_settings/master)
7
11
  [![Maintainability](https://api.codeclimate.com/v1/badges/de00cbec10559ebd2b4b/maintainability)](https://codeclimate.com/github/rs-pro/rails_admin_settings/maintainability)
@@ -7,7 +7,6 @@ end
7
7
 
8
8
  module RailsAdminSettings
9
9
  class Setting
10
- #binding.pry
11
10
  if RailsAdminSettings.mongoid?
12
11
  include RailsAdminSettings::Mongoid
13
12
  end
@@ -1,4 +1,4 @@
1
- - if ['string', 'integer', 'phone', 'email', 'address', 'url', 'domain'].include?(@object.type)
1
+ - if ['string', 'integer', 'float', 'phone', 'email', 'address', 'url', 'domain'].include?(@object.type)
2
2
  = form.text_field :raw, :value => field.value
3
3
  - if @object.type == 'boolean'
4
4
  = form.check_box :raw, {:value => field.value}, 'true', 'false'
@@ -8,7 +8,6 @@
8
8
  = form.text_area :raw, :value => field.value, :rows => 10, :cols => 80
9
9
  - elsif @object.type == 'code' || @object.type == 'sanitize_code'
10
10
  :ruby
11
- #binding.pry
12
11
  js_data = {
13
12
  csspath: asset_path('ckeditor/plugins/codemirror/css/codemirror.min.css'),
14
13
  jspath: asset_path('ckeditor/plugins/codemirror/js/codemirror.min.js'),
@@ -15,6 +15,9 @@ class CreateRailsAdminSettings < ActiveRecord::Migration[5.0]
15
15
  t.attachment :file
16
16
  elsif defined?(CarrierWave)
17
17
  t.string :file
18
+ elsif defined?(Shrine)
19
+ t.text :file_data
20
+
18
21
  end
19
22
  t.timestamps
20
23
  end
@@ -0,0 +1,193 @@
1
+ # frozen_string_literal: true
2
+
3
+ class Shrine
4
+ module Plugins
5
+ # Documentation can be found on https://shrinerb.com/docs/plugins/determine_mime_type
6
+ module DetermineMimeType
7
+ LOG_SUBSCRIBER = -> (event) do
8
+ Shrine.logger.info "MIME Type (#{event.duration}ms) – #{{
9
+ io: event[:io].class,
10
+ uploader: event[:uploader],
11
+ }.inspect}"
12
+ end
13
+
14
+ def self.configure(uploader, log_subscriber: LOG_SUBSCRIBER, **opts)
15
+ uploader.opts[:determine_mime_type] ||= { analyzer: :file, analyzer_options: {} }
16
+ uploader.opts[:determine_mime_type].merge!(opts)
17
+
18
+ # instrumentation plugin integration
19
+ uploader.subscribe(:mime_type, &log_subscriber) if uploader.respond_to?(:subscribe)
20
+ end
21
+
22
+ module ClassMethods
23
+ # Determines the MIME type of the IO object by calling the specified
24
+ # analyzer.
25
+ def determine_mime_type(io)
26
+ analyzer = opts[:determine_mime_type][:analyzer]
27
+
28
+ analyzer = mime_type_analyzer(analyzer) if analyzer.is_a?(Symbol)
29
+ args = if analyzer.is_a?(Proc)
30
+ [io, mime_type_analyzers].take(analyzer.arity.abs)
31
+ else
32
+ [io, opts[:determine_mime_type][:analyzer_options]]
33
+ end
34
+
35
+ mime_type = instrument_mime_type(io) { analyzer.call(*args) }
36
+ io.rewind
37
+
38
+ mime_type
39
+ end
40
+ alias mime_type determine_mime_type
41
+
42
+ # Returns a hash of built-in MIME type analyzers, where keys are
43
+ # analyzer names and values are `#call`-able objects which accepts the
44
+ # IO object.
45
+ def mime_type_analyzers
46
+ @mime_type_analyzers ||= MimeTypeAnalyzer::SUPPORTED_TOOLS.inject({}) do |hash, tool|
47
+ hash.merge!(tool => mime_type_analyzer(tool))
48
+ end
49
+ end
50
+
51
+ # Returns callable mime type analyzer object.
52
+ def mime_type_analyzer(name)
53
+ MimeTypeAnalyzer.new(name)
54
+ end
55
+
56
+ private
57
+
58
+ # Sends a `mime_type.shrine` event for instrumentation plugin.
59
+ def instrument_mime_type(io, &block)
60
+ return yield unless respond_to?(:instrument)
61
+
62
+ instrument(:mime_type, io: io, &block)
63
+ end
64
+ end
65
+
66
+ module InstanceMethods
67
+ private
68
+
69
+ # Calls the configured MIME type analyzer.
70
+ def extract_mime_type(io)
71
+ self.class.determine_mime_type(io)
72
+ end
73
+ end
74
+
75
+ class MimeTypeAnalyzer
76
+ SUPPORTED_TOOLS = [:fastimage, :file, :filemagic, :mimemagic, :marcel, :mime_types, :mini_mime, :content_type]
77
+ MAGIC_NUMBER = 256 * 1024
78
+
79
+ def initialize(tool)
80
+ raise Error, "unknown mime type analyzer #{tool.inspect}, supported analyzers are: #{SUPPORTED_TOOLS.join(",")}" unless SUPPORTED_TOOLS.include?(tool)
81
+
82
+ @tool = tool
83
+ end
84
+
85
+ def call(io, options = {})
86
+ mime_type = send(:"extract_with_#{@tool}", io, options)
87
+ io.rewind
88
+
89
+ mime_type
90
+ end
91
+
92
+ private
93
+
94
+ def extract_with_file(io, options)
95
+ require "open3"
96
+
97
+ return nil if io.eof? # file command returns "application/x-empty" for empty files
98
+
99
+ Open3.popen3(*%W[file --mime-type --brief -]) do |stdin, stdout, stderr, thread|
100
+ begin
101
+ IO.copy_stream(io, stdin.binmode)
102
+ rescue Errno::EPIPE
103
+ end
104
+ stdin.close
105
+
106
+ status = thread.value
107
+
108
+ raise Error, "file command failed to spawn: #{stderr.read}" if status.nil?
109
+ raise Error, "file command failed: #{stderr.read}" unless status.success?
110
+
111
+ $stderr.print(stderr.read)
112
+
113
+ output = stdout.read.strip
114
+
115
+ raise Error, "file command failed: #{output}" if output.include?("cannot open")
116
+
117
+ output
118
+ end
119
+ rescue Errno::ENOENT
120
+ raise Error, "file command-line tool is not installed"
121
+ end
122
+
123
+ def extract_with_fastimage(io, options)
124
+ require "fastimage"
125
+
126
+ type = FastImage.type(io)
127
+ "image/#{type}" if type
128
+ end
129
+
130
+ def extract_with_filemagic(io, options)
131
+ require "filemagic"
132
+
133
+ return nil if io.eof? # FileMagic returns "application/x-empty" for empty files
134
+
135
+ FileMagic.open(FileMagic::MAGIC_MIME_TYPE) do |filemagic|
136
+ filemagic.buffer(io.read(MAGIC_NUMBER))
137
+ end
138
+ end
139
+
140
+ def extract_with_mimemagic(io, options)
141
+ require "mimemagic"
142
+
143
+ mime = MimeMagic.by_magic(io)
144
+ mime&.type
145
+ end
146
+
147
+ def extract_with_marcel(io, options)
148
+ require "marcel"
149
+
150
+ return nil if io.eof? # marcel returns "application/octet-stream" for empty files
151
+
152
+ filename = (options[:filename_fallback] ? extract_filename(io) : nil)
153
+ Marcel::MimeType.for(io, name: filename)
154
+ end
155
+
156
+ def extract_with_mime_types(io, options)
157
+ require "mime/types"
158
+
159
+ if filename = extract_filename(io)
160
+ mime_type = MIME::Types.of(filename).first
161
+ mime_type&.content_type
162
+ end
163
+ end
164
+
165
+ def extract_with_mini_mime(io, options)
166
+ require "mini_mime"
167
+
168
+ if filename = extract_filename(io)
169
+ info = MiniMime.lookup_by_filename(filename)
170
+ info&.content_type
171
+ end
172
+ end
173
+
174
+ def extract_with_content_type(io, options)
175
+ if io.respond_to?(:content_type) && io.content_type
176
+ io.content_type.split(";").first
177
+ end
178
+ end
179
+
180
+ def extract_filename(io)
181
+ if io.respond_to?(:original_filename)
182
+ io.original_filename
183
+ elsif io.respond_to?(:path)
184
+ File.basename(io.path)
185
+ end
186
+ end
187
+ end
188
+
189
+ end
190
+
191
+ register_plugin(:determine_mime_type, DetermineMimeType)
192
+ end
193
+ end
@@ -4,6 +4,7 @@ module RailsAdminSettings
4
4
  'string',
5
5
  'text',
6
6
  'integer',
7
+ 'float',
7
8
  'boolean',
8
9
  'html',
9
10
  'code',
@@ -10,7 +10,7 @@ module RailsAdminSettings
10
10
  end
11
11
 
12
12
  def text_kind?
13
- (RailsAdminSettings.kinds - ['phone', 'phones', 'integer', 'yaml', 'json', 'boolean']).include? kind
13
+ (RailsAdminSettings.kinds - ['phone', 'phones', 'integer', 'float', 'yaml', 'json', 'boolean']).include? kind
14
14
  end
15
15
 
16
16
  def upload_kind?
@@ -31,10 +31,14 @@ module RailsAdminSettings
31
31
 
32
32
  def value
33
33
  if upload_kind?
34
- if file?
35
- file.url
34
+ unless defined?(Shrine)
35
+ if file?
36
+ file.url
37
+ else
38
+ nil
39
+ end
36
40
  else
37
- nil
41
+ file.url if file.present?
38
42
  end
39
43
  elsif raw.blank? || disabled?
40
44
  default_value
@@ -54,7 +58,8 @@ module RailsAdminSettings
54
58
  end
55
59
 
56
60
  def to_s
57
- if yaml_kind? || json_kind? || phone_kind? || integer_kind?
61
+ if yaml_kind? || json_kind? || phone_kind? || integer_kind? || float_kind?
62
+
58
63
  raw
59
64
  else
60
65
  value
@@ -94,6 +99,8 @@ module RailsAdminSettings
94
99
  ''
95
100
  elsif integer_kind?
96
101
  0
102
+ elsif float_kind?
103
+ 0
97
104
  elsif yaml_kind?
98
105
  nil
99
106
  elsif json_kind?
@@ -181,6 +188,8 @@ module RailsAdminSettings
181
188
  process_text
182
189
  elsif integer_kind?
183
190
  raw.to_i
191
+ elsif float_kind?
192
+ raw.to_f
184
193
  elsif yaml_kind?
185
194
  load_yaml
186
195
  elsif json_kind?
@@ -4,7 +4,6 @@ module RailsAdminSettings
4
4
  if base.respond_to?(:rails_admin)
5
5
  base.rails_admin do
6
6
  navigation_label I18n.t('admin.settings.label')
7
-
8
7
  list do
9
8
  if Object.const_defined?('RailsAdminToggleable')
10
9
  field :enabled, :toggle
@@ -16,10 +15,18 @@ module RailsAdminSettings
16
15
  field :name
17
16
  field :raw do
18
17
  pretty_value do
19
- if bindings[:object].file_kind?
20
- "<a href='#{CGI::escapeHTML(bindings[:object].file.url)}'>#{CGI::escapeHTML(bindings[:object].to_path)}</a>".html_safe
21
- elsif bindings[:object].image_kind?
22
- "<a href='#{CGI::escapeHTML(bindings[:object].file.url)}'><img src='#{CGI::escapeHTML(bindings[:object].file.url)}' /></a>".html_safe
18
+ if bindings[:object].file_kind? and !defined?(Shrine) and bindings[:object].to_path.present?
19
+ if bindings[:object].file.url.blank?
20
+ "-"
21
+ else
22
+ "<a href='#{CGI::escapeHTML(bindings[:object].file.url)}'>#{CGI::escapeHTML(bindings[:object].to_path)}</a>".html_safe
23
+ end
24
+ elsif bindings[:object].image_kind? and !defined?(Shrine) and !bindings[:object].file.nil?
25
+ if bindings[:object].file.url.blank?
26
+ "-"
27
+ else
28
+ "<a href='#{CGI::escapeHTML(bindings[:object].file.url)}'><img src='#{CGI::escapeHTML(bindings[:object].file.url)}' /></a>".html_safe
29
+ end
23
30
  else
24
31
  value
25
32
  end
@@ -39,6 +39,8 @@ class Settings < BasicObject
39
39
 
40
40
  def table_exists?
41
41
  RailsAdminSettings.mongoid? || RailsAdminSettings::Setting.table_exists?
42
+ rescue ActiveRecord::NoDatabaseError
43
+ false
42
44
  end
43
45
 
44
46
  def unload!
@@ -0,0 +1,14 @@
1
+ module RailsAdminSettings
2
+ module Uploads
3
+ class ShrineUploader < Shrine
4
+ plugin :determine_mime_type
5
+ plugin :validation_helpers
6
+ plugin :mongoid if RailsAdminSettings.mongoid?
7
+ Attacher.validate do
8
+ validate_mime_type_inclusion %w[image/jpeg image/gif image/png]
9
+ validate_max_size 2.megabytes
10
+ end
11
+ end
12
+
13
+ end
14
+ end
@@ -1,6 +1,7 @@
1
1
  module RailsAdminSettings
2
2
  module Uploads
3
3
  autoload :CarrierWaveUploader, "rails_admin_settings/storage/carrier_wave_uploader"
4
+ autoload :ShrineUploader, "rails_admin_settings/storage/shrine_uploader"
4
5
 
5
6
  def self.paperclip_options
6
7
  if defined?(Rails)
@@ -37,6 +38,16 @@ module RailsAdminSettings
37
38
  end
38
39
  Settings.file_uploads_supported = true
39
40
  Settings.file_uploads_engine = :paperclip
41
+ elsif RailsAdminSettings.active_record? && defined?(Shrine)
42
+ Settings.file_uploads_supported = true
43
+ Settings.file_uploads_engine = :shrine
44
+ base.send(:include, ShrineUploader::Attachment(:file))
45
+ elsif RailsAdminSettings.mongoid? && ::Mongoid.const_defined?('Shrine')
46
+ base.send(:include, ::Mongoid::Document)
47
+ base.send(:include, ShrineUploader::Attachment(:file))
48
+ base.field(:file_data, type: String)
49
+ Settings.file_uploads_supported = true
50
+ Settings.file_uploads_engine = :shrine
40
51
  else
41
52
  # puts "[rails_admin_settings] Uploads disabled"
42
53
  end
@@ -9,6 +9,7 @@ module RailsAdminSettings
9
9
  base.validates_uniqueness_of :key, scope: :ns
10
10
  base.validates_inclusion_of :kind, in: RailsAdminSettings.kinds
11
11
  base.validates_numericality_of :raw, if: :integer_kind?
12
+ base.validates_numericality_of :raw, if: :float_kind?
12
13
 
13
14
  add_validators(base)
14
15
  end
@@ -31,7 +32,7 @@ module RailsAdminSettings
31
32
  def add_file_validator(base)
32
33
  base.validate if: :file_kind? do
33
34
  unless Settings.file_uploads_supported
34
- raise '[rails_admin_settings] File kind requires either CarrierWave or Paperclip. Check that rails_admin_settings is below them in Gemfile'
35
+ raise '[rails_admin_settings] File kind requires either CarrierWave or Paperclip or Shrine. Check that rails_admin_settings is below them in Gemfile'
35
36
  end
36
37
  end
37
38
  end
@@ -1,3 +1,3 @@
1
1
  module RailsAdminSettings
2
- VERSION = "1.4.1"
2
+ VERSION = "1.7.0"
3
3
  end
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
10
10
  spec.email = ["glebtv@gmail.com"]
11
11
  spec.description = %q{Mongoid / ActiveRecord + RailsAdmin App Settings management}
12
12
  spec.summary = %q{}
13
- spec.homepage = "https://github.com/rs-pro/rails_admin_settings"
13
+ spec.homepage = "https://gitlab.com/rocket-science/rails_admin_settings"
14
14
  spec.license = "MIT"
15
15
 
16
16
  spec.files = `git ls-files`.split($/)
@@ -19,7 +19,7 @@ Gem::Specification.new do |spec|
19
19
  spec.require_paths = ["lib"]
20
20
 
21
21
 
22
- spec.add_development_dependency "mongoid", '~> 6.3'
22
+ spec.add_development_dependency "mongoid", '~> 7.2.2'
23
23
  spec.add_development_dependency "rails"
24
24
  spec.add_development_dependency "bundler"
25
25
  spec.add_development_dependency "rake"
@@ -36,5 +36,9 @@ Gem::Specification.new do |spec|
36
36
  spec.add_development_dependency "addressable"
37
37
  spec.add_development_dependency "carrierwave-mongoid"
38
38
  spec.add_development_dependency "mongoid-paperclip"
39
- spec.add_development_dependency "pry"
39
+ spec.add_development_dependency "rubocop-rspec"
40
+ spec.add_development_dependency 'image_processing'
41
+ spec.add_development_dependency "mini_magick"
42
+ spec.add_development_dependency "shrine", "~> 3.0"
43
+ spec.add_development_dependency "shrine-mongoid", "~> 1.0"
40
44
  end
@@ -3,6 +3,6 @@
3
3
  FactoryBot.define do
4
4
  factory :setting, class: RailsAdminSettings::Setting do
5
5
  sequence(:key){|n| "setting_#{n}" }
6
- raw "Контент 1"
6
+ raw { "Контент 1" }
7
7
  end
8
8
  end
@@ -0,0 +1,34 @@
1
+ require 'spec_helper'
2
+
3
+
4
+ describe "Uploads" do
5
+ if Settings.file_uploads_engine != :shrine
6
+ pending "shrine not detected, skipped. To run use UPLOADS=shrine rspec"
7
+ else
8
+ before :each do
9
+ f = "#{File.dirname(__FILE__)}/../uploads/1024x768.gif"
10
+ if File.file?(f)
11
+ File.unlink(f)
12
+ end
13
+ end
14
+ it 'supports file kind' do
15
+ Settings.set('file', File.open("#{File.dirname(__FILE__)}/support/1024x768.gif"), kind: 'file')
16
+ expect(Settings.get(:file).file.metadata["filename"]).to eq '1024x768.gif'
17
+ expect(Settings.get(:file).file.metadata["size"]).to eq 4357
18
+ expect(Settings.get(:file).file.metadata["mime_type"]).to eq "image/gif"
19
+ expect(Settings.get(:file).file.id.split(".").last).to eq "gif"
20
+ expect(Settings.file.split("/").second + "/" + Settings.file.split("/").last.split(".").last).to eq "uploads/gif"
21
+ expect(File.exists?("public/uploads/#{Settings.get(:file).file.id}")).to be_truthy
22
+ end
23
+ it 'supports image kind' do
24
+ Settings.set('file', File.open("#{File.dirname(__FILE__)}/support/1024x768.gif"), kind: 'image')
25
+ expect(Settings.get(:file).file.metadata["filename"]).to eq '1024x768.gif'
26
+ expect(Settings.get(:file).file.metadata["size"]).to eq 4357
27
+ expect(Settings.get(:file).file.metadata["mime_type"]).to eq "image/gif"
28
+ expect(Settings.get(:file).file.id.split(".").last).to eq "gif"
29
+ expect(Settings.file.split("/").second + "/" + Settings.file.split("/").last.split(".").last).to eq "uploads/gif"
30
+ expect(File.exists?("public/uploads/#{Settings.get(:file).file.id}")).to be_truthy
31
+ end
32
+ end
33
+ end
34
+
data/spec/spec_helper.rb CHANGED
@@ -5,7 +5,6 @@ require 'rubygems'
5
5
  require 'simplecov'
6
6
  SimpleCov.start
7
7
 
8
- require 'pry'
9
8
  require 'bundler/setup'
10
9
  require 'active_support'
11
10
  require 'active_support/core_ext'
@@ -18,7 +17,6 @@ require 'database_cleaner'
18
17
  require 'factory_bot'
19
18
  require 'mongoid-rspec'
20
19
 
21
- p ENV["UPLOADS"]
22
20
  if ENV['UPLOADS'] == 'paperclip'
23
21
  require "mongoid-paperclip"
24
22
  end
@@ -30,6 +28,22 @@ if ENV['UPLOADS'] == 'carrierwave'
30
28
  end
31
29
  end
32
30
  end
31
+ if ENV['UPLOADS'] == 'shrine'
32
+ require "shrine"
33
+ require "shrine/storage/file_system"
34
+ Shrine.storages = {
35
+ cache: Shrine::Storage::FileSystem.new("public", prefix: "uploads/cache"), # temporary
36
+ store: Shrine::Storage::FileSystem.new("public", prefix: "uploads"), # permanent
37
+ }
38
+
39
+ if ENV['ACTIVERECORD']
40
+ Shrine.plugin :activerecord
41
+ end
42
+ Shrine.plugin :cached_attachment_data # for retaining the cached file across form redisplays
43
+ Shrine.plugin :restore_cached_data # re-extract metadata when attaching a cached file
44
+ end
45
+
46
+
33
47
 
34
48
  I18n.enforce_available_locales = true
35
49
  I18n.load_path << File.join(File.dirname(__FILE__), "..", "config", "locales", "en.yml")
File without changes
data/spec/types_spec.rb CHANGED
@@ -23,6 +23,13 @@ describe 'Settings kind' do
23
23
  expect(Settings.testint2).to eq 5
24
24
  end
25
25
 
26
+ it 'float' do
27
+ expect(Settings.get(:testfloat, kind: 'float').value).to eq 0
28
+ expect(Settings.get(:testfloat, default: 5.2, kind: 'float').value).to eq 0
29
+ expect(Settings.get(:testfloat2, default: 5.5, kind: 'float').value).to eq 5.5
30
+ expect(Settings.testfloat2).to eq 5.5
31
+ end
32
+
26
33
  it 'does yaml' do
27
34
  Settings.set(:data, '[one, two, three]', kind: 'yaml')
28
35
  expect(Settings.get(:data).raw).to eq '[one, two, three]'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_admin_settings
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.1
4
+ version: 1.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gleb Tv
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-03-07 00:00:00.000000000 Z
11
+ date: 2021-04-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mongoid
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '6.3'
19
+ version: 7.2.2
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '6.3'
26
+ version: 7.2.2
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rails
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -249,7 +249,7 @@ dependencies:
249
249
  - !ruby/object:Gem::Version
250
250
  version: '0'
251
251
  - !ruby/object:Gem::Dependency
252
- name: pry
252
+ name: rubocop-rspec
253
253
  requirement: !ruby/object:Gem::Requirement
254
254
  requirements:
255
255
  - - ">="
@@ -262,6 +262,62 @@ dependencies:
262
262
  - - ">="
263
263
  - !ruby/object:Gem::Version
264
264
  version: '0'
265
+ - !ruby/object:Gem::Dependency
266
+ name: image_processing
267
+ requirement: !ruby/object:Gem::Requirement
268
+ requirements:
269
+ - - ">="
270
+ - !ruby/object:Gem::Version
271
+ version: '0'
272
+ type: :development
273
+ prerelease: false
274
+ version_requirements: !ruby/object:Gem::Requirement
275
+ requirements:
276
+ - - ">="
277
+ - !ruby/object:Gem::Version
278
+ version: '0'
279
+ - !ruby/object:Gem::Dependency
280
+ name: mini_magick
281
+ requirement: !ruby/object:Gem::Requirement
282
+ requirements:
283
+ - - ">="
284
+ - !ruby/object:Gem::Version
285
+ version: '0'
286
+ type: :development
287
+ prerelease: false
288
+ version_requirements: !ruby/object:Gem::Requirement
289
+ requirements:
290
+ - - ">="
291
+ - !ruby/object:Gem::Version
292
+ version: '0'
293
+ - !ruby/object:Gem::Dependency
294
+ name: shrine
295
+ requirement: !ruby/object:Gem::Requirement
296
+ requirements:
297
+ - - "~>"
298
+ - !ruby/object:Gem::Version
299
+ version: '3.0'
300
+ type: :development
301
+ prerelease: false
302
+ version_requirements: !ruby/object:Gem::Requirement
303
+ requirements:
304
+ - - "~>"
305
+ - !ruby/object:Gem::Version
306
+ version: '3.0'
307
+ - !ruby/object:Gem::Dependency
308
+ name: shrine-mongoid
309
+ requirement: !ruby/object:Gem::Requirement
310
+ requirements:
311
+ - - "~>"
312
+ - !ruby/object:Gem::Version
313
+ version: '1.0'
314
+ type: :development
315
+ prerelease: false
316
+ version_requirements: !ruby/object:Gem::Requirement
317
+ requirements:
318
+ - - "~>"
319
+ - !ruby/object:Gem::Version
320
+ version: '1.0'
265
321
  description: Mongoid / ActiveRecord + RailsAdmin App Settings management
266
322
  email:
267
323
  - glebtv@gmail.com
@@ -270,7 +326,9 @@ extensions: []
270
326
  extra_rdoc_files: []
271
327
  files:
272
328
  - ".gitignore"
329
+ - ".rakeTasks"
273
330
  - ".rspec"
331
+ - ".ruby-version"
274
332
  - ".travis.yml"
275
333
  - CHANGELOG.md
276
334
  - Gemfile
@@ -288,6 +346,7 @@ files:
288
346
  - lib/generators/rails_admin_settings/migration_generator.rb
289
347
  - lib/generators/rails_admin_settings/templates/migration.rb
290
348
  - lib/rails_admin_settings.rb
349
+ - lib/rails_admin_settings/determine_mime_type.rb
291
350
  - lib/rails_admin_settings/dumper.rb
292
351
  - lib/rails_admin_settings/engine.rb
293
352
  - lib/rails_admin_settings/fallback.rb
@@ -300,6 +359,7 @@ files:
300
359
  - lib/rails_admin_settings/require_helpers.rb
301
360
  - lib/rails_admin_settings/settings.rb
302
361
  - lib/rails_admin_settings/storage/carrier_wave_uploader.rb
362
+ - lib/rails_admin_settings/storage/shrine_uploader.rb
303
363
  - lib/rails_admin_settings/tasks.rb
304
364
  - lib/rails_admin_settings/uploads.rb
305
365
  - lib/rails_admin_settings/validation.rb
@@ -318,6 +378,7 @@ files:
318
378
  - spec/namespaced_spec.rb
319
379
  - spec/paperclip_spec.rb
320
380
  - spec/settings_spec.rb
381
+ - spec/shrine_spec.rb
321
382
  - spec/spec_helper.rb
322
383
  - spec/support/1024x768.gif
323
384
  - spec/support/database_cleaner.rb
@@ -326,11 +387,11 @@ files:
326
387
  - spec/support/mongoid.rb
327
388
  - spec/support/mongoid.yml
328
389
  - spec/types_spec.rb
329
- homepage: https://github.com/rs-pro/rails_admin_settings
390
+ homepage: https://gitlab.com/rocket-science/rails_admin_settings
330
391
  licenses:
331
392
  - MIT
332
393
  metadata: {}
333
- post_install_message:
394
+ post_install_message:
334
395
  rdoc_options: []
335
396
  require_paths:
336
397
  - lib
@@ -345,9 +406,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
345
406
  - !ruby/object:Gem::Version
346
407
  version: '0'
347
408
  requirements: []
348
- rubyforge_project:
349
- rubygems_version: 2.7.6
350
- signing_key:
409
+ rubygems_version: 3.1.4
410
+ signing_key:
351
411
  specification_version: 4
352
412
  summary: ''
353
413
  test_files:
@@ -363,6 +423,7 @@ test_files:
363
423
  - spec/namespaced_spec.rb
364
424
  - spec/paperclip_spec.rb
365
425
  - spec/settings_spec.rb
426
+ - spec/shrine_spec.rb
366
427
  - spec/spec_helper.rb
367
428
  - spec/support/1024x768.gif
368
429
  - spec/support/database_cleaner.rb