phony 2.15.0 → 2.20.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (67) hide show
  1. checksums.yaml +5 -5
  2. data/README.textile +35 -7
  3. data/lib/phony/config.rb +91 -0
  4. data/lib/phony/countries/argentina.rb +355 -0
  5. data/lib/phony/countries/austria.rb +34 -24
  6. data/lib/phony/countries/bangladesh.rb +2 -0
  7. data/lib/phony/countries/belarus.rb +2 -0
  8. data/lib/phony/countries/brazil.rb +6 -4
  9. data/lib/phony/countries/cambodia.rb +6 -4
  10. data/lib/phony/countries/china.rb +7 -2
  11. data/lib/phony/countries/croatia.rb +13 -16
  12. data/lib/phony/countries/georgia.rb +6 -4
  13. data/lib/phony/countries/germany.rb +5 -2
  14. data/lib/phony/countries/guinea.rb +8 -5
  15. data/lib/phony/countries/india.rb +2 -0
  16. data/lib/phony/countries/indonesia.rb +8 -3
  17. data/lib/phony/countries/ireland.rb +27 -23
  18. data/lib/phony/countries/italy.rb +30 -17
  19. data/lib/phony/countries/japan.rb +61 -8
  20. data/lib/phony/countries/kyrgyzstan.rb +2 -0
  21. data/lib/phony/countries/latvia.rb +2 -0
  22. data/lib/phony/countries/libya.rb +3 -1
  23. data/lib/phony/countries/malaysia.rb +22 -2
  24. data/lib/phony/countries/moldova.rb +2 -0
  25. data/lib/phony/countries/montenegro.rb +2 -0
  26. data/lib/phony/countries/myanmar.rb +2 -0
  27. data/lib/phony/countries/namibia.rb +2 -0
  28. data/lib/phony/countries/nepal.rb +2 -0
  29. data/lib/phony/countries/netherlands.rb +5 -1
  30. data/lib/phony/countries/pakistan.rb +2 -0
  31. data/lib/phony/countries/paraguay.rb +2 -0
  32. data/lib/phony/countries/russia_kazakhstan_abkhasia_south_ossetia.rb +24 -14
  33. data/lib/phony/countries/saudi_arabia.rb +40 -0
  34. data/lib/phony/countries/serbia.rb +10 -4
  35. data/lib/phony/countries/somalia.rb +5 -1
  36. data/lib/phony/countries/south_korea.rb +16 -9
  37. data/lib/phony/countries/sweden.rb +53 -38
  38. data/lib/phony/countries/taiwan.rb +22 -46
  39. data/lib/phony/countries/tajikistan.rb +2 -0
  40. data/lib/phony/countries/turkmenistan.rb +2 -0
  41. data/lib/phony/countries/ukraine.rb +5 -2
  42. data/lib/phony/countries/united_kingdom.rb +5 -2
  43. data/lib/phony/countries/uruguay.rb +2 -0
  44. data/lib/phony/countries/vietnam.rb +94 -92
  45. data/lib/phony/countries/zimbabwe.rb +2 -0
  46. data/lib/phony/countries.rb +210 -98
  47. data/lib/phony/country.rb +15 -3
  48. data/lib/phony/country_codes.rb +17 -4
  49. data/lib/phony/dsl.rb +5 -3
  50. data/lib/phony/local_splitters/fixed.rb +2 -0
  51. data/lib/phony/national_code.rb +1 -1
  52. data/lib/phony/national_splitters/none.rb +1 -3
  53. data/lib/phony/trunk_code.rb +5 -4
  54. data/lib/phony/vanity.rb +1 -1
  55. data/lib/phony.rb +94 -59
  56. data/spec/functional/config_spec.rb +44 -0
  57. data/spec/functional/plausibility_spec.rb +373 -35
  58. data/spec/lib/phony/countries_spec.rb +295 -63
  59. data/spec/lib/phony/country_codes_spec.rb +106 -33
  60. data/spec/lib/phony/country_spec.rb +54 -15
  61. data/spec/lib/phony/dsl_spec.rb +2 -2
  62. data/spec/lib/phony/local_splitters/regex_spec.rb +12 -5
  63. data/spec/lib/phony/national_splitters/default_spec.rb +1 -1
  64. data/spec/lib/phony/trunk_code_spec.rb +85 -0
  65. data/spec/lib/phony/vanity_spec.rb +30 -0
  66. data/spec/lib/phony_spec.rb +70 -0
  67. metadata +27 -17
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: phony
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.15.0
4
+ version: 2.20.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Florian Hanke
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-09-05 00:00:00.000000000 Z
11
+ date: 2022-10-03 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: 'Fast international phone number (E164 standard) normalizing, splitting
14
14
  and formatting. Lots of formatting options: International (+.., 00..), national
