simple_form_bs5_file_input 0.0.4 → 0.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d29fda2259cc709bc0c29343872315bf683701079f98f837c83b172dde85b64e
4
- data.tar.gz: 9f2c839c7c9b4d0e74e039264073c06aea2e2d6c6f6acc5b8a89e0ce69f4e8ab
3
+ metadata.gz: ce2c3270b2eca308b30ab139a6c4c8df318b424f625f8c6960689a2a800bc5d0
4
+ data.tar.gz: cd16c846ae93111c0e24b4679300cd01c3fc8dd57b392ac311841f7615f71bd4
5
5
  SHA512:
6
- metadata.gz: d43df612085b487e3c0a6a6507a60212e8b72eed6f0ca91c02213551b3021f369158a04472452b60539aab08e73643abd614b180f0f225c8aa503740e2da9f5b
7
- data.tar.gz: '08da174641d2797e0e96cd56e1c0f1b2fe79b666bfebddfedb3128702ad72ae56854056e981e558f0152fefe568d8b8ad2ba2a5971b441ff4f544e2aab103b84'
6
+ metadata.gz: 29bf87c40cc7d39872d0f0849e5b205dc50853545cbd4bde6b601ae6cae9b874391cc94362e2faaadc509090764a4b4b7a98a73d2a5549ac95ba2840c51ea210
7
+ data.tar.gz: 3f626b446645c0ee7f0f82cc97683497d9378ac93b97afc632e62b364e477f13b5af9ca33041088262055389274a5de14fdd47f5df7e47789f64d5ef60a20b26
data/.gitignore ADDED
@@ -0,0 +1,2 @@
1
+ # Ignore pkg files
2
+ /pkg
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)
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 (6.1.4.1)
12
- actionpack (= 6.1.4.1)
13
- activesupport (= 6.1.4.1)
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 (6.1.4.1)
17
- actionpack (= 6.1.4.1)
18
- activejob (= 6.1.4.1)
19
- activerecord (= 6.1.4.1)
20
- activestorage (= 6.1.4.1)
21
- activesupport (= 6.1.4.1)
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
- actionmailer (6.1.4.1)
24
- actionpack (= 6.1.4.1)
25
- actionview (= 6.1.4.1)
26
- activejob (= 6.1.4.1)
27
- activesupport (= 6.1.4.1)
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 (6.1.4.1)
31
- actionview (= 6.1.4.1)
32
- activesupport (= 6.1.4.1)
33
- rack (~> 2.0, >= 2.0.9)
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 (6.1.4.1)
38
- actionpack (= 6.1.4.1)
39
- activerecord (= 6.1.4.1)
40
- activestorage (= 6.1.4.1)
41
- activesupport (= 6.1.4.1)
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 (6.1.4.1)
44
- activesupport (= 6.1.4.1)
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 (6.1.4.1)
50
- activesupport (= 6.1.4.1)
56
+ activejob (7.0.3)
57
+ activesupport (= 7.0.3)
51
58
  globalid (>= 0.3.6)
52
- activemodel (6.1.4.1)
53
- activesupport (= 6.1.4.1)
54
- activerecord (6.1.4.1)
55
- activemodel (= 6.1.4.1)
56
- activesupport (= 6.1.4.1)
57
- activestorage (6.1.4.1)
58
- actionpack (= 6.1.4.1)
59
- activejob (= 6.1.4.1)
60
- activerecord (= 6.1.4.1)
61
- activesupport (= 6.1.4.1)
62
- marcel (~> 1.0.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 (6.1.4.1)
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
- zeitwerk (~> 2.3)
70
- autoprefixer-rails (10.3.3.0)
76
+ autoprefixer-rails (10.4.7.0)
71
77
  execjs (~> 2)
72
- bcrypt (3.1.16)
73
- bootsnap (1.9.1)
74
- msgpack (~> 1.0)
75
- bootstrap (5.1.0)
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.9)
86
+ concurrent-ruby (1.1.10)
81
87
  crass (1.0.6)
82
- devise (4.8.0)
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.4)
91
- globalid (0.5.2)
97
+ ffi (1.15.5)
98
+ globalid (1.0.0)
92
99
  activesupport (>= 5.0)
93
- i18n (1.8.10)
100
+ i18n (1.10.0)
94
101
  concurrent-ruby (~> 1.0)
95
- jquery-rails (4.4.0)
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.0)
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.12.0)
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.6.1)
111
- minitest (5.14.4)
112
- msgpack (1.4.2)
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.12.5)
115
- mini_portile2 (~> 2.6.1)
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.2.3)
139
+ pg (1.3.5)
119
140
  popper_js (2.9.3)
120
- racc (1.5.2)
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 (6.1.4.1)
125
- actioncable (= 6.1.4.1)
126
- actionmailbox (= 6.1.4.1)
127
- actionmailer (= 6.1.4.1)
128
- actionpack (= 6.1.4.1)
129
- actiontext (= 6.1.4.1)
130
- actionview (= 6.1.4.1)
131
- activejob (= 6.1.4.1)
132
- activemodel (= 6.1.4.1)
133
- activerecord (= 6.1.4.1)
134
- activestorage (= 6.1.4.1)
135
- activesupport (= 6.1.4.1)
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 (= 6.1.4.1)
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 (6.1.4.1)
145
- actionpack (= 6.1.4.1)
146
- activesupport (= 6.1.4.1)
164
+ railties (7.0.3)
165
+ actionpack (= 7.0.3)
166
+ activesupport (= 7.0.3)
147
167
  method_source
148
- rake (>= 0.13)
168
+ rake (>= 12.2)
149
169
  thor (~> 1.0)
170
+ zeitwerk (~> 2.5)
150
171
  rake (13.0.6)
151
- rb-fsevent (0.11.0)
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.2)
189
+ sprockets (4.0.3)
169
190
  concurrent-ruby (~> 1.0)
170
191
  rack (> 1, < 3)
171
- sprockets-rails (3.2.2)
172
- actionpack (>= 4.0)
173
- activesupport (>= 4.0)
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
- thor (1.1.0)
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.2)
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
- if should_display_file? && file_attachment&.variable?
126
- image_tag(file_attachment.variant(resize: "#{preview_image_width}x").processed.url, class: 'img-fluid img-thumbnail', width: preview_image_width)
127
- end
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
@@ -1,3 +1,3 @@
1
1
  module SimpleFormBs5FileInput
2
- VERSION = "0.0.4".freeze
2
+ VERSION = "0.0.5".freeze
3
3
  end
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
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: 2021-11-04 00:00:00.000000000 Z
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.4
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: []