phony_rails 0.14.10 → 0.14.11

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
- SHA1:
3
- metadata.gz: 383011d77dc615fbacdbf4ebe23f4c89db28122b
4
- data.tar.gz: a123f3f39a984f21216f7f72b5031dda84b84c8c
2
+ SHA256:
3
+ metadata.gz: bb21cdef27d6696f003b5d1b60a5c6df7365845366eb36769ee17b11d809e277
4
+ data.tar.gz: 35e3206fe90042f14332eac06e3e27060ed8cd6fda339863009d55c0f7962291
5
5
  SHA512:
6
- metadata.gz: 47a2c46b310e1b4af1d3a41cc5ababd92d7226dfac7c7f9509f9356774c9e81e8e455213f5d23c9ab91434c9d3143f0916ed90d59e21065040613396583ae163
7
- data.tar.gz: e31193d4001b20da3d9ab6c737754b896d1a3ae8bdc8aa942c2b7766ba17439a2c751891bfb85bdbdfe484e823898ff9b8bef6e7c97d2cc59fe6e01519976fa1
6
+ metadata.gz: 23cee7e1e1d089117a4519c45fd52c456786d92a783f85acc45be269917008b9b50985767fcc630fba544e1a806622e3a37297fad2ed3499a2ab08d5495a36cc
7
+ data.tar.gz: 6badf776d61071abf152dfe03ff90a585bbc1c13ae83c2cabf6d2c93ea76ee7773455ffe0a03c8615a9865b23cff001b3b56018d8a50c6f95d59ce7ab0423fc0
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- phony_rails (0.14.9)
4
+ phony_rails (0.14.11)
5
5
  activesupport (>= 3.0)
6
6
  phony (> 2.15)
7
7
 
data/README.md CHANGED
@@ -133,7 +133,7 @@ validates_plausible_phone :phone_number, without: /\A\+\d+/
133
133
  validates_plausible_phone :phone_number, presence: true, with: /\A\+\d+/
134
134
  ```
135
135
 
136
- the i18n key is `:improbable_phone`. Languages supported by default: de, en, es, fr, it, ja, kh, nl, tr, ua and ru.
136
+ the i18n key is `:improbable_phone`. Languages supported by default: de, en, es, fr, it, ja, kh, ko, nl, tr, ua and ru.
137
137
 
138
138
  You can also validate if a number has the correct country number:
139
139
 
@@ -0,0 +1,4 @@
1
+ ko:
2
+ errors:
3
+ messages:
4
+ improbable_phone: "는 올바른 전화번호가 아닙니다"
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PhonyRails
4
- VERSION = '0.14.10'
4
+ VERSION = '0.14.11'
5
5
  end
@@ -236,6 +236,16 @@ describe PhonyRails do
236
236
  phone = PhonyRails.normalize_number(phone, default_country_code: 'DE')
237
237
  expect(phone).to eq('+12604379123')
238
238
  end
239
+
240
+ it 'should pass Github issue #187' do
241
+ phone1 = '0037253400030'
242
+ phone1 = PhonyRails.normalize_number(phone1, default_country_code: 'EE')
243
+ expect(phone1).to eq('+37253400030')
244
+
245
+ phone2 = '0037275016183'
246
+ phone2 = PhonyRails.normalize_number(phone2, default_country_code: 'EE')
247
+ expect(phone2).to eq('+37275016183')
248
+ end
239
249
  end
240
250
 
241
251
  it 'should not change original String' do
@@ -273,6 +273,14 @@ describe PhonyPlausibleValidator do
273
273
  end
274
274
  end
275
275
 
276
+ it 'should translate the error message in Korean' do
277
+ I18n.with_locale(:ko) do
278
+ @home.phone_number = INVALID_NUMBER
279
+ @home.valid?
280
+ expect(@home.errors.messages).to include(phone_number: ['는 올바른 전화번호가 아닙니다'])
281
+ end
282
+ end
283
+
276
284
  it 'should translate the error message in Ukrainian' do
277
285
  I18n.with_locale(:uk) do
278
286
  @home.phone_number = INVALID_NUMBER
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: phony_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.14.10
4
+ version: 0.14.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joost Hietbrink
@@ -96,6 +96,7 @@ files:
96
96
  - lib/phony_rails/locales/it.yml
97
97
  - lib/phony_rails/locales/ja.yml
98
98
  - lib/phony_rails/locales/km.yml
99
+ - lib/phony_rails/locales/ko.yml
99
100
  - lib/phony_rails/locales/nl.yml
100
101
  - lib/phony_rails/locales/ru.yml
101
102
  - lib/phony_rails/locales/tr.yml
@@ -128,7 +129,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
128
129
  version: '0'
129
130
  requirements: []
130
131
  rubyforge_project:
131
- rubygems_version: 2.5.1
132
+ rubygems_version: 2.7.7
132
133
  signing_key:
133
134
  specification_version: 4
134
135
  summary: This Gem adds useful methods to your Rails app to validate, display and save