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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ab3424d752b68008887121f88dff5d582da4ab57da26030db6b6a3810d47cd1e
4
- data.tar.gz: 2b9eb88a8872c6daf129ea288f9f3bba7444ef52e832fc4ff1fa28aa701fec52
3
+ metadata.gz: 47380e2f0bea2d80b4a121da7acd13ce3cad125dc1cf45b786b426bf9bdfbb41
4
+ data.tar.gz: 890114ae6f8057409ad67f0dca7b520d1f74bc00772bb0ccc2a8d66cd351470a
5
5
  SHA512:
6
- metadata.gz: d7b419800b4d4f9c1efb1a934d0be9e3473390d19198767cd8ea9362edeb2902b2ffa6073594f059f3b4bf5da30057aef403d5a88c24ca72200375ef8d13b160
7
- data.tar.gz: 22399443cdbf01593fd9ba22720e9fd127c1ca498390b8b5f3009e4ee8d461443adb1a452f55b62a3a308ef17173258a4b3634254174bfd0cb9f3a4c3cc8e49f
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
@@ -1,4 +1,4 @@
1
- Metrics/LineLength:
1
+ Layout/LineLength:
2
2
  Max: 120
3
3
 
4
4
  Metrics/MethodLength:
@@ -0,0 +1,9 @@
1
+ # Changelog
2
+
3
+ ## 0.3.2 / 2020-03-20
4
+
5
+ - Fix CVE-2020-10663
6
+
7
+ ## 0.3.1 / 2019-12-17
8
+
9
+ - Fix CVE-2019-16779
data/Gemfile CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  source 'https://rubygems.org'
2
4
 
3
5
  # Specify your gem's dependencies in numverify.gemspec
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- [![CircleCI](https://circleci.com/gh/chronogolf/numverify/tree/master.svg?style=shield&circle-token=a035ff061b42aa7812b0db6e744f2168a2f6eb13)](https://circleci.com/gh/chronogolf/numverify/tree/master) [![Code Climate](https://codeclimate.com/github/chronogolf/numverify/badges/gpa.svg)](https://codeclimate.com/github/chronogolf/numverify) [![Gem Version](https://badge.fury.io/rb/numverify.svg)](https://badge.fury.io/rb/numverify)
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
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'bundler/gem_tasks'
2
4
  require 'rspec/core/rake_task'
3
5
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  #!/usr/bin/env ruby
2
4
 
3
5
  require 'bundler/setup'
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'excon'
2
4
  require 'json'
3
5
  require 'numverify/version'
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module NumverifyClient
2
4
  class Configuration
3
5
  attr_accessor :access_key, :https
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module NumverifyClient
2
4
  class APIError < NumverifyClientError
3
5
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module NumverifyClient
2
4
  class HttpsAccessRestrictionError < NumverifyClientError
3
5
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module NumverifyClient
2
4
  class InactiveUserError < NumverifyClientError
3
5
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module NumverifyClient
2
4
  class InvalidAccessKeyError < NumverifyClientError
3
5
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module NumverifyClient
2
4
  class InvalidApiFunctionError < NumverifyClientError
3
5
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module NumverifyClient
2
4
  class InvalidCountryCodeError < NumverifyClientError
3
5
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module NumverifyClient
2
4
  class NoPhoneNumberError < NumverifyClientError
3
5
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module NumverifyClient
2
4
  class NonNumericPhoneNumberError < NumverifyClientError
3
5
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module NumverifyClient
2
4
  class NotFoundError < NumverifyClientError
3
5
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module NumverifyClient
2
4
  class NumverifyClientError < StandardError
3
5
  attr_reader :message
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module NumverifyClient
2
4
  class UsageLimitError < NumverifyClientError
3
5
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'numverify/errors/numverify_client_error'
2
4
  require 'numverify/errors/api_error'
3
5
  require 'numverify/errors/https_access_restriction_error'
@@ -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(h)
20
- h.each do |key, value|
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
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module NumverifyClient
2
- VERSION = '0.3.1'.freeze
4
+ VERSION = '0.3.2'.freeze
3
5
  end
@@ -1,6 +1,6 @@
1
- # coding: utf-8
1
+ # frozen_string_literal: true
2
2
 
3
- lib = File.expand_path('../lib', __FILE__)
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', '~> 1.8.3')
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.1
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: 2019-12-17 00:00:00.000000000 Z
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: '0'
55
- - !ruby/object:Gem::Dependency
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: '0'
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: rubocop
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: bundler-audit
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: rspec_junit_formatter
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: webmock
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: vcr
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
- - ".travis.yml"
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.3
179
+ rubygems_version: 3.0.6
207
180
  signing_key:
208
181
  specification_version: 4
209
182
  summary: API Client for Numverify services
@@ -1,5 +0,0 @@
1
- sudo: false
2
- language: ruby
3
- rvm:
4
- - 2.2.1
5
- before_install: gem install bundler -v 1.13.6