@@ -21,7 +21,9 @@ extra_rdoc_files:
21
21
  files:
22
22
  - README.textile
23
23
  - lib/phony.rb
24
+ - lib/phony/config.rb
24
25
  - lib/phony/countries.rb
26
+ - lib/phony/countries/argentina.rb
25
27
  - lib/phony/countries/austria.rb
26
28
  - lib/phony/countries/bangladesh.rb
27
29
  - lib/phony/countries/belarus.rb
@@ -50,6 +52,7 @@ files:
50
52
  - lib/phony/countries/pakistan.rb
51
53
  - lib/phony/countries/paraguay.rb
52
54
  - lib/phony/countries/russia_kazakhstan_abkhasia_south_ossetia.rb
55
+ - lib/phony/countries/saudi_arabia.rb
53
56
  - lib/phony/countries/serbia.rb
54
57
  - lib/phony/countries/somalia.rb
55
58
  - lib/phony/countries/south_korea.rb
@@ -76,6 +79,7 @@ files:
76
79
  - lib/phony/national_splitters/variable.rb
77
80
  - lib/phony/trunk_code.rb
78
81
  - lib/phony/vanity.rb
82
+ - spec/functional/config_spec.rb
79
83
  - spec/functional/plausibility_spec.rb
80
84
  - spec/lib/phony/countries_spec.rb
81
85
  - spec/lib/phony/country_codes_spec.rb
@@ -89,11 +93,14 @@ files:
89
93
  - spec/lib/phony/national_splitters/none_spec.rb
90
94
  - spec/lib/phony/national_splitters/regex_spec.rb
91
95
  - spec/lib/phony/national_splitters/variable_spec.rb
92
- homepage: http://github.com/floere/phony
96
+ - spec/lib/phony/trunk_code_spec.rb
97
+ - spec/lib/phony/vanity_spec.rb
98
+ - spec/lib/phony_spec.rb
99
+ homepage: https://github.com/floere/phony
93
100
  licenses:
94
101
  - MIT
95
102
  metadata: {}
96
- post_install_message:
103
+ post_install_message:
97
104
  rdoc_options: []
98
105
  require_paths:
99
106
  - lib
@@ -108,23 +115,26 @@ required_rubygems_version: !ruby/object:Gem::Requirement
108
115
  - !ruby/object:Gem::Version
109
116
  version: '0'
110
117
  requirements: []
111
- rubyforge_project:
112
- rubygems_version: 2.4.6
113
- signing_key:
118
+ rubygems_version: 3.0.3
119
+ signing_key:
114
120
  specification_version: 4
115
121
  summary: Fast international phone number (E164 standard) normalizing, splitting and
116
122
  formatting.
117
123
  test_files:
118
- - spec/functional/plausibility_spec.rb
119
- - spec/lib/phony/countries_spec.rb
120
- - spec/lib/phony/country_codes_spec.rb
124
+ - spec/lib/phony_spec.rb
125
+ - spec/lib/phony/trunk_code_spec.rb
121
126
  - spec/lib/phony/country_spec.rb
122
- - spec/lib/phony/dsl_spec.rb
123
- - spec/lib/phony/local_splitters/fixed_spec.rb
124
- - spec/lib/phony/local_splitters/regex_spec.rb
125
127
  - spec/lib/phony/national_code_spec.rb
126
- - spec/lib/phony/national_splitters/default_spec.rb
127
- - spec/lib/phony/national_splitters/fixed_spec.rb
128
+ - spec/lib/phony/countries_spec.rb
129
+ - spec/lib/phony/dsl_spec.rb
130
+ - spec/lib/phony/national_splitters/variable_spec.rb
128
131
  - spec/lib/phony/national_splitters/none_spec.rb
129
132
  - spec/lib/phony/national_splitters/regex_spec.rb
130
- - spec/lib/phony/national_splitters/variable_spec.rb
133
+ - spec/lib/phony/national_splitters/fixed_spec.rb
134
+ - spec/lib/phony/national_splitters/default_spec.rb
135
+ - spec/lib/phony/country_codes_spec.rb
136
+ - spec/lib/phony/local_splitters/regex_spec.rb
137
+ - spec/lib/phony/local_splitters/fixed_spec.rb
138
+ - spec/lib/phony/vanity_spec.rb
139
+ - spec/functional/config_spec.rb
140
+ - spec/functional/plausibility_spec.rb