phony_rails 0.12.8 → 0.12.9

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: 5f955ac8d52e7faa2965313a1d8643dce32d780d
4
- data.tar.gz: 50cf60a64472724f47bfa733458a8182aaafe651
3
+ metadata.gz: 195043058b5e1e586ad0baf7b4eb4c6427daaa5d
4
+ data.tar.gz: 3ef58e04cd57ecbb86041abfd1404d35eadda443
5
5
  SHA512:
6
- metadata.gz: ad42f17903eff99998805e0ae79609a7dd86e13fce1a27003448ac356fb65f01efdf8ad3449de11369c825bf9c25bdd7408c08c613074953663293642a9db756
7
- data.tar.gz: 24e081e4b42f81dcd035c2b3afadb6c83e11c523bffe9e18fec3ea6a84f5dafc216d7904942d733816528b62476da00dcedec9d1b9e86f51bccc0de4e3e0acfc
6
+ metadata.gz: e28e02f263a44d1d1e88226c2fa85864282d7c43e32a9c52bec51fe802b11a51ced0806fe9a3fd1efcc89acd4f0bcb04b7a2c33c4c47c6cc8c58fe78f6f654e3
7
+ data.tar.gz: 8829691aa23f7247ff3a5393332a6f98eaab30a7e3f87ed7e45d4387d647b8dd059ad0d9360ebb301516799aa172e1808c92090e8ae4b3d45b2d7dd31169015b
data/.gitignore CHANGED
@@ -2,3 +2,4 @@
2
2
  /.idea/
3
3
  .ruby-gemset
4
4
  .ruby-version
