torasup 0.1.2 → 0.2.0

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: 96bf8ed2c9765fec7804b2c8343aff650d7dbbd1
4
- data.tar.gz: 5d8a1a2613210ea556aff93610538158da20a355
3
+ metadata.gz: 888eca4d5a8db09f5784bbb6de787143393a5f0b
4
+ data.tar.gz: 37652d228d0a9708775248cdef7f9f1ca496e163
5
5
  SHA512:
6
- metadata.gz: 7e03c8b8f86d4c72a48df00875a4f0014f0fffeb30ea38ab88f54f8580532a4e437ddd03f9d71639811ba31774ab66e6221321c4d5eb0ac5ccce67b849dd542e
7
- data.tar.gz: 5aa7c81f1ed11e2afa051763334806dda3576ead4a25e910c98cd2a3d920c41497fad77dca206e0483557190b54e79902f53b30832e7cae5efe264887a6e105f
6
+ metadata.gz: e20aa4caea8eb67315a9425d1e27f19136aa6cdbac5c547008d1372b1a68e369efdc16cb37a12b16de8cd93bc3c9ee2c0e2a502620fea2bae43760cee7d00121
7
+ data.tar.gz: af5fa3eb04a5e85b951d77b8c70ce9b7ffab012550b984d3ebe657355fc3427408c88410696ecd9c53933e387e74f0905500dd1d8a9b98d9deb1047ff6b89880
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ 2.4.2
data/.travis.yml CHANGED
@@ -1,2 +1,11 @@
1
- rvm:
2
- - 2.3.3
1
+ language: ruby
2
+ sudo: false
3
+ env:
4
+ global:
5
+ - START_SIMPLECOV=1
6
+ addons:
7
+ code_climate:
8
+ repo_token:
9
+ secure: "Xk7T8ZyorwO85WfXC7OB2HfIM9Z/GO85u97P1qwXukL1ZjjDffr3mzhh706AVA9JPpTQGDbLNU5aStxX6NVLjBXyflvEpSGmYLl0aHDVikcNvZA/jBGlIfJH/6/V5bJA11X3V2/9FeO5l2fPkusWxbcpAIowe7xclDXfujdoNGk="
10
+ after_success:
11
+ - bundle exec codeclimate-test-reporter
data/README.md CHANGED
@@ -2,7 +2,9 @@
2
2
 
3
3
  Retuns metadata about a phone number such as operator info, area code and more.
4
4
 
