simple_form_bs5_file_input 0.0.6 → 0.1.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: 9b00aca895432b5130fad571666763a588ed10615d80319ae50a797eac704031
4
- data.tar.gz: 167cc07867256c4b1bf2043578b9cd158a4b9356982eef823e54c7cf48e39d3a
3
+ metadata.gz: 4c7f32784a219e9326ff640f76a864f434aa34d8bb2936ccc22e140bfe72f006
4
+ data.tar.gz: 465e669be8ed5a5060f00fae95ae7c571b32722fac8a9c3d57ada79bc805cd30
5
5
  SHA512:
6
- metadata.gz: 06acfb0828ebe32f582004073ca34c8d9a136d7dad56f1da3ea22909fd591d70184a6e05415313bb12c8b7fcffe84033700d14906ccfe06044afe384dce17dcb
7
- data.tar.gz: 6d243229507b7e0fdee145b2c3d156c7d6aaefb3b3628b51d7a4537a5ba76fd113c2bfd4b47222a8e451a08242925966d7639a8b623778aa9f2c28f364b4a70c
6
+ metadata.gz: 50c751cf9d272564b8b20361a5a5cb99cff4cded81ff3588628d401622c8e6629a867b54d2bcea6fb239c7d15c86ad6996902eac41b8fd44d3b5a4ecf19a7e38
7
+ data.tar.gz: 76f2cb77c249430a710c610d2586267e2d066c39f9febad088d830599cba0cdaed7d80a3013e963d653b75ecccb486619030fc2f17e9b4fcc86d9a8f16cb721b
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- simple_form_bs5_file_input (0.0.6)
4
+ simple_form_bs5_file_input (0.1.0)
5
5
  rails
6
6
  simple_form
7
7
 
@@ -91,7 +91,6 @@ GEM
91
91
  railties (>= 4.1.0)
92
92
  responders
93
93
  warden (~> 1.2.3)
94
- digest (3.1.0)
95
94
  erubi (1.10.0)
96
95
  execjs (2.8.1)
97
96
  ffi (1.15.5)
@@ -117,20 +116,14 @@ GEM
117
116
  mini_portile2 (2.8.0)
118
117
  minitest (5.15.0)
119
118
  msgpack (1.5.2)
120
- net-imap (0.2.3)
121
- digest
119
+ net-imap (0.3.1)
122
120
  net-protocol
123
- strscan
124
- net-pop (0.1.1)
125
- digest
121
+ net-pop (0.1.2)
126
122
  net-protocol
127
- timeout
128
123
  net-protocol (0.1.3)
129
124
  timeout
130
- net-smtp (0.3.1)
131
- digest
125
+ net-smtp (0.3.3)
132
126
  net-protocol
133
- timeout
134
127
  nio4r (2.5.8)
135
128
  nokogiri (1.13.6)
136
129
  mini_portile2 (~> 2.8.0)
@@ -194,7 +187,6 @@ GEM
194
187
  activesupport (>= 5.2)
195
188
  sprockets (>= 3.0.0)
196
189
  sqlite3 (1.4.2)
197
- strscan (3.0.3)
198
190
  thor (1.2.1)
199
191
  tilt (2.0.10)
200
192
  timeout (0.3.0)
@@ -36,7 +36,8 @@ window.inputSingleDeletableFile = {
36
36
  $('.js-sdfi-deletable-file__delete-field', $scope).val('');
37
37
  }
38
38
 
39
- if (/^image\/\w+$/.test(file.type) && (hasResize || hasPreview)) {
39
+
40
+ if (/^image\/[a-z+]+$/.test(file.type) && (hasResize || hasPreview)) {
40
41
  reader = new FileReader();
41
42
  reader.readAsDataURL(file);
42
43
  if (hasResize) {
@@ -1,5 +1,5 @@
1
1
  class ActiveRecord::Base
2
- def self.has_one_attached_deletable(name, **options)
2
+ def self.has_one_attached_deletable(name, **options, &block)
3
3
  class_eval do
4
4
  attr_accessor :"#{name}_delete"
5
5
  attr_accessor :"#{name}_infos"
@@ -49,6 +49,6 @@ class ActiveRecord::Base
49
49
  end
50
50
  end
51
51
 
52
- has_one_attached name, **options
52
+ has_one_attached name, **options, &block
53
53
  end
54
54
  end
@@ -1,3 +1,3 @@
1
1
  module SimpleFormBs5FileInput
2
- VERSION = "0.0.6".freeze
2
+ VERSION = "0.1.0".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.6
4
+ version: 0.1.0
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: 2022-05-30 00:00:00.000000000 Z
11
+ date: 2022-11-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -97,7 +97,7 @@ homepage: https://github.com/noesya/simple_form_bs5_file_input
97
97
  licenses:
98
98
  - MIT
99
99
  metadata: {}
100
- post_install_message:
100
+ post_install_message:
101
101
  rdoc_options: []
102
102
  require_paths:
103
103
  - lib
@@ -112,8 +112,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
112
112
  - !ruby/object:Gem::Version
113
113
  version: '0'
114
114
  requirements: []
115
- rubygems_version: 3.1.6
116
- signing_key:
115
+ rubygems_version: 3.1.4
116
+ signing_key:
117
117
  specification_version: 4
118
118
  summary: Simple Form BS5 File Input
119
119
  test_files: []