phony_rails 0.12.5 → 0.12.6

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
  SHA1:
3
- metadata.gz: 35b127b81167348fe916e75a9f18befb03c60c22
4
- data.tar.gz: 948a30d5c8aa1372adcfc02d8bbc6ca336ad8c66
3
+ metadata.gz: dc7f81ffdb5959e4c22fa0d7feb6a99e416f59ce
4
+ data.tar.gz: 78f4fa38183768edb0f8e243adf3568ce7dc8575
5
5
  SHA512:
6
- metadata.gz: dc3f537416f6dc4c49953ef01f6ec945aaf117135d8b4a3cb01d2545073926217ac4fab9402e13e052e73c4c5face5a1f477cbc6c692f40f4edde83ed7c09465
7
- data.tar.gz: 868a145b573c8cc5727c1097f3c33dc0acd57bb70ab3236e8dd247c71a9dc55f373bd6efd42dded3943d2ac315a7cc45ae12938d517490666d7c9a124c626ec2
6
+ metadata.gz: ad8fc41b798a3982615537727a4b82602d834deff2bddb062dfd312fb235a4655acef44109174fcda7cad7c5e90cad22a49f94edd5a57783a91605d83d870014
7
+ data.tar.gz: 886423839ac23455626243dbbaf4ac51daeb6d1fc0bfa3e023536f9225ec359cfd9a420a8979e7e65a0a2da9ddad1555a4d13ceba33f1288d765fd286ab112f3
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- phony_rails (0.12.4)
4
+ phony_rails (0.12.6)
5
5
  activesupport (>= 3.0)
6
6
  countries (~> 0.8, >= 0.8.2)
7
7
  phony (~> 2.12)
@@ -7,8 +7,7 @@
7
7
  def phony_normalized(options = {})
8
8
  raise ArgumentError, "Expected options to be a Hash, got #{options.inspect}" if not options.is_a?(Hash)
9
9
  options = options.dup
10
- normalize_country_code = options.delete(:country_code)
11
- PhonyRails.normalize_number(self, :default_country_code => normalize_country_code.to_s)
10
+ PhonyRails.normalize_number(self, options)
12
11
  end
13
12
 
14
13
  # Add a method to the String class so we can easily format phone numbers.
@@ -1,3 +1,3 @@
1
1
  module PhonyRails
2
- VERSION = "0.12.5"
2
+ VERSION = "0.12.6"
3
3
  end
@@ -166,6 +166,15 @@ describe PhonyRails do
166
166
  it "should normalize without :country_code option" do
167
167
  "010 1231234".phony_normalized.should eql("101231234")
168
168
  end
169
+
170
+ it "should normalize with :add_plus option" do
171
+ "010 1231234".phony_normalized(:country_code => :NL, :add_plus => false).should eql("31101231234")
172
+ end
173
+
174
+ end
175
+
176
+ it "should normalize with :add_plus option" do
177
+ "+31 (0)10 1231234".phony_normalized(:add_plus => false).should eql("31101231234")
169
178
  end
170
179
 
171
180
  it "should normalize a String" do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: phony_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.5
4
+ version: 0.12.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joost Hietbrink
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-30 00:00:00.000000000 Z
11
+ date: 2015-05-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: phony