simple_form 5.0.0 → 5.0.1

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: a1bfd4d5f14c750caf9e2fa6287033c0331473215737a96b4bcece8e6f84a7a9
4
- data.tar.gz: 9c09b014e449f5b8823c062092b864e538c638fd418d782919a9c0a3cd50df78
3
+ metadata.gz: 33ed74564d4101bac4d57185cb4f6353efd54710777b7b62164238a4d3df1157
4
+ data.tar.gz: 524a1c33d2f856eec0be831200a57bde6c9823ac05b3e34bdb12daf23b6b25b0
5
5
  SHA512:
6
- metadata.gz: 620056c8b34f6f93229b2ee0771adb0aa7d267fcc22b9d94c214f62287061930e9b0e35a648f47a890452cb8098bc57643a1dce7bbed3df3c2058546b58c5090
7
- data.tar.gz: 4fa4e5a106b9065405fbba77b8a84ed99e86d84ea4a4435d0a459ee0196a020afbec0ec62fcd2c79f8885d771e48700409ae055ea4858d15b2b5ddd9c3fb5168
6
+ metadata.gz: 26391a5a691422cf7956107e39273142e63fa3a4804f26e76fb722d70dbc868e1090fa04278f652dd1310c3d3a74e4affcea8864219d4bd09dc4aacd567e21f5
7
+ data.tar.gz: 05e515e1eacfe356c45409ad4db258a6da6ed4760050ccf8e44ec4e6ad7430a3f6ace82fd2392452d59fa5b38e1b94356415d0a478b029679abd861d03dd4a94
@@ -1,5 +1,10 @@
1
1
  ## Unreleased
2
2
 
3
+ ## 5.0.1
4
+
5
+ ### Bug fix
6
+ * Replace `_url` with `remote_url` when trying to guess file inputs [@tegon](https://github.com/tegon). This has the side-effect of changing carrierwave's support from `0.2.1` to `0.2.2`.
7
+
3
8
  ## 5.0.0
4
9
 
5
10
  ### Enhancements
data/README.md CHANGED
@@ -1233,6 +1233,8 @@ sending us a pull request.
1233
1233
 
1234
1234
  https://github.com/plataformatec/simple_form/issues
1235
1235
 
1236
+ If you have discovered a security related bug, please do NOT use the GitHub issue tracker. Send an e-mail to opensource@plataformatec.com.br.
1237
+
1236
1238
  ## Maintainers
1237
1239
 
1238
1240
  * José Valim (https://github.com/josevalim)
@@ -580,18 +580,17 @@ module SimpleForm
580
580
  #
581
581
  # Note: This does not support multiple file upload inputs, as this is very application-specific.
582
582
  #
583
- # The order here was choosen based on the popularity of Gems and for commodity - e.g. the method
584
- # with the suffix `_url` is present in three Gems, so it's checked with priority:
583
+ # The order here was chosen based on the popularity of Gems:
585
584
  #
586
585
  # - `#{attribute_name}_attachment` - ActiveStorage >= `5.2` and Refile >= `0.2.0` <= `0.4.0`
587
- # - `#{attribute_name}_url` - Shrine >= `0.9.0`, Refile >= `0.6.0` and CarrierWave >= `0.2.1`
586
+ # - `remote_#{attribute_name}_url` - Refile >= `0.3.0` and CarrierWave >= `0.2.2`
588
587
  # - `#{attribute_name}_attacher` - Refile >= `0.4.0` and Shrine >= `0.9.0`
589
588
  # - `#{attribute_name}_file_name` - Paperclip ~> `2.0` (added for backwards compatibility)
590
589
  #
591
590
  # Returns a Boolean.
592
591
  def file_method?(attribute_name)
593
592
  @object.respond_to?("#{attribute_name}_attachment") ||
594
- @object.respond_to?("#{attribute_name}_url") ||
593
+ @object.respond_to?("remote_#{attribute_name}_url") ||
595
594
  @object.respond_to?("#{attribute_name}_attacher") ||
596
595
  @object.respond_to?("#{attribute_name}_file_name")
597
596
  end
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module SimpleForm
3
- VERSION = "5.0.0".freeze
3
+ VERSION = "5.0.1".freeze
4
4
  end
@@ -244,7 +244,7 @@ class FormBuilderTest < ActionView::TestCase
244
244
  assert_select 'form input#user_with_attachment_avatar.file'
245
245
  end
246
246
 
247
- test 'builder generates file input for Shrine >= 0.9.0, Refile >= 0.6.0 and CarrierWave >= 0.2.1' do
247
+ test 'builder generates file input for Refile >= 0.3.0 and CarrierWave >= 0.2.2' do
248
248
  with_form_for UserWithAttachment.build, :cover
249
249
  assert_select 'form input#user_with_attachment_cover.file'
250
250
  end
@@ -339,7 +339,7 @@ class UserWithAttachment < User
339
339
  OpenStruct.new
340
340
  end
341
341
 
342
- def cover_url
342
+ def remote_cover_url
343
343
  "/uploads/cover.png"
344
344
  end
345
345
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simple_form
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.0.0
4
+ version: 5.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - José Valim
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2019-09-27 00:00:00.000000000 Z
13
+ date: 2019-10-04 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activemodel
@@ -162,15 +162,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
162
162
  requirements:
163
163
  - - ">="
164
164
  - !ruby/object:Gem::Version
165
- version: '0'
165
+ version: 2.3.0
166
166
  required_rubygems_version: !ruby/object:Gem::Requirement
167
167
  requirements:
168
168
  - - ">="
169
169
  - !ruby/object:Gem::Version
170
170
  version: '0'
171
171
  requirements: []
172
- rubyforge_project:
173
- rubygems_version: 2.7.3
172
+ rubygems_version: 3.0.6
174
173
  signing_key:
175
174
  specification_version: 4
176
175
  summary: Forms made easy!