bizside 2.2.0 → 2.2.1

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: 85705b907c50726c6c80d22088f91c3413009119db847be089eab32ec73f8659
4
+ data.tar.gz: 1518ed67cb6cccc547823db1dcbe57f921aa7445906b9d07932916a148f09439
5
5
  SHA512:
6
- metadata.gz: 48bd0994fce119c1e5681d242b095dab1cf5d812bcebb18ef28ebb89c3af66b6295bddb5c571240b1065443e7711f453119ace5988aa05921ec2a910b9066871
7
- data.tar.gz: b2467222740be9070d261e61a30dac64ec44920617fc2dc49620c45a5e020b9d93e92f1e8b5b369484c1f64859237799c0918322cd2266e2de93df638660a515
6
+ metadata.gz: '08592ac5b1048768a881c2be96820a7323121bf4656df65a69445bcaf875a673602e6c568baf895d6606790aa2102ada3c377bea6490bce88b4eedae56087839'
7
+ data.tar.gz: bce8b135b2ea68a35ea898a79242b2e9961d967af851f0ec785c1e09a086e48bef5d9befd3cb907a3529058128d5c043516a6757c4d8c8641689741b9a8be024
@@ -1,3 +1,3 @@
1
1
  module Bizside
2
- VERSION = '2.2.0'
2
+ VERSION = '2.2.1'
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.1
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-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport