nicinfo 1.5.0 → 1.5.1

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: 7ecaa53b9df142ebd216e7dc88de56ab2f811c4339e9f075c4088f26d5cecd83
4
- data.tar.gz: af818b3b4a62989a1a4b4f8379601ca184461ad6483361070ac22a021ad83b18
3
+ metadata.gz: 470a293eeb983a569b1c4c6b4efcf8db8362059964723fdbc0bb6dc92ccd3af0
4
+ data.tar.gz: ecc75c45646580c50bf742d75857d546227a2b52c375229665aa79c8d255d116
5
5
  SHA512:
6
- metadata.gz: 035ad570ca83474c8a2256ca0107507322aacdd7987cdde9c63332158e2cb59f1c2e100d30e384648b711a2e73e77a3d3a36a1e6e65789de74a4154557e23610
7
- data.tar.gz: 3d10ed8e6f05f03b7d6b2124e831e30e7684a7b505791265db4170ad117f574e4a53977aa8e0ed1abd97fef7f33cdee8f819ac620eaba06e1d4e3adb6a908047
6
+ metadata.gz: c2ed93b9c261ed090e753f1b2ec20c28be87334be110eff77fba25e7ca96c9705320877482c448bfb5a6adf6451555fc1245bbda29ca1c1fd5aa9a0e7aad3baa
7
+ data.tar.gz: 66b285a0c792cb0b4dbabd5d4a62c79039723110c26489bea8f8e1ff1dd45ac7eb4926610faff5ba98ebd64ac4244f9b423e0795424d31fc329b5545f94d9c4c
@@ -18,7 +18,7 @@
18
18
 
19
19
  module NicInfo
20
20
 
21
- VERSION = "1.5.0"
21
+ VERSION = "1.5.1"
22
22
  VERSION_LABEL = "NicInfo v." + VERSION
23
23
  COPYRIGHT = "Copyright (c) 2011-2017 American Registry for Internet Numbers (ARIN)"
24
24
  CONFIG_VERSION = 4
@@ -319,7 +319,8 @@ module NicInfo
319
319
  if data == nil
320
320
 
321
321
  @config.logger.trace("Issuing GET for " + url)
322
- uri = URI.parse( URI::encode( url ) )
322
+ p = URI::Parser.new
323
+ uri = URI.parse( p.escape( url ) )
323
324
  req = Net::HTTP::Get.new(uri.request_uri)
324
325
  req["User-Agent"] = NicInfo::VERSION_LABEL
325
326
  req["Accept"] = NicInfo::RDAP_CONTENT_TYPE + ", " + NicInfo::JSON_CONTENT_TYPE
@@ -376,7 +377,8 @@ module NicInfo
376
377
  def get_file_via_http url, file_name, try
377
378
 
378
379
  @config.logger.trace("Downloading " + url + " to " + file_name )
379
- uri = URI.parse( URI::encode( url ) )
380
+ p = URI::Parser.new
381
+ uri = URI.parse( p.escape( url ) )
380
382
  req = Net::HTTP::Get.new(uri.request_uri)
381
383
  req["User-Agent"] = NicInfo::VERSION_LABEL
382
384
  req["Accept"] = NicInfo::JSON_CONTENT_TYPE
@@ -937,7 +939,7 @@ HELP_SUMMARY
937
939
 
938
940
  # Creates a query type
939
941
  def create_resource_url(args, queryType)
940
-
942
+ p = URI::Parser.new
941
943
  path = ""
942
944
  case queryType
943
945
  when QueryType::BY_IP4_ADDR
@@ -959,15 +961,15 @@ HELP_SUMMARY
959
961
  path = tree.find_rest_ref(args[0])
960
962
  raise ArgumentError.new("Unable to find result for " + args[0]) unless path
961
963
  when QueryType::BY_ENTITY_HANDLE
962
- path << "entity/" << URI.escape( args[ 0 ] )
964
+ path << "entity/" << p.escape( args[ 0 ] )
963
965
  when QueryType::SRCH_ENTITY_BY_NAME
964
966
  case args.length
965
967
  when 1
966
- path << "entities?fn=" << URI.escape( args[ 0 ] )
968
+ path << "entities?fn=" << p.escape( args[ 0 ] )
967
969
  when 2
968
- path << "entities?fn=" << URI.escape( args[ 0 ] + " " + args[ 1 ] )
970
+ path << "entities?fn=" << p.escape( args[ 0 ] + " " + args[ 1 ] )
969
971
  when 3
970
- path << "entities?fn=" << URI.escape( args[ 0 ] + " " + args[ 1 ] + " " + args[ 2 ] )
972
+ path << "entities?fn=" << p.escape( args[ 0 ] + " " + args[ 1 ] + " " + args[ 2 ] )
971
973
  end
972
974
  when QueryType::SRCH_DOMAIN_BY_NAME
973
975
  path << "domains?name=" << args[ 0 ]
data/lib/nicinfo/utils.rb CHANGED
@@ -20,8 +20,9 @@ require 'nicinfo/config'
20
20
  module NicInfo
21
21
 
22
22
  def NicInfo.make_safe( url )
23
- safe = URI.escape( url )
24
- safe = URI.escape( safe, "!*'();:@&=+$,/?#[]" )
23
+ p = URI::Parser.new
24
+ safe = p.escape( url )
25
+ safe = p.escape( safe, "!*'();:@&=+$,/?#[]" )
25
26
  return safe
26
27
  end
27
28
 
metadata CHANGED
@@ -1,14 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nicinfo
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.0
4
+ version: 1.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Newton
8
- autorequire:
8
+ - Garth Dubin
9
+ autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
- date: 2021-03-15 00:00:00.000000000 Z
12
+ date: 2022-09-29 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: netaddr
@@ -53,7 +54,7 @@ dependencies:
53
54
  - !ruby/object:Gem::Version
54
55
  version: 0.8.3
55
56
  description: A command-line RDAP client.
56
- email: andy@arin.net
57
+ email: gdubin@arin.net
57
58
  executables:
58
59
  - nicinfo
59
60
  extensions: []
@@ -114,7 +115,7 @@ homepage: https://github.com/arinlabs/nicinfo
114
115
  licenses:
115
116
  - ISC
116
117
  metadata: {}
117
- post_install_message:
118
+ post_install_message:
118
119
  rdoc_options: []
119
120
  require_paths:
120
121
  - lib
@@ -129,8 +130,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
129
130
  - !ruby/object:Gem::Version
130
131
  version: '0'
131
132
  requirements: []
132
- rubygems_version: 3.0.3
133
- signing_key:
133
+ rubygems_version: 3.3.3
134
+ signing_key:
134
135
  specification_version: 4
135
136
  summary: RDAP Client
136
137
  test_files: []