bizside 2.2.0 → 2.2.2

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: 684b653ee4921f968ac5419615dbd04e4ec314581a8942c0a7626711833247c5
4
- data.tar.gz: c740c936e8027d969db49e66f63d75725cb10515f4a526e1631bd6b489af47d8
3
+ metadata.gz: 49502df4872c3de14b3ad2024d7371dbeec9c4762b2b9e63b36d8ee7892fbdd0
4
+ data.tar.gz: 1389bdd6a7bffe5f46ead6fec1a6bfe3c9d750450c1f9b2d3108e09db8420597
5
5
  SHA512:
6
- metadata.gz: 48bd0994fce119c1e5681d242b095dab1cf5d812bcebb18ef28ebb89c3af66b6295bddb5c571240b1065443e7711f453119ace5988aa05921ec2a910b9066871
7
- data.tar.gz: b2467222740be9070d261e61a30dac64ec44920617fc2dc49620c45a5e020b9d93e92f1e8b5b369484c1f64859237799c0918322cd2266e2de93df638660a515
6
+ metadata.gz: ebabb7d63d49861032dfb0f714775fe408d6b0eae43509255f67ad4778b7011ef59b6428bd25e82534f59de651c0322c7474c79b4530c218a20ff74c28a05468
7
+ data.tar.gz: 42b12132c4a9afdcc748e1276fe9409f23fb4dd287987d135155375542b2092b7022fd1b8c9261e1f32870fcfffd2586effc7a88d43b46d5e25a39917b87097e
@@ -1,3 +1,3 @@
1
1
  module Bizside
2
- VERSION = '2.2.0'
2
+ VERSION = '2.2.2'
3
3
  end
@@ -16,7 +16,7 @@ class IpAddressValidator < ActiveModel::EachValidator
16
16
  raise unless IPAddress::valid_ipv4?(value)
17
17
  end
18
18
  rescue
19
- record.errors[attribute] << (options[:message] || "はIPアドレスとして正しくありません。")
19
+ record.errors.add(attribute, options[:message] || "はIPアドレスとして正しくありません。")
20
20
  end
21
21
  end
22
22
  end
@@ -14,7 +14,7 @@ class TelValidator < ActiveModel::EachValidator
14
14
  return if value.nil? or value.empty?
15
15
 
16
16
  unless validate_tel(record, value)
17
- record.errors[attribute] << I18n.t('errors.messages.invalid')
17
+ record.errors.add(attribute, I18n.t('errors.messages.invalid'))
18
18
  end
19
19
  end
20
20
 
@@ -13,17 +13,17 @@ class UrlValidator < ActiveModel::EachValidator
13
13
  begin
14
14
  URI.parse(value)
15
15
  rescue URI::InvalidURIError
16
- record.errors[attribute] << (options[:message] || "はURLとして正しくありません。")
16
+ record.errors.add(attribute, options[:message] || "はURLとして正しくありません。")
17
17
  return
18
18
  end
19
19
 
20
20
  if @with_schema
21
21
  unless value.start_with?('http://') or value.start_with?('https://')
22
- record.errors[attribute] << (options[:message] || "は http:// または https:// から始めてください。")
22
+ record.errors.add(attribute, options[:message] || "は http:// または https:// から始めてください。")
23
23
  end
24
24
  else
25
25
  if value.start_with?('http://') or value.start_with?('https://')
26
- record.errors[attribute] << (options[:message] || "は http:// または https:// を含めないでください。")
26
+ record.errors.add(attribute, options[:message] || "は http:// または https:// を含めないでください。")
27
27
  end
28
28
  end
29
29
  end
@@ -12,8 +12,7 @@ class ZipValidator < ActiveModel::EachValidator
12
12
  return if (zip1.nil? or zip1.empty?) and (zip2.nil? or zip2.empty?)
13
13
 
14
14
  unless validate_zip(zip1, zip2)
15
- record.errors[attribute] << I18n.t('errors.messages.zip')
16
- return
15
+ record.errors.add(attribute, I18n.t('errors.messages.zip'))
17
16
  end
18
17
  end
19
18
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bizside
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.0
4
+ version: 2.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - bizside-developers
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-12-07 00:00:00.000000000 Z
11
+ date: 2022-12-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -140,14 +140,14 @@ dependencies:
140
140
  requirements:
141
141
  - - "~>"
142
142
  - !ruby/object:Gem::Version
143
- version: 0.3.10
143
+ version: '0.3'
144
144
  type: :runtime
145
145
  prerelease: false
146
146
  version_requirements: !ruby/object:Gem::Requirement
147
147
  requirements:
148
148
  - - "~>"
149
149
  - !ruby/object:Gem::Version
150
- version: 0.3.10
150
+ version: '0.3'
151
151
  - !ruby/object:Gem::Dependency
152
152
  name: mime-types
153
153
  requirement: !ruby/object:Gem::Requirement