simple_form_bs5_file_input 0.0.3 → 0.0.4

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: a3644590aace1052e9505f4784b7146dbde206dc2297a9b9336eada0eb954fac
4
- data.tar.gz: 803d6a3b7a7ef3d2165015d5a80600a09fcd940276e86814407b400306d7d555
3
+ metadata.gz: d29fda2259cc709bc0c29343872315bf683701079f98f837c83b172dde85b64e
4
+ data.tar.gz: 9f2c839c7c9b4d0e74e039264073c06aea2e2d6c6f6acc5b8a89e0ce69f4e8ab
5
5
  SHA512:
6
- metadata.gz: 1dd7c7a363de204dcdcd6cd50810403e796cd5a35bc03e4c827d516e4a719940941bc0f194e42f4a3457cfb34694f5f1391ba084ebbe5fc4d531d9e874d413e8
7
- data.tar.gz: 6e98d851b926ec6cd7f60dff3d79bb15a460ecb4e3335da23f8c15e6e9d3a180f0518cce22a3aa2a0f9717ff0e692441debec8a80bff56fb6b9f3cf126d5a505
6
+ metadata.gz: d43df612085b487e3c0a6a6507a60212e8b72eed6f0ca91c02213551b3021f369158a04472452b60539aab08e73643abd614b180f0f225c8aa503740e2da9f5b
7
+ data.tar.gz: '08da174641d2797e0e96cd56e1c0f1b2fe79b666bfebddfedb3128702ad72ae56854056e981e558f0152fefe568d8b8ad2ba2a5971b441ff4f544e2aab103b84'
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.3)
4
+ simple_form_bs5_file_input (0.0.4)
5
5
  rails
6
6
  simple_form
7
7
 
data/README.md CHANGED
@@ -104,21 +104,23 @@ Direct upload will send the file BEFORE the page submission. You will get a prog
104
104
  ## Resize
105
105
 
106
106
  You can add an option to the field to resize the image after upload (of course it has to be an image!).
107
+
107
108
  Add `resize: true` to your field.
108
- You can also specify a ratio for the cropper. For example `resize: 1` will lock to aspect ratio to a square. Beware of the float constraints in rails. If you want a 4/3 ratio use `resize: 4/3.to_f` as 4/3 gives 1 in rails.
109
+
110
+ You can also specify a ratio for the cropper. For example `resize: 1` will lock the aspect ratio to a square. Beware of the float constraints in rails. If you want a 4/3 ratio use `resize: 4/3.to_f` as 4/3 otherwise gives 1.
109
111
 
110
112
 
111
- The resizer is based on [CropperJS](https://github.com/fengyuanchen/cropperjs) so you have to add cropper and jquery-cropper to your dependencies.
113
+ The resizer is based on [CropperJS](https://github.com/fengyuanchen/cropperjs) so you have to add cropper and jquery-cropper to your dependencies:
112
114
  ```
113
115
  yarn add cropperjs
114
116
  yarn add jquery-cropper
115
117
  ```
116
- then include the js files in your application.js file
118
+ then include the js files in your application.js file:
117
119
  ```
118
120
  //= require cropperjs/dist/cropper
119
121
  //= require jquery-cropper/dist/jquery-cropper
120
122
  ```
121
- and include the css in your application.sass file
123
+ and include the css in your application.sass file:
122
124
  ```
123
125
  @import 'cropperjs/dist/cropper'
124
126
  ```
@@ -1,5 +1,5 @@
1
1
  class ActiveRecord::Base
2
- def self.has_one_attached_deletable(name, dependent: :purge_later)
2
+ def self.has_one_attached_deletable(name, **options)
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
52
+ has_one_attached name, **options
53
53
  end
54
54
  end
@@ -1,3 +1,3 @@
1
1
  module SimpleFormBs5FileInput
2
- VERSION = "0.0.3".freeze
2
+ VERSION = "0.0.4".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.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pierre-andré Boissinot
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-10-15 00:00:00.000000000 Z
11
+ date: 2021-11-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -90,6 +90,7 @@ files:
90
90
  - lib/simple_form_bs5_file_input/version.rb
91
91
  - pkg/simple_form_bs5_file_input-0.0.1.gem
92
92
  - pkg/simple_form_bs5_file_input-0.0.2.gem
93
+ - pkg/simple_form_bs5_file_input-0.0.3.gem
93
94
  - simple_form_bs5_file_input.gemspec
94
95
  homepage: https://github.com/noesya/simple_form_bs5_file_input
95
96
  licenses: