phony 2.15.25 → 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 +32 -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 +7 -2
  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 +2 -0
  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 +3 -0
  34. data/lib/phony/countries/serbia.rb +7 -1
  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 +29 -17
  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 +3 -0
  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 +181 -78
  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 -60
  56. data/spec/functional/config_spec.rb +44 -0
  57. data/spec/functional/plausibility_spec.rb +364 -32
  58. data/spec/lib/phony/countries_spec.rb +245 -52
  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 +26 -18
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.25
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: 2016-06-01 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
@@ -77,6 +79,7 @@ files:
77
79
  - lib/phony/national_splitters/variable.rb
78
80
  - lib/phony/trunk_code.rb
79
81
  - lib/phony/vanity.rb
82
+ - spec/functional/config_spec.rb
80
83
  - spec/functional/plausibility_spec.rb
81
84
  - spec/lib/phony/countries_spec.rb
82
85
  - spec/lib/phony/country_codes_spec.rb
@@ -90,11 +93,14 @@ files:
90
93
  - spec/lib/phony/national_splitters/none_spec.rb
91
94
  - spec/lib/phony/national_splitters/regex_spec.rb
92
95
  - spec/lib/phony/national_splitters/variable_spec.rb
93
- 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
94
100
  licenses:
95
101
  - MIT
96
102
  metadata: {}
97
- post_install_message:
103
+ post_install_message:
98
104
  rdoc_options: []
99
105
  require_paths:
100
106
  - lib
@@ -109,24 +115,26 @@ required_rubygems_version: !ruby/object:Gem::Requirement
109
115
  - !ruby/object:Gem::Version
110
116
  version: '0'
111
117
  requirements: []
112
- rubyforge_project:
113
- rubygems_version: 2.5.0
114
- signing_key:
118
+ rubygems_version: 3.0.3
119
+ signing_key:
115
120
  specification_version: 4
116
121
  summary: Fast international phone number (E164 standard) normalizing, splitting and
117
122
  formatting.
118
123
  test_files:
119
- - spec/functional/plausibility_spec.rb
120
- - spec/lib/phony/countries_spec.rb
121
- - spec/lib/phony/country_codes_spec.rb
124
+ - spec/lib/phony_spec.rb
125
+ - spec/lib/phony/trunk_code_spec.rb
122
126
  - spec/lib/phony/country_spec.rb
123
- - spec/lib/phony/dsl_spec.rb
124
- - spec/lib/phony/local_splitters/fixed_spec.rb
125
- - spec/lib/phony/local_splitters/regex_spec.rb
126
127
  - spec/lib/phony/national_code_spec.rb
127
- - spec/lib/phony/national_splitters/default_spec.rb
128
- - 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
129
131
  - spec/lib/phony/national_splitters/none_spec.rb
130
132
  - spec/lib/phony/national_splitters/regex_spec.rb
131
- - spec/lib/phony/national_splitters/variable_spec.rb
132
- has_rdoc: false
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