nz-whois 0.0.2 → 0.0.3

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
- SHA1:
3
- metadata.gz: 10ea1944e4b10b7c711322ed5edd29157565acfd
4
- data.tar.gz: 0e0aeb8cb2cbd8cc33f38c608d6331d9bdbf9f43
2
+ SHA256:
3
+ metadata.gz: f00a0c087d86fca63be8d9e0f3bb4c9eb527ba77666d4ea1e3c87132292705a9
4
+ data.tar.gz: f27354fe1f772f4bb2609eea82c5b4565856bdb6600077502d936cf224887751
5
5
  SHA512:
6
- metadata.gz: ace1b1303e577d297699575fa58d7e04f2c1cf798fc89a94a45986e630cda81e4b43660462304699beeb3492d286547a7a5ee3b00bb0c535d36c5b8dba61041f
7
- data.tar.gz: '0758b02cecd0dcff152a338964594434abf2e2f2064581f94e12f0fa088f630f864d1a083899feeb5ce29befdd3e647b9b8601dc8255e53852328bb0a7395345'
6
+ metadata.gz: aeda6ee7f1f505290991c49b9a974ec1b367fc5ac339905a88ec8da0236e7cac0226e864b1e68feeae928c09a93149163e2fd57855de4a29718d7f2839835b19
7
+ data.tar.gz: ab4c1fc56212e85f3820355eb5e0f325c84c03bbd8e5f576a1557b74096c7ce6849f581869cc9a1654b9ef87d488ce758741b8134b98e33f300998866dcdab33
@@ -0,0 +1,22 @@
1
+ # Changelog
2
+
3
+ ## Unreleased
4
+ - none
5
+
6
+ ## [0.0.3](releases/tag/v0.0.3) - 2020-03-01
7
+ ### Fixed
8
+ - Address CVE-2020-8130 - `rake` OS command injection vulnerability
9
+
10
+ ## [0.0.2](releases/tag/v0.0.2) - 2018-01-05
11
+ ### Added
12
+ - Handle external request errors better
13
+ - Handle rate limited responses better
14
+ - Support for some `documents` APIs (create, check and retrieve)
15
+ - Travis CI configuration
16
+ - Spec tests
17
+ ### Fixed
18
+ - Invalid domain name check
19
+
20
+ ## [0.0.1](releases/tag/v0.0.1) - 2018-01-04
21
+ ### Added
22
+ - Base implementation of gem
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 nz-whois.gemspec
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,4 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
2
3
 
3
4
  require 'bundler/setup'
4
5
  require 'nz-whois'
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'nz-whois/gem_version'
2
4
 
3
5
  require 'nz-whois/client'
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'open-uri'
2
4
 
3
5
  module NZWhois
@@ -23,6 +25,7 @@ module NZWhois
23
25
  #
24
26
  def whois(domain)
25
27
  raise InvalidDomainError unless domain.to_s =~ /\.nz\z/i
28
+
26
29
  fetch_content domain
27
30
  self
28
31
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module NZWhois
2
4
  #
3
5
  # User contact for WHOIS response
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module NZWhois
2
- VERSION = '0.0.2'.freeze
4
+ VERSION = '0.0.3'
3
5
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module NZWhois
2
4
  #
3
5
  # Invalid domain error used when a non `.nz` domain requested
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'nokogiri'
2
4
  require 'date'
3
5
 
@@ -12,6 +14,7 @@ module NZWhois
12
14
 
13
15
  def valid_whois?
14
16
  return @valid_whois if defined? @valid_whois
17
+
15
18
  @valid_whois = !whois_content.empty? && !request_denied?
16
19
  end
17
20
 
@@ -41,21 +44,25 @@ module NZWhois
41
44
 
42
45
  def registrar
43
46
  return unless valid_whois?
47
+
44
48
  Contact.new self, 'Registrar'
45
49
  end
46
50
 
47
51
  def registrant_contact
48
52
  return unless valid_whois?
53
+
49
54
  Contact.new self, 'Registrant Contact'
50
55
  end
51
56
 
52
57
  def admin_contact
53
58
  return unless valid_whois?
59
+
54
60
  Contact.new self, 'Admin Contact'
55
61
  end
56
62
 
57
63
  def technical_contact
58
64
  return unless valid_whois?
65
+
59
66
  Contact.new self, 'Technical Contact'
60
67
  end
61
68
 
@@ -1,4 +1,6 @@
1
- lib = File.expand_path('../lib', __FILE__)
1
+ # frozen_string_literal: true
2
+
3
+ lib = File.expand_path('lib', __dir__)
2
4
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
5
 
4
6
  require 'nz-whois/gem_version'
@@ -23,7 +25,7 @@ Gem::Specification.new do |spec|
23
25
  spec.add_runtime_dependency 'nokogiri', '~> 1.0', '>= 1.6.0'
24
26
 
25
27
  spec.add_development_dependency 'bundler', '~> 1.11'
26
- spec.add_development_dependency 'rake', '~> 10.0'
28
+ spec.add_development_dependency 'rake', '~> 12.3', '>= 12.3.3'
27
29
  spec.add_development_dependency 'rspec', '~> 3.0'
28
30
  spec.add_development_dependency 'rubocop', '~> 0.52'
29
31
  spec.add_development_dependency 'shoulda-matchers', '~> 3.1'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nz-whois
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - abrom
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-01-04 00:00:00.000000000 Z
11
+ date: 2020-03-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri
@@ -50,14 +50,20 @@ dependencies:
50
50
  requirements:
51
51
  - - "~>"
52
52
  - !ruby/object:Gem::Version
53
- version: '10.0'
53
+ version: '12.3'
54
+ - - ">="
55
+ - !ruby/object:Gem::Version
56
+ version: 12.3.3
54
57
  type: :development
55
58
  prerelease: false
56
59
  version_requirements: !ruby/object:Gem::Requirement
57
60
  requirements:
58
61
  - - "~>"
59
62
  - !ruby/object:Gem::Version
60
- version: '10.0'
63
+ version: '12.3'
64
+ - - ">="
65
+ - !ruby/object:Gem::Version
66
+ version: 12.3.3
61
67
  - !ruby/object:Gem::Dependency
62
68
  name: rspec
63
69
  requirement: !ruby/object:Gem::Requirement
@@ -138,6 +144,7 @@ files:
138
144
  - ".gitignore"
139
145
  - ".rubocop.yml"
140
146
  - ".travis.yml"
147
+ - CHANGELOG.md
141
148
  - Gemfile
142
149
  - LICENSE
143
150
  - README.md
@@ -169,8 +176,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
169
176
  - !ruby/object:Gem::Version
170
177
  version: '0'
171
178
  requirements: []
172
- rubyforge_project:
173
- rubygems_version: 2.6.14
179
+ rubygems_version: 3.0.6
174
180
  signing_key:
175
181
  specification_version: 4
176
182
  summary: NZ WHOIS scraper