securitytrails 0.1.2 → 0.1.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
2
  SHA256:
3
- metadata.gz: 283989ff3a2bf8ee9305be60810335216a2fa3211197093446a549feeea66f7e
4
- data.tar.gz: 91db5d07036bcf5e1c0a43c41a7991ec1ba925db85c1c727d5c25f2d153e9129
3
+ metadata.gz: 37f4714cbaf589bc875b67400c353c2c9171e3c448ef7549a256748715e0f11e
4
+ data.tar.gz: 9c4b17f6a50beffa18476e6c277666e7b26ce2fef2c2c5d189976bd583a5c487
5
5
  SHA512:
6
- metadata.gz: 17e09e312bd2c1fa72ee72fbbd61852b48aa6809c538d1c4d148a0d16145887f91e0289337ec28386b15961285827b52154b7305d0811007f59d4b611591c07d
7
- data.tar.gz: ad56eba45fb851f6a20fad5db9e54045bc73992f4f5437258f5624d510290d0818c9b9eb394ed7e757cefce6a3b2dd241b8005d9129c2e59fb9f248fdc8d5342
6
+ metadata.gz: df7a70cc8942cddc48f1037be64949072c4a468450d5838c537dcd28d7ae07479f46a3e888ed489a356260dfa94ba02dc5b4fe4e4e19b59f0ac556a267e45655
7
+ data.tar.gz: d664ec3b675e95bc3cbccd16b43d48b5fb7d3fb36efa9ad75f602afca7ab3ab1db4bb925c04365ba7e06f749ab39a243311624cf0eb71de0d4afc421d1a6f293
data/README.md CHANGED
@@ -1,5 +1,6 @@
1
1
  # SecurityTrails
2
2
 
3
+ [![Gem Version](https://badge.fury.io/rb/securitytrails.svg)](https://badge.fury.io/rb/securitytrails)
3
4
  [![Build Status](https://travis-ci.org/ninoseki/securitytrails.svg?branch=master)](https://travis-ci.org/ninoseki/securitytrails)
4
5
  [![Codacy Badge](https://api.codacy.com/project/badge/Grade/9637f5ed2b8943c28d9d61db778330fb)](https://www.codacy.com/app/ninoseki/securitytrails)
5
6
  [![Coverage Status](https://coveralls.io/repos/github/ninoseki/securitytrails/badge.svg?branch=master)](https://coveralls.io/github/ninoseki/securitytrails?branch=master)
@@ -66,7 +67,7 @@ api.ips.search("ptr_part = 'ns1'")
66
67
  api.ips.stats("ptr_part = 'amazon.com'")
67
68
  ```
68
69
 
69
- All the API response (JSON / Hash) is wrapped by [Hashie::Mash](https://github.com/intridea/hashie#mash).
70
+ All the API response (JSON / Hash) is wrapped by [OpenStruct](https://github.com/ruby/ostruct).
70
71
 
71
72
  It means you can access to a response through a property-like syntax.
72
73
 
@@ -78,7 +79,7 @@ puts res.current_dns.a.first_seen # => "2018-09-12"
78
79
 
79
80
  ## Contributing
80
81
 
81
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/securitytrails.
82
+ Bug reports and pull requests are welcome on GitHub at https://github.com/ninoseki/securitytrails.
82
83
 
83
84
  ## License
84
85
 
@@ -39,7 +39,7 @@ module SecurityTrails
39
39
  Net::HTTP.start(HOST, 443, https_options) do |http|
40
40
  response = http.request(req)
41
41
  if response.code == '200'
42
- yield Response.new(JSON.parse(response.body))
42
+ yield JSON.parse(response.body, object_class: Response)
43
43
  else
44
44
  raise(Error, "unsupported response code returned: #{response.code}")
45
45
  end
@@ -1,9 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "hashie"
3
+ require "ostruct"
4
4
 
5
5
  module SecurityTrails
6
- class Response < Hashie::Mash
7
- disable_warnings
8
- end
6
+ class Response < OpenStruct; end
9
7
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SecurityTrails
4
- VERSION = "0.1.2"
4
+ VERSION = "0.1.3"
5
5
  end
@@ -24,8 +24,6 @@ Gem::Specification.new do |spec|
24
24
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
25
25
  spec.require_paths = ["lib"]
26
26
 
27
- spec.add_dependency "hashie", "~> 3.6"
28
-
29
27
  spec.add_development_dependency "bundler", "~> 1.17"
30
28
  spec.add_development_dependency "coveralls", "~> 0.8"
31
29
  spec.add_development_dependency "dotenv", "~> 2.5"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: securitytrails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Manabu Niseki
@@ -10,20 +10,6 @@ bindir: exe
10
10
  cert_chain: []
11
11
  date: 2018-11-01 00:00:00.000000000 Z
12
12
  dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: hashie
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - "~>"
18
- - !ruby/object:Gem::Version
19
- version: '3.6'
20
- type: :runtime
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - "~>"
25
- - !ruby/object:Gem::Version
26
- version: '3.6'
27
13
  - !ruby/object:Gem::Dependency
28
14
  name: bundler
29
15
  requirement: !ruby/object:Gem::Requirement