simple_form_bs5_file_input 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -0
- data/Gemfile.lock +110 -87
- data/README.md +9 -0
- data/lib/simple_form_bs5_file_input/single_deletable_file_input.rb +4 -3
- data/lib/simple_form_bs5_file_input/version.rb +1 -1
- metadata +7 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ce2c3270b2eca308b30ab139a6c4c8df318b424f625f8c6960689a2a800bc5d0
|
4
|
+
data.tar.gz: cd16c846ae93111c0e24b4679300cd01c3fc8dd57b392ac311841f7615f71bd4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 29bf87c40cc7d39872d0f0849e5b205dc50853545cbd4bde6b601ae6cae9b874391cc94362e2faaadc509090764a4b4b7a98a73d2a5549ac95ba2840c51ea210
|
7
|
+
data.tar.gz: 3f626b446645c0ee7f0f82cc97683497d9378ac93b97afc632e62b364e477f13b5af9ca33041088262055389274a5de14fdd47f5df7e47789f64d5ef60a20b26
|
data/.gitignore
ADDED
data/Gemfile.lock
CHANGED
@@ -1,105 +1,112 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
simple_form_bs5_file_input (0.0.
|
4
|
+
simple_form_bs5_file_input (0.0.5)
|
5
5
|
rails
|
6
6
|
simple_form
|
7
7
|
|
8
8
|
GEM
|
9
9
|
remote: https://rubygems.org/
|
10
10
|
specs:
|
11
|
-
actioncable (
|
12
|
-
actionpack (=
|
13
|
-
activesupport (=
|
11
|
+
actioncable (7.0.3)
|
12
|
+
actionpack (= 7.0.3)
|
13
|
+
activesupport (= 7.0.3)
|
14
14
|
nio4r (~> 2.0)
|
15
15
|
websocket-driver (>= 0.6.1)
|
16
|
-
actionmailbox (
|
17
|
-
actionpack (=
|
18
|
-
activejob (=
|
19
|
-
activerecord (=
|
20
|
-
activestorage (=
|
21
|
-
activesupport (=
|
16
|
+
actionmailbox (7.0.3)
|
17
|
+
actionpack (= 7.0.3)
|
18
|
+
activejob (= 7.0.3)
|
19
|
+
activerecord (= 7.0.3)
|
20
|
+
activestorage (= 7.0.3)
|
21
|
+
activesupport (= 7.0.3)
|
22
22
|
mail (>= 2.7.1)
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
23
|
+
net-imap
|
24
|
+
net-pop
|
25
|
+
net-smtp
|
26
|
+
actionmailer (7.0.3)
|
27
|
+
actionpack (= 7.0.3)
|
28
|
+
actionview (= 7.0.3)
|
29
|
+
activejob (= 7.0.3)
|
30
|
+
activesupport (= 7.0.3)
|
28
31
|
mail (~> 2.5, >= 2.5.4)
|
32
|
+
net-imap
|
33
|
+
net-pop
|
34
|
+
net-smtp
|
29
35
|
rails-dom-testing (~> 2.0)
|
30
|
-
actionpack (
|
31
|
-
actionview (=
|
32
|
-
activesupport (=
|
33
|
-
rack (~> 2.0, >= 2.0
|
36
|
+
actionpack (7.0.3)
|
37
|
+
actionview (= 7.0.3)
|
38
|
+
activesupport (= 7.0.3)
|
39
|
+
rack (~> 2.0, >= 2.2.0)
|
34
40
|
rack-test (>= 0.6.3)
|
35
41
|
rails-dom-testing (~> 2.0)
|
36
42
|
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
37
|
-
actiontext (
|
38
|
-
actionpack (=
|
39
|
-
activerecord (=
|
40
|
-
activestorage (=
|
41
|
-
activesupport (=
|
43
|
+
actiontext (7.0.3)
|
44
|
+
actionpack (= 7.0.3)
|
45
|
+
activerecord (= 7.0.3)
|
46
|
+
activestorage (= 7.0.3)
|
47
|
+
activesupport (= 7.0.3)
|
48
|
+
globalid (>= 0.6.0)
|
42
49
|
nokogiri (>= 1.8.5)
|
43
|
-
actionview (
|
44
|
-
activesupport (=
|
50
|
+
actionview (7.0.3)
|
51
|
+
activesupport (= 7.0.3)
|
45
52
|
builder (~> 3.1)
|
46
53
|
erubi (~> 1.4)
|
47
54
|
rails-dom-testing (~> 2.0)
|
48
55
|
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
49
|
-
activejob (
|
50
|
-
activesupport (=
|
56
|
+
activejob (7.0.3)
|
57
|
+
activesupport (= 7.0.3)
|
51
58
|
globalid (>= 0.3.6)
|
52
|
-
activemodel (
|
53
|
-
activesupport (=
|
54
|
-
activerecord (
|
55
|
-
activemodel (=
|
56
|
-
activesupport (=
|
57
|
-
activestorage (
|
58
|
-
actionpack (=
|
59
|
-
activejob (=
|
60
|
-
activerecord (=
|
61
|
-
activesupport (=
|
62
|
-
marcel (~> 1.0
|
59
|
+
activemodel (7.0.3)
|
60
|
+
activesupport (= 7.0.3)
|
61
|
+
activerecord (7.0.3)
|
62
|
+
activemodel (= 7.0.3)
|
63
|
+
activesupport (= 7.0.3)
|
64
|
+
activestorage (7.0.3)
|
65
|
+
actionpack (= 7.0.3)
|
66
|
+
activejob (= 7.0.3)
|
67
|
+
activerecord (= 7.0.3)
|
68
|
+
activesupport (= 7.0.3)
|
69
|
+
marcel (~> 1.0)
|
63
70
|
mini_mime (>= 1.1.0)
|
64
|
-
activesupport (
|
71
|
+
activesupport (7.0.3)
|
65
72
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
66
73
|
i18n (>= 1.6, < 2)
|
67
74
|
minitest (>= 5.1)
|
68
75
|
tzinfo (~> 2.0)
|
69
|
-
|
70
|
-
autoprefixer-rails (10.3.3.0)
|
76
|
+
autoprefixer-rails (10.4.7.0)
|
71
77
|
execjs (~> 2)
|
72
|
-
bcrypt (3.1.
|
73
|
-
bootsnap (1.
|
74
|
-
msgpack (~> 1.
|
75
|
-
bootstrap (5.1.
|
78
|
+
bcrypt (3.1.18)
|
79
|
+
bootsnap (1.11.1)
|
80
|
+
msgpack (~> 1.2)
|
81
|
+
bootstrap (5.1.3)
|
76
82
|
autoprefixer-rails (>= 9.1.0)
|
77
83
|
popper_js (>= 2.9.3, < 3)
|
78
84
|
sassc-rails (>= 2.0.0)
|
79
85
|
builder (3.2.4)
|
80
|
-
concurrent-ruby (1.1.
|
86
|
+
concurrent-ruby (1.1.10)
|
81
87
|
crass (1.0.6)
|
82
|
-
devise (4.8.
|
88
|
+
devise (4.8.1)
|
83
89
|
bcrypt (~> 3.0)
|
84
90
|
orm_adapter (~> 0.1)
|
85
91
|
railties (>= 4.1.0)
|
86
92
|
responders
|
87
93
|
warden (~> 1.2.3)
|
94
|
+
digest (3.1.0)
|
88
95
|
erubi (1.10.0)
|
89
96
|
execjs (2.8.1)
|
90
|
-
ffi (1.15.
|
91
|
-
globalid (0.
|
97
|
+
ffi (1.15.5)
|
98
|
+
globalid (1.0.0)
|
92
99
|
activesupport (>= 5.0)
|
93
|
-
i18n (1.
|
100
|
+
i18n (1.10.0)
|
94
101
|
concurrent-ruby (~> 1.0)
|
95
|
-
jquery-rails (4.
|
102
|
+
jquery-rails (4.5.0)
|
96
103
|
rails-dom-testing (>= 1, < 3)
|
97
104
|
railties (>= 4.2.0)
|
98
105
|
thor (>= 0.14, < 2.0)
|
99
|
-
listen (3.7.
|
106
|
+
listen (3.7.1)
|
100
107
|
rb-fsevent (~> 0.10, >= 0.10.3)
|
101
108
|
rb-inotify (~> 0.9, >= 0.9.10)
|
102
|
-
loofah (2.
|
109
|
+
loofah (2.18.0)
|
103
110
|
crass (~> 1.0.2)
|
104
111
|
nokogiri (>= 1.5.9)
|
105
112
|
mail (2.7.1)
|
@@ -107,48 +114,62 @@ GEM
|
|
107
114
|
marcel (1.0.2)
|
108
115
|
method_source (1.0.0)
|
109
116
|
mini_mime (1.1.2)
|
110
|
-
mini_portile2 (2.
|
111
|
-
minitest (5.
|
112
|
-
msgpack (1.
|
117
|
+
mini_portile2 (2.8.0)
|
118
|
+
minitest (5.15.0)
|
119
|
+
msgpack (1.5.2)
|
120
|
+
net-imap (0.2.3)
|
121
|
+
digest
|
122
|
+
net-protocol
|
123
|
+
strscan
|
124
|
+
net-pop (0.1.1)
|
125
|
+
digest
|
126
|
+
net-protocol
|
127
|
+
timeout
|
128
|
+
net-protocol (0.1.3)
|
129
|
+
timeout
|
130
|
+
net-smtp (0.3.1)
|
131
|
+
digest
|
132
|
+
net-protocol
|
133
|
+
timeout
|
113
134
|
nio4r (2.5.8)
|
114
|
-
nokogiri (1.
|
115
|
-
mini_portile2 (~> 2.
|
135
|
+
nokogiri (1.13.6)
|
136
|
+
mini_portile2 (~> 2.8.0)
|
116
137
|
racc (~> 1.4)
|
117
138
|
orm_adapter (0.5.0)
|
118
|
-
pg (1.
|
139
|
+
pg (1.3.5)
|
119
140
|
popper_js (2.9.3)
|
120
|
-
racc (1.
|
121
|
-
rack (2.2.3)
|
141
|
+
racc (1.6.0)
|
142
|
+
rack (2.2.3.1)
|
122
143
|
rack-test (1.1.0)
|
123
144
|
rack (>= 1.0, < 3)
|
124
|
-
rails (
|
125
|
-
actioncable (=
|
126
|
-
actionmailbox (=
|
127
|
-
actionmailer (=
|
128
|
-
actionpack (=
|
129
|
-
actiontext (=
|
130
|
-
actionview (=
|
131
|
-
activejob (=
|
132
|
-
activemodel (=
|
133
|
-
activerecord (=
|
134
|
-
activestorage (=
|
135
|
-
activesupport (=
|
145
|
+
rails (7.0.3)
|
146
|
+
actioncable (= 7.0.3)
|
147
|
+
actionmailbox (= 7.0.3)
|
148
|
+
actionmailer (= 7.0.3)
|
149
|
+
actionpack (= 7.0.3)
|
150
|
+
actiontext (= 7.0.3)
|
151
|
+
actionview (= 7.0.3)
|
152
|
+
activejob (= 7.0.3)
|
153
|
+
activemodel (= 7.0.3)
|
154
|
+
activerecord (= 7.0.3)
|
155
|
+
activestorage (= 7.0.3)
|
156
|
+
activesupport (= 7.0.3)
|
136
157
|
bundler (>= 1.15.0)
|
137
|
-
railties (=
|
138
|
-
sprockets-rails (>= 2.0.0)
|
158
|
+
railties (= 7.0.3)
|
139
159
|
rails-dom-testing (2.0.3)
|
140
160
|
activesupport (>= 4.2.0)
|
141
161
|
nokogiri (>= 1.6)
|
142
162
|
rails-html-sanitizer (1.4.2)
|
143
163
|
loofah (~> 2.3)
|
144
|
-
railties (
|
145
|
-
actionpack (=
|
146
|
-
activesupport (=
|
164
|
+
railties (7.0.3)
|
165
|
+
actionpack (= 7.0.3)
|
166
|
+
activesupport (= 7.0.3)
|
147
167
|
method_source
|
148
|
-
rake (>=
|
168
|
+
rake (>= 12.2)
|
149
169
|
thor (~> 1.0)
|
170
|
+
zeitwerk (~> 2.5)
|
150
171
|
rake (13.0.6)
|
151
|
-
rb-fsevent (0.11.
|
172
|
+
rb-fsevent (0.11.1)
|
152
173
|
rb-inotify (0.10.1)
|
153
174
|
ffi (~> 1.0)
|
154
175
|
responders (3.0.1)
|
@@ -165,16 +186,18 @@ GEM
|
|
165
186
|
simple_form (5.1.0)
|
166
187
|
actionpack (>= 5.2)
|
167
188
|
activemodel (>= 5.2)
|
168
|
-
sprockets (4.0.
|
189
|
+
sprockets (4.0.3)
|
169
190
|
concurrent-ruby (~> 1.0)
|
170
191
|
rack (> 1, < 3)
|
171
|
-
sprockets-rails (3.
|
172
|
-
actionpack (>=
|
173
|
-
activesupport (>=
|
192
|
+
sprockets-rails (3.4.2)
|
193
|
+
actionpack (>= 5.2)
|
194
|
+
activesupport (>= 5.2)
|
174
195
|
sprockets (>= 3.0.0)
|
175
196
|
sqlite3 (1.4.2)
|
176
|
-
|
197
|
+
strscan (3.0.3)
|
198
|
+
thor (1.2.1)
|
177
199
|
tilt (2.0.10)
|
200
|
+
timeout (0.3.0)
|
178
201
|
tzinfo (2.0.4)
|
179
202
|
concurrent-ruby (~> 1.0)
|
180
203
|
warden (1.2.9)
|
@@ -182,7 +205,7 @@ GEM
|
|
182
205
|
websocket-driver (0.7.5)
|
183
206
|
websocket-extensions (>= 0.1.0)
|
184
207
|
websocket-extensions (0.1.5)
|
185
|
-
zeitwerk (2.4
|
208
|
+
zeitwerk (2.5.4)
|
186
209
|
|
187
210
|
PLATFORMS
|
188
211
|
ruby
|
data/README.md
CHANGED
@@ -125,6 +125,15 @@ and include the css in your application.sass file:
|
|
125
125
|
@import 'cropperjs/dist/cropper'
|
126
126
|
```
|
127
127
|
|
128
|
+
In your `config/application.yml`, to support `+repage`, you have to add `+` method in supported operations.
|
129
|
+
```ruby
|
130
|
+
module MyApp
|
131
|
+
class Application < Rails::Application
|
132
|
+
# ...
|
133
|
+
config.active_storage.supported_image_processing_methods = ["+"]
|
134
|
+
end
|
135
|
+
end
|
136
|
+
```
|
128
137
|
|
129
138
|
## I18n
|
130
139
|
|
@@ -122,9 +122,10 @@ class SingleDeletableFileInput < SimpleForm::Inputs::Base
|
|
122
122
|
end
|
123
123
|
|
124
124
|
def preview_image_tag
|
125
|
-
|
126
|
-
|
127
|
-
|
125
|
+
return unless should_display_file? || file_attachment&.variable?
|
126
|
+
variant = file_attachment.variant(resize: "#{preview_image_width}x")
|
127
|
+
path = url_helpers.polymorphic_url variant, only_path: true
|
128
|
+
image_tag path, class: 'img-fluid img-thumbnail', width: preview_image_width
|
128
129
|
end
|
129
130
|
|
130
131
|
def default_preview_image_width
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simple_form_bs5_file_input
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pierre-andré Boissinot
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-05-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -73,6 +73,7 @@ extensions: []
|
|
73
73
|
extra_rdoc_files: []
|
74
74
|
files:
|
75
75
|
- ".eslintrc.yml"
|
76
|
+
- ".gitignore"
|
76
77
|
- ".sass-lint.yml"
|
77
78
|
- Gemfile
|
78
79
|
- Gemfile.lock
|
@@ -96,7 +97,7 @@ homepage: https://github.com/noesya/simple_form_bs5_file_input
|
|
96
97
|
licenses:
|
97
98
|
- MIT
|
98
99
|
metadata: {}
|
99
|
-
post_install_message:
|
100
|
+
post_install_message:
|
100
101
|
rdoc_options: []
|
101
102
|
require_paths:
|
102
103
|
- lib
|
@@ -111,8 +112,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
111
112
|
- !ruby/object:Gem::Version
|
112
113
|
version: '0'
|
113
114
|
requirements: []
|
114
|
-
rubygems_version: 3.1.
|
115
|
-
signing_key:
|
115
|
+
rubygems_version: 3.1.6
|
116
|
+
signing_key:
|
116
117
|
specification_version: 4
|
117
118
|
summary: Simple Form BS5 File Input
|
118
119
|
test_files: []
|