5
- [![Build Status](https://travis-ci.org/dwilkie/torasup.png)](https://travis-ci.org/dwilkie/torasup) [![Dependency Status](https://gemnasium.com/dwilkie/torasup.png)](https://gemnasium.com/dwilkie/torasup) [![Code Climate](https://codeclimate.com/github/dwilkie/torasup.png)](https://codeclimate.com/github/dwilkie/torasup)
5
+ [![Build Status](https://travis-ci.org/somleng/torasup.png)](https://travis-ci.org/somleng/torasup)
6
+ [![Test Coverage](https://codeclimate.com/github/somleng/torasup/badges/coverage.svg)](https://codeclimate.com/github/somleng/torasup/coverage)
7
+ [![Code Climate](https://codeclimate.com/github/somleng/torasup/badges/gpa.svg)](https://codeclimate.com/github/somleng/torasup)
6
8
 
7
9
  ## Installation
8
10
 
@@ -89,7 +91,7 @@ Torasup.prefixes["8552345"]
89
91
 
90
92
  ### Overriding Data
91
93
 
92
- Sometimes it maybe necessary to override the data that Torasup provides. For example you may want to provide custom attributes for different operators. In order to achieve this you can provide a custom [psdn](http://en.wikipedia.org/wiki/Public_switched_telephone_network) data file. Custom files also support interpolations using the `%{interpolation}` [I18n syntax](http://guides.rubyonrails.org/i18n.html#interpolation). See the format of sample custom [pstn data file](https://github.com/dwilkie/torasup/blob/master/spec/support/custom_pstn.yaml) for more info. e.g.
94
+ Sometimes it maybe necessary to override the data that Torasup provides. For example you may want to provide custom attributes for different operators. In order to achieve this you can provide a custom [psdn](http://en.wikipedia.org/wiki/Public_switched_telephone_network) data file. Custom files also support interpolations using the `%{interpolation}` [I18n syntax](http://guides.rubyonrails.org/i18n.html#interpolation). See the format of sample custom [pstn data file](https://github.com/somleng/torasup/blob/master/spec/support/custom_pstn.yaml) for more info. e.g.
93
95
 
94
96
  ```yaml
95
97
  # my_pstn_data.yaml
@@ -185,7 +187,7 @@ Torasup::PhoneNumber.new("+1 415-234 567").country_id
185
187
 
186
188
  ## Testing
187
189
 
188
- Torasup exposes a few test helpers methods which you can use in your tests. See [the helper module](https://github.com/dwilkie/torasup/blob/master/lib/torasup/test/helpers.rb) for more info.
190
+ Torasup exposes a few test helpers methods which you can use in your tests. See [the helper module](https://github.com/somleng/torasup/blob/master/lib/torasup/test/helpers.rb) for more info.
189
191
 
190
192
  Here's an example using rspec:
191
193
 
@@ -203,7 +205,7 @@ describe User do
203
205
  end
204
206
 
205
207
  # provide a custom spec file for example see:
206
- # see https://github.com/dwilkie/torasup/blob/master/spec/support/custom_pstn_spec.yaml
208
+ # see https://github.com/somleng/torasup/blob/master/spec/support/custom_pstn_spec.yaml
207
209
  def pstn_data(custom_spec = nil)
208
210
  super("custom_operators_spec.yaml")
209
211
  end
@@ -237,8 +239,8 @@ Sample numbers and assertions are only yielded for the operators defined in `ASS
237
239
 
238
240
  ### Data
239
241
 
240
- When contributing data please ensure that you create or edit an entry in the [pstn spec](https://github.com/dwilkie/torasup/tree/master/spec/torasup/spec/support_pstn_spec.rb). This ensures the integrity of the data.
242
+ When contributing data please ensure that you create or edit an entry in the [pstn spec](https://github.com/somleng/torasup/tree/master/spec/torasup/spec/support_pstn_spec.rb). This ensures the integrity of the data.
241
243
 
242
- Please also include a link to Wikipedia article which verifies your data. See the [current psdn spec](https://github.com/dwilkie/torasup/blob/master/spec/support/pstn_spec.yaml) for an example that links to [Wikipedia](http://en.wikipedia.org/wiki/Telecommunications_in_Cambodia#Mobile_networks).
244
+ Please also include a link to Wikipedia article which verifies your data. See the [current psdn spec](https://github.com/somleng/torasup/blob/master/spec/support/pstn_spec.yaml) for an example that links to [Wikipedia](http://en.wikipedia.org/wiki/Telecommunications_in_Cambodia#Mobile_networks).
243
245
 
244
246
  If you obtained operator prefixes from another source please clearly add these prefixes to the appropriate Wikipedia article and reference it if necessary. This helps ensure the accuracy of the gem.
@@ -207,3 +207,16 @@ so:
207
207
  prefixes:
208
208
  - '61'
209
209
  - '64'
210
+ sl:
211
+ # https://en.wikipedia.org/wiki/Telecommunications_in_Sierra_Leone
212
+ # https://en.wikipedia.org/wiki/List_of_mobile_network_operators_of_the_Middle_East_and_Africa#Sierra_Leone
213
+ international_dialing_code: "232"
214
+ operators:
215
+ africell:
216
+ # https://en.wikipedia.org/wiki/Africell
217
+ metadata:
218
+ name: "Africell"
219
+ prefixes:
220
+ - '30'
221
+ - '77'
222
+ - '88'
@@ -1,3 +1,3 @@
1
1
  module Torasup
2
- VERSION = "0.1.2"
2
+ VERSION = "0.2.0"
3
3
  end
data/spec/spec_helper.rb CHANGED
@@ -1,3 +1,8 @@
1
+ if ENV["START_SIMPLECOV"].to_i == 1
2
+ require 'simplecov'
3
+ SimpleCov.start
4
+ end
5
+
1
6
  require 'torasup'
2
7
 
3
8
  RSpec.configure do |config|
@@ -173,3 +173,17 @@ so:
173
173
  prefixes:
174
174
  - '61'
175
175
  - '64'
176
+ sl:
177
+ prefix: "232"
178
+ local_number: "234567"
179
+ operators:
180
+ # https://en.wikipedia.org/wiki/Telecommunications_in_Sierra_Leone
181
+ # https://en.wikipedia.org/wiki/List_of_mobile_network_operators_of_the_Middle_East_and_Africa#Sierra_Leone
182
+ africell:
183
+ # https://en.wikipedia.org/wiki/Africell
184
+ assertions:
185
+ name: "Africell"
186
+ prefixes:
187
+ - '30'
188
+ - '77'
189
+ - '88'
data/torasup.gemspec CHANGED
@@ -24,4 +24,6 @@ Gem::Specification.new do |gem|
24
24
 
25
25
  gem.add_development_dependency "rspec"
26
26
  gem.add_development_dependency "rake"
27
+ gem.add_development_dependency "simplecov"
28
+ gem.add_development_dependency "codeclimate-test-reporter", "~> 1.0.0"
27
29
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: torasup
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Wilkie
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-07-17 00:00:00.000000000 Z
11
+ date: 2017-11-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: countries
@@ -80,6 +80,34 @@ dependencies:
80
80
  - - ">="
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: simplecov
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: codeclimate-test-reporter
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - "~>"
102
+ - !ruby/object:Gem::Version
103
+ version: 1.0.0
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - "~>"
109
+ - !ruby/object:Gem::Version
110
+ version: 1.0.0
83
111
  description: '"Retuns metadata about a phone number such as operator, area code and
84
112
  more"'
85
113
  email:
@@ -90,6 +118,7 @@ extra_rdoc_files: []
90
118
  files:
91
119
  - ".gitignore"
92
120
  - ".rspec"
121
+ - ".ruby-version"
93
122
  - ".travis.yml"
94
123
  - Gemfile
95
124
  - LICENSE.txt
@@ -135,7 +164,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
135
164
  version: '0'
136
165
  requirements: []
137
166
  rubyforge_project:
138
- rubygems_version: 2.6.11
167
+ rubygems_version: 2.6.13
139
168
  signing_key:
140
169
  specification_version: 4
141
170
  summary: '"Retuns metadata about a phone number such as operator, area code and more"'