checkhost 1.0.1 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/checkhost.rb +3 -6
- metadata +42 -19
- checksums.yaml +0 -7
data/lib/checkhost.rb
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
require 'net/http'
|
3
|
+
require 'open-uri'
|
3
4
|
require 'json'
|
4
5
|
|
5
6
|
class CheckHost
|
@@ -102,13 +103,9 @@ class CheckHost
|
|
102
103
|
|
103
104
|
case action
|
104
105
|
when :newcheck
|
105
|
-
|
106
|
-
api = Net::HTTP.new(uri.host)
|
107
|
-
api.get(uri, headers).body
|
106
|
+
open("http://check-host.net/check-#{data[:type]}?host=#{data[:host]}&max_nodes=#{data[:max_nodes]}", headers) {|io| io.read}
|
108
107
|
when :results
|
109
|
-
|
110
|
-
api = Net::HTTP.new(uri.host)
|
111
|
-
api.get(uri, headers).body
|
108
|
+
open("http://check-host.net/check-result/#{data[:request_id]}", headers) {|io| io.read}
|
112
109
|
end
|
113
110
|
end
|
114
111
|
|
metadata
CHANGED
@@ -1,44 +1,67 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: checkhost
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 19
|
5
|
+
prerelease:
|
6
|
+
segments:
|
7
|
+
- 1
|
8
|
+
- 0
|
9
|
+
- 2
|
10
|
+
version: 1.0.2
|
5
11
|
platform: ruby
|
6
|
-
authors:
|
12
|
+
authors:
|
7
13
|
- Marco Giosa
|
8
14
|
autorequire:
|
9
15
|
bindir: bin
|
10
16
|
cert_chain: []
|
11
|
-
|
17
|
+
|
18
|
+
date: 2015-12-27 00:00:00 Z
|
12
19
|
dependencies: []
|
20
|
+
|
13
21
|
description: Gem to check-host.net public API
|
14
22
|
email: marco.giosa@me.com
|
15
23
|
executables: []
|
24
|
+
|
16
25
|
extensions: []
|
26
|
+
|
17
27
|
extra_rdoc_files: []
|
18
|
-
|
28
|
+
|
29
|
+
files:
|
19
30
|
- lib/checkhost.rb
|
20
31
|
homepage: https://github.com/markkuit/checkhost-ruby
|
21
|
-
licenses:
|
32
|
+
licenses:
|
22
33
|
- MIT
|
23
|
-
metadata: {}
|
24
34
|
post_install_message:
|
25
35
|
rdoc_options: []
|
26
|
-
|
36
|
+
|
37
|
+
require_paths:
|
27
38
|
- lib
|
28
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
29
|
-
|
39
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
40
|
+
none: false
|
41
|
+
requirements:
|
30
42
|
- - ">="
|
31
|
-
- !ruby/object:Gem::Version
|
32
|
-
|
33
|
-
|
34
|
-
|
43
|
+
- !ruby/object:Gem::Version
|
44
|
+
hash: 49
|
45
|
+
segments:
|
46
|
+
- 1
|
47
|
+
- 9
|
48
|
+
- 1
|
49
|
+
version: 1.9.1
|
50
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
51
|
+
none: false
|
52
|
+
requirements:
|
35
53
|
- - ">="
|
36
|
-
- !ruby/object:Gem::Version
|
37
|
-
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
hash: 3
|
56
|
+
segments:
|
57
|
+
- 0
|
58
|
+
version: "0"
|
38
59
|
requirements: []
|
60
|
+
|
39
61
|
rubyforge_project:
|
40
|
-
rubygems_version:
|
62
|
+
rubygems_version: 1.8.30
|
41
63
|
signing_key:
|
42
|
-
specification_version:
|
64
|
+
specification_version: 3
|
43
65
|
summary: Ruby check-host.net API
|
44
66
|
test_files: []
|
67
|
+
|
checksums.yaml
DELETED
@@ -1,7 +0,0 @@
|
|
1
|
-
---
|
2
|
-
SHA1:
|
3
|
-
metadata.gz: c9b4f180f6378286b051148065c51fc9d115e037
|
4
|
-
data.tar.gz: 011f6aa524f8d05cd4136f539f69b52742f1d63d
|
5
|
-
SHA512:
|
6
|
-
metadata.gz: af704a36dd5fe966f5404834de28b821ba0f30c2c53fc84c94494cda31f8b02f144a4a98a47bc9be4ee2b3469261e94be611eca91453887c272131429afd4ce2
|
7
|
-
data.tar.gz: 6d2e86a2b2af96b8fa620d5953198ec037b1dca9557defb6b583c954a421d66a7f5669ededdb5bc0c1a7153f2fd3bc5948012bb304cffdfddcd8597d41bab30b
|