simple_form 5.3.0 → 5.3.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: 3b89606503cd2fc01363418e51dd00630a770820b8482f35aa85ddba1a653cc5
4
- data.tar.gz: 1a078f896c0e4bd41b0462a5b591fcc04038dbb0dd64c65c61b5584450a9b569
3
+ metadata.gz: cfdcacda4f77b45f0a314651ceebcc8b55b7ad04292c947df7b8f7058b283b91
4
+ data.tar.gz: 0cf232b39ab76dc175f729024d35f55551c10a1bb7d391d9feeb5b2252f0fc48
5
5
  SHA512:
6
- metadata.gz: 17a0ecd1d326536cdb1e4e1291bcfbad43fac2d8e4e0895ad0619515e9f951c4618da9b4ad8c568bcd9b702f94227f58b3967a14eb9b7adc3343ca07cfb8f451
7
- data.tar.gz: 810793e24f74792775bbe3e5bba0b157f59673879b8c6c360c4af15ba2d91fc0d293eace5556aba5b32e7a99f01d7e3e96099046401e802fbba3a1b2bcddcaf5
6
+ metadata.gz: c567585213251a013e64188da22598a980451d68fc96d8b9a7eb8f937b2b8d7fef6659d9213133728070c11d9e1ab8f647960cba60a9516b0805d6effcf07dac
7
+ data.tar.gz: 6912ab15c194e3090b27b9331fd8f3db7402ba64e286c8165b816aa8ee7c7fea4c285b1e8df09ccfb2daaeb51393156df6369df6b4c52b13548c00e498c53494
data/CHANGELOG.md CHANGED
@@ -1,3 +1,13 @@
1
+ ## Unreleased
2
+
3
+
4
+
5
+ ## 5.3.1
6
+
7
+ * Revert "Speed up input mapping lookup by avoiding rescuing exceptions" from v5.3.0, it caused a regression on dev/test environments with custom inputs.
8
+ * Try a slightly different approach to input lookups, without relying on regexp, to see if that helps with performance as originally intended.
9
+ * Add support to Ruby 3.3. (no changes required.)
10
+
1
11
  ## 5.3.0
2
12
 
3
13
  * Add support for Rails 7.1. (no meaningful changes required.)
data/MIT-LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2020-2023 Rafael França, Carlos Antônio da Silva
1
+ Copyright (c) 2020-2024 Rafael França, Carlos Antônio da Silva
2
2
  Copyright (c) 2009-2019 Plataformatec
3
3
 
4
4
  Permission is hereby granted, free of charge, to any person obtaining
data/README.md CHANGED
@@ -1293,6 +1293,6 @@ If you have discovered a security related bug, please do NOT use the GitHub issu
1293
1293
 
1294
1294
  ## License
1295
1295
 
1296
- MIT License. Copyright 2020-2023 Rafael França, Carlos Antônio da Silva. Copyright 2009-2019 Plataformatec.
1296
+ MIT License. Copyright 2020-2024 Rafael França, Carlos Antônio da Silva. Copyright 2009-2019 Plataformatec.
1297
1297
 
1298
1298
  The Simple Form logo is licensed under [Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License](https://creativecommons.org/licenses/by-nc-nd/4.0/).
@@ -11,7 +11,7 @@ module SimpleForm
11
11
  end
12
12
 
13
13
  def has_errors?
14
- object_with_errors? || object.nil? && has_custom_error?
14
+ object_with_errors? || !object && has_custom_error?
15
15
  end
16
16
 
17
17
  def has_value?
@@ -673,7 +673,11 @@ module SimpleForm
673
673
  def attempt_mapping(mapping, at)
674
674
  return if SimpleForm.inputs_discovery == false && at == Object
675
675
 
676
- at.const_get(mapping) if at.const_defined?(mapping)
676
+ begin
677
+ at.const_get(mapping)
678
+ rescue NameError => e
679
+ raise unless e.message.include?(mapping)
680
+ end
677
681
  end
678
682
 
679
683
  def attempt_mapping_with_custom_namespace(input_name)
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module SimpleForm
3
- VERSION = "5.3.0".freeze
3
+ VERSION = "5.3.1".freeze
4
4
  end
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.3.0
4
+ version: 5.3.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: 2023-10-11 00:00:00.000000000 Z
13
+ date: 2024-05-24 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activemodel
@@ -137,7 +137,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
137
137
  - !ruby/object:Gem::Version
138
138
  version: '0'
139
139
  requirements: []
140
- rubygems_version: 3.4.10
140
+ rubygems_version: 3.3.27
141
141
  signing_key:
142
142
  specification_version: 4
143
143
  summary: Forms made easy!