phony_rails 0.12.5 → 0.12.6
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 +4 -4
- data/Gemfile.lock +1 -1
- data/lib/phony_rails/string_extensions.rb +1 -2
- data/lib/phony_rails/version.rb +1 -1
- data/spec/lib/phony_rails_spec.rb +9 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dc7f81ffdb5959e4c22fa0d7feb6a99e416f59ce
|
4
|
+
data.tar.gz: 78f4fa38183768edb0f8e243adf3568ce7dc8575
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ad8fc41b798a3982615537727a4b82602d834deff2bddb062dfd312fb235a4655acef44109174fcda7cad7c5e90cad22a49f94edd5a57783a91605d83d870014
|
7
|
+
data.tar.gz: 886423839ac23455626243dbbaf4ac51daeb6d1fc0bfa3e023536f9225ec359cfd9a420a8979e7e65a0a2da9ddad1555a4d13ceba33f1288d765fd286ab112f3
|
data/Gemfile.lock
CHANGED
@@ -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
|
-
|
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.
|
data/lib/phony_rails/version.rb
CHANGED
@@ -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.
|
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-
|
11
|
+
date: 2015-05-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: phony
|