numverify 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +30 -0
- data/.rubocop.yml +1 -1
- data/CHANGELOG.md +9 -0
- data/Gemfile +2 -0
- data/README.md +1 -2
- data/Rakefile +2 -0
- data/bin/console +2 -0
- data/lib/numverify.rb +2 -0
- data/lib/numverify/configuration.rb +2 -0
- data/lib/numverify/errors/api_error.rb +2 -0
- data/lib/numverify/errors/https_access_restriction_error.rb +2 -0
- data/lib/numverify/errors/inactive_user_error.rb +2 -0
- data/lib/numverify/errors/invalid_access_key_error.rb +2 -0
- data/lib/numverify/errors/invalid_api_function_error.rb +2 -0
- data/lib/numverify/errors/invalid_country_code_error.rb +2 -0
- data/lib/numverify/errors/no_phone_number_error.rb +2 -0
- data/lib/numverify/errors/non_numeric_phone_number_error.rb +2 -0
- data/lib/numverify/errors/not_found_error.rb +2 -0
- data/lib/numverify/errors/numverify_client_error.rb +2 -0
- data/lib/numverify/errors/usage_limit_error.rb +2 -0
- data/lib/numverify/request.rb +2 -0
- data/lib/numverify/result.rb +4 -2
- data/lib/numverify/version.rb +3 -1
- data/numverify.gemspec +5 -7
- metadata +13 -40
- data/.travis.yml +0 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 47380e2f0bea2d80b4a121da7acd13ce3cad125dc1cf45b786b426bf9bdfbb41
|
4
|
+
data.tar.gz: 890114ae6f8057409ad67f0dca7b520d1f74bc00772bb0ccc2a8d66cd351470a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bea9381d3380ea9c308064774dbafcdb2eb1f90aae511092b23af9f8fb0c09df1023cd8c36ac64a02be8aa3258473cef97ba2a7b2a3fba7bffc54c8f305c09db
|
7
|
+
data.tar.gz: dd0cf99a41f59f08de478ede11cfd71409afea69865b787f05628dcffd6cc67716372252b6376fa3512e4560edeceaab6fa8cbb1713788210ef771aecb6f9d10
|
@@ -0,0 +1,30 @@
|
|
1
|
+
name: CI
|
2
|
+
|
3
|
+
on: [push]
|
4
|
+
|
5
|
+
jobs:
|
6
|
+
tests:
|
7
|
+
runs-on: ubuntu-latest
|
8
|
+
strategy:
|
9
|
+
matrix:
|
10
|
+
ruby: [2.6]
|
11
|
+
|
12
|
+
steps:
|
13
|
+
- uses: actions/checkout@master
|
14
|
+
|
15
|
+
- name: Sets up the Ruby version
|
16
|
+
uses: actions/setup-ruby@v1
|
17
|
+
with:
|
18
|
+
ruby-version: ${{ matrix.ruby }}
|
19
|
+
|
20
|
+
- name: Sets up the environment
|
21
|
+
run: |
|
22
|
+
gem install bundler
|
23
|
+
bundle install --jobs 4 --retry 3
|
24
|
+
bundle install
|
25
|
+
|
26
|
+
- name: Runs Rubocop
|
27
|
+
run: rubocop
|
28
|
+
|
29
|
+
- name: Runs tests
|
30
|
+
run: rspec
|
data/.rubocop.yml
CHANGED
data/CHANGELOG.md
ADDED
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
[![
|
1
|
+
[![Gem Version](https://badge.fury.io/rb/numverify.svg)](https://badge.fury.io/rb/numverify)
|
2
2
|
|
3
3
|
# Numverify API Client
|
4
4
|
|
@@ -88,4 +88,3 @@ Bug reports and pull requests are welcome on GitHub at https://github.com/chrono
|
|
88
88
|
## License
|
89
89
|
|
90
90
|
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
91
|
-
|
data/Rakefile
CHANGED
data/bin/console
CHANGED
data/lib/numverify.rb
CHANGED
data/lib/numverify/request.rb
CHANGED
data/lib/numverify/result.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module NumverifyClient
|
2
4
|
class Result
|
3
5
|
def initialize(data = {})
|
@@ -16,8 +18,8 @@ module NumverifyClient
|
|
16
18
|
|
17
19
|
private
|
18
20
|
|
19
|
-
def convert_to_obj(
|
20
|
-
|
21
|
+
def convert_to_obj(hash)
|
22
|
+
hash.each do |key, value|
|
21
23
|
self.class.send(:attr_accessor, key)
|
22
24
|
instance_variable_set("@#{key}", value)
|
23
25
|
convert_to_obj(value) if value.is_a? Hash
|
data/lib/numverify/version.rb
CHANGED
data/numverify.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
#
|
1
|
+
# frozen_string_literal: true
|
2
2
|
|
3
|
-
lib = File.expand_path('
|
3
|
+
lib = File.expand_path('lib', __dir__)
|
4
4
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
5
5
|
require 'numverify/version'
|
6
6
|
|
@@ -23,14 +23,12 @@ Gem::Specification.new do |spec|
|
|
23
23
|
spec.require_paths = ['lib']
|
24
24
|
|
25
25
|
spec.add_dependency('excon', '~> 0.71.0')
|
26
|
-
spec.add_dependency('json', '
|
26
|
+
spec.add_dependency('json', '>= 2.3.0')
|
27
27
|
|
28
|
+
spec.add_development_dependency('pry')
|
28
29
|
spec.add_development_dependency('rake')
|
29
30
|
spec.add_development_dependency('rspec')
|
30
|
-
spec.add_development_dependency('pry')
|
31
31
|
spec.add_development_dependency('rubocop')
|
32
|
-
spec.add_development_dependency('bundler-audit')
|
33
|
-
spec.add_development_dependency('rspec_junit_formatter')
|
34
|
-
spec.add_development_dependency('webmock')
|
35
32
|
spec.add_development_dependency('vcr')
|
33
|
+
spec.add_development_dependency('webmock')
|
36
34
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: numverify
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Olivier Buffon
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-03-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: excon
|
@@ -27,45 +27,17 @@ dependencies:
|
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: json
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - "~>"
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: 1.8.3
|
34
|
-
type: :runtime
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - "~>"
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: 1.8.3
|
41
|
-
- !ruby/object:Gem::Dependency
|
42
|
-
name: rake
|
43
|
-
requirement: !ruby/object:Gem::Requirement
|
44
|
-
requirements:
|
45
|
-
- - ">="
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
version: '0'
|
48
|
-
type: :development
|
49
|
-
prerelease: false
|
50
|
-
version_requirements: !ruby/object:Gem::Requirement
|
51
30
|
requirements:
|
52
31
|
- - ">="
|
53
32
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
55
|
-
|
56
|
-
name: rspec
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
58
|
-
requirements:
|
59
|
-
- - ">="
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: '0'
|
62
|
-
type: :development
|
33
|
+
version: 2.3.0
|
34
|
+
type: :runtime
|
63
35
|
prerelease: false
|
64
36
|
version_requirements: !ruby/object:Gem::Requirement
|
65
37
|
requirements:
|
66
38
|
- - ">="
|
67
39
|
- !ruby/object:Gem::Version
|
68
|
-
version:
|
40
|
+
version: 2.3.0
|
69
41
|
- !ruby/object:Gem::Dependency
|
70
42
|
name: pry
|
71
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -81,7 +53,7 @@ dependencies:
|
|
81
53
|
- !ruby/object:Gem::Version
|
82
54
|
version: '0'
|
83
55
|
- !ruby/object:Gem::Dependency
|
84
|
-
name:
|
56
|
+
name: rake
|
85
57
|
requirement: !ruby/object:Gem::Requirement
|
86
58
|
requirements:
|
87
59
|
- - ">="
|
@@ -95,7 +67,7 @@ dependencies:
|
|
95
67
|
- !ruby/object:Gem::Version
|
96
68
|
version: '0'
|
97
69
|
- !ruby/object:Gem::Dependency
|
98
|
-
name:
|
70
|
+
name: rspec
|
99
71
|
requirement: !ruby/object:Gem::Requirement
|
100
72
|
requirements:
|
101
73
|
- - ">="
|
@@ -109,7 +81,7 @@ dependencies:
|
|
109
81
|
- !ruby/object:Gem::Version
|
110
82
|
version: '0'
|
111
83
|
- !ruby/object:Gem::Dependency
|
112
|
-
name:
|
84
|
+
name: rubocop
|
113
85
|
requirement: !ruby/object:Gem::Requirement
|
114
86
|
requirements:
|
115
87
|
- - ">="
|
@@ -123,7 +95,7 @@ dependencies:
|
|
123
95
|
- !ruby/object:Gem::Version
|
124
96
|
version: '0'
|
125
97
|
- !ruby/object:Gem::Dependency
|
126
|
-
name:
|
98
|
+
name: vcr
|
127
99
|
requirement: !ruby/object:Gem::Requirement
|
128
100
|
requirements:
|
129
101
|
- - ">="
|
@@ -137,7 +109,7 @@ dependencies:
|
|
137
109
|
- !ruby/object:Gem::Version
|
138
110
|
version: '0'
|
139
111
|
- !ruby/object:Gem::Dependency
|
140
|
-
name:
|
112
|
+
name: webmock
|
141
113
|
requirement: !ruby/object:Gem::Requirement
|
142
114
|
requirements:
|
143
115
|
- - ">="
|
@@ -157,10 +129,11 @@ executables: []
|
|
157
129
|
extensions: []
|
158
130
|
extra_rdoc_files: []
|
159
131
|
files:
|
132
|
+
- ".github/workflows/ci.yml"
|
160
133
|
- ".gitignore"
|
161
134
|
- ".rspec"
|
162
135
|
- ".rubocop.yml"
|
163
|
-
-
|
136
|
+
- CHANGELOG.md
|
164
137
|
- Gemfile
|
165
138
|
- LICENSE.txt
|
166
139
|
- README.md
|
@@ -203,7 +176,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
203
176
|
- !ruby/object:Gem::Version
|
204
177
|
version: '0'
|
205
178
|
requirements: []
|
206
|
-
rubygems_version: 3.0.
|
179
|
+
rubygems_version: 3.0.6
|
207
180
|
signing_key:
|
208
181
|
specification_version: 4
|
209
182
|
summary: API Client for Numverify services
|