5
+ coverage/*
@@ -1,5 +1,19 @@
1
1
  # Change Log
2
2
 
3
+ ## [v0.12.9](https://github.com/joost/phony_rails/tree/v0.12.9) (2015-07-13)
4
+
5
+ [Full Changelog](https://github.com/joost/phony_rails/compare/v0.12.8...v0.12.9)
6
+
7
+ **Closed issues:**
8
+
9
+ - Countries 0.11.5 introduces a breaking change [\#103](https://github.com/joost/phony_rails/issues/103)
10
+
11
+ **Merged pull requests:**
12
+
13
+ - Get country data in a more straight forward way [\#105](https://github.com/joost/phony_rails/pull/105) ([humancopy](https://github.com/humancopy))
14
+
15
+ - Replace Data with Setup.data [\#104](https://github.com/joost/phony_rails/pull/104) ([monfresh](https://github.com/monfresh))
16
+
3
17
  ## [v0.12.8](https://github.com/joost/phony_rails/tree/v0.12.8) (2015-06-22)
4
18
 
5
19
  [Full Changelog](https://github.com/joost/phony_rails/compare/v0.12.7...v0.12.8)
data/Gemfile CHANGED
@@ -13,3 +13,4 @@ gem 'rspec'#, '~> 2.14.0'
13
13
  gem 'guard'#, '~> 2.10.1'
14
14
  gem 'guard-bundler'#, '~> 2.0.0'
15
15
  gem 'guard-rspec'#, '~> 4.2.0'
16
+ gem 'coveralls', require: false
@@ -1,44 +1,51 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- phony_rails (0.12.7)
4
+ phony_rails (0.12.9)
5
5
  activesupport (>= 3.0)
6
- countries (~> 0.8, >= 0.8.2)
6
+ countries (~> 0.11, >= 0.11.5)
7
7
  phony (~> 2.12)
8
8
 
9
9
  GEM
10
10
  remote: https://rubygems.org/
11
11
  specs:
12
- activemodel (4.2.2)
13
- activesupport (= 4.2.2)
12
+ activemodel (4.2.3)
13
+ activesupport (= 4.2.3)
14
14
  builder (~> 3.1)
15
- activerecord (4.2.2)
16
- activemodel (= 4.2.2)
17
- activesupport (= 4.2.2)
15
+ activerecord (4.2.3)
16
+ activemodel (= 4.2.3)
17
+ activesupport (= 4.2.3)
18
18
  arel (~> 6.0)
19
- activesupport (4.2.2)
19
+ activesupport (4.2.3)
20
20
  i18n (~> 0.7)
21
21
  json (~> 1.7, >= 1.7.7)
22
22
  minitest (~> 5.1)
23
23
  thread_safe (~> 0.3, >= 0.3.4)
24
24
  tzinfo (~> 1.1)
25
- arel (6.0.0)
26
- bson (3.1.0)
25
+ arel (6.0.2)
26
+ bson (3.1.2)
27
27
  builder (3.2.2)
28
- celluloid (0.16.0)
29
- timers (~> 4.0.0)
30
28
  coderay (1.1.0)
31
29
  connection_pool (2.2.0)
32
- countries (0.11.4)
30
+ countries (0.11.5)
33
31
  currencies (~> 0.4.2)
34
32
  i18n_data (~> 0.7.0)
33
+ coveralls (0.8.2)
34
+ json (~> 1.8)
35
+ rest-client (>= 1.6.8, < 2)
36
+ simplecov (~> 0.10.0)
37
+ term-ansicolor (~> 1.3)
38
+ thor (~> 0.19.1)
35
39
  currencies (0.4.2)
36
40
  diff-lcs (1.2.5)
37
- ffi (1.9.8)
41
+ docile (1.1.5)
42
+ domain_name (0.5.24)
43
+ unf (>= 0.0.5, < 1.0.0)
44
+ ffi (1.9.10)
38
45
  formatador (0.2.5)
39
- guard (2.12.6)
46
+ guard (2.12.8)
40
47
  formatador (>= 0.2.4)
41
- listen (~> 2.7)
48
+ listen (>= 2.7, <= 4.0)
42
49
  lumberjack (~> 1.0)
43
50
  nenv (~> 0.1)
44
51
  notiffany (~> 0.0)
@@ -50,20 +57,21 @@ GEM
50
57
  guard (~> 2.2)
51
58
  guard-compat (~> 1.1)
52
59
  guard-compat (1.2.1)
53
- guard-rspec (4.5.2)
60
+ guard-rspec (4.6.1)
54
61
  guard (~> 2.1)
55
62
  guard-compat (~> 1.1)
56
63
  rspec (>= 2.99.0, < 4.0)
57
- hitimes (1.2.2)
64
+ http-cookie (1.0.2)
65
+ domain_name (~> 0.5)
58
66
  i18n (0.7.0)
59
67
  i18n_data (0.7.0)
60
68
  json (1.8.3)
61
- listen (2.10.1)
62
- celluloid (~> 0.16.0)
69
+ listen (3.0.2)
63
70
  rb-fsevent (>= 0.9.3)
64
71
  rb-inotify (>= 0.9)
65
72
  lumberjack (1.0.9)
66
73
  method_source (0.8.2)
74
+ mime-types (2.6.1)
67
75
  minitest (5.7.0)
68
76
  mongoid (4.0.2)
69
77
  activemodel (~> 4.0)
@@ -75,12 +83,13 @@ GEM
75
83
  connection_pool (~> 2.0)
76
84
  optionable (~> 0.2.0)
77
85
  nenv (0.2.0)
86
+ netrc (0.10.3)
78
87
  notiffany (0.0.6)
79
88
  nenv (~> 0.1)
80
89
  shellany (~> 0.0)
81
90
  optionable (0.2.0)
82
91
  origin (2.1.1)
83
- phony (2.14.4)
92
+ phony (2.14.7)
84
93
  pry (0.10.1)
85
94
  coderay (~> 1.1.0)
86
95
  method_source (~> 0.8.1)
@@ -89,28 +98,41 @@ GEM
89
98
  rb-fsevent (0.9.5)
90
99
  rb-inotify (0.9.5)
91
100
  ffi (>= 0.5.0)
101
+ rest-client (1.8.0)
102
+ http-cookie (>= 1.0.2, < 2.0)
103
+ mime-types (>= 1.16, < 3.0)
104
+ netrc (~> 0.7)
92
105
  rspec (3.3.0)
93
106
  rspec-core (~> 3.3.0)
94
107
  rspec-expectations (~> 3.3.0)
95
108
  rspec-mocks (~> 3.3.0)
96
- rspec-core (3.3.0)
109
+ rspec-core (3.3.1)
97
110
  rspec-support (~> 3.3.0)
98
111
  rspec-expectations (3.3.0)
99
112
  diff-lcs (>= 1.2.0, < 2.0)
100
113
  rspec-support (~> 3.3.0)
101
- rspec-mocks (3.3.0)
114
+ rspec-mocks (3.3.1)
102
115
  diff-lcs (>= 1.2.0, < 2.0)
103
116
  rspec-support (~> 3.3.0)
104
117
  rspec-support (3.3.0)
105
118
  shellany (0.0.1)
119
+ simplecov (0.10.0)
120
+ docile (~> 1.1.0)
121
+ json (~> 1.8)
122
+ simplecov-html (~> 0.10.0)
123
+ simplecov-html (0.10.0)
106
124
  slop (3.6.0)
107
125
  sqlite3 (1.3.10)
126
+ term-ansicolor (1.3.2)
127
+ tins (~> 1.0)
108
128
  thor (0.19.1)
109
129
  thread_safe (0.3.5)
110
- timers (4.0.1)
111
- hitimes
130
+ tins (1.5.4)
112
131
  tzinfo (1.2.2)
113
132
  thread_safe (~> 0.1)
133
+ unf (0.1.4)
134
+ unf_ext
135
+ unf_ext (0.0.7.1)
114
136
 
115
137
  PLATFORMS
116
138
  ruby
@@ -118,6 +140,7 @@ PLATFORMS
118
140
  DEPENDENCIES
119
141
  activerecord (>= 3.0)
120
142
  countries
143
+ coveralls
121
144
  guard
122
145
  guard-bundler
123
146
  guard-rspec
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # PhonyRails [![Build Status](https://travis-ci.org/joost/phony_rails.svg?branch=master)](https://travis-ci.org/joost/phony_rails) ![Dependencies Status](https://img.shields.io/gemnasium/joost/phony_rails.svg) ![Gem](https://img.shields.io/gem/v/phony_rails.svg)
1
+ # PhonyRails [![Build Status](https://travis-ci.org/joost/phony_rails.svg?branch=master)](https://travis-ci.org/joost/phony_rails) [![Coverage Status](https://coveralls.io/repos/joost/phony_rails/badge.svg)](https://coveralls.io/r/joost/phony_rails) ![Dependencies Status](https://img.shields.io/gemnasium/joost/phony_rails.svg) ![Gem](https://img.shields.io/gem/v/phony_rails.svg)
2
2
 
3
3
  This small Gem adds useful methods to your Rails app to validate, display and save phone numbers.
4
4
  It uses the super awesome Phony gem (https://github.com/floere/phony).
@@ -7,7 +7,7 @@ require 'phony_rails/version'
7
7
  module PhonyRails
8
8
 
9
9
  def self.country_number_for(country_code)
10
- ISO3166::Country::Data[country_code.to_s.upcase].try(:[], 'country_code')
10
+ ISO3166::Country[country_code.to_s.upcase].try(:data).try(:[], 'country_code')
11
11
  end
12
12
 
13
13
  # This method requires a country_code attribute (eg. NL) and phone_number to be set.
@@ -59,7 +59,7 @@ module PhonyRails
59
59
  def self.plausible_number?(number, options = {})
60
60
  return false if number.nil? || number.blank?
61
61
  number = normalize_number(number, options)
62
- country_number = options[:country_number] || country_number_for(options[:country_code]) ||
62
+ country_number = options[:country_number] || country_number_for(options[:country_code]) ||
63
63
  default_country_number = options[:default_country_number] || country_number_for(options[:default_country_code])
64
64
  Phony.plausible? number, cc: country_number
65
65
  rescue
@@ -1,3 +1,3 @@
1
1
  module PhonyRails
2
- VERSION = "0.12.8"
2
+ VERSION = "0.12.9"
3
3
  end
@@ -20,7 +20,7 @@ Gem::Specification.new do |gem|
20
20
  gem.post_install_message = "It now ads a '+' to the normalized number when it starts with a country number!"
21
21
 
22
22
  gem.add_dependency "phony", '~> 2.12'
23
- gem.add_dependency "countries", '~> 0.8', '>= 0.8.2'
23
+ gem.add_dependency "countries", '~> 0.11', '>= 0.11.5'
24
24
  gem.add_dependency "activesupport", ">= 3.0"
25
25
  gem.add_development_dependency "activerecord", ">= 3.0"
26
26
  gem.add_development_dependency "mongoid", ">= 3.0"
@@ -1,3 +1,8 @@
1
+ require 'coveralls'
2
+ Coveralls.wear!
3
+
4
+ # Own code here.
5
+
1
6
  require 'rubygems'
2
7
  require 'bundler/setup'
3
8
 
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.8
4
+ version: 0.12.9
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-06-22 00:00:00.000000000 Z
11
+ date: 2015-07-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: phony
@@ -30,20 +30,20 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '0.8'
33
+ version: '0.11'
34
34
  - - ">="
35
35
  - !ruby/object:Gem::Version
36
- version: 0.8.2
36
+ version: 0.11.5
37
37
  type: :runtime
38
38
  prerelease: false
39
39
  version_requirements: !ruby/object:Gem::Requirement
40
40
  requirements:
41
41
  - - "~>"
42
42
  - !ruby/object:Gem::Version
43
- version: '0.8'
43
+ version: '0.11'
44
44
  - - ">="
45
45
  - !ruby/object:Gem::Version
46
- version: 0.8.2
46
+ version: 0.11.5
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: activesupport
49
49
  requirement: !ruby/object:Gem::Requirement