isup 0.0.2 → 0.0.3
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.
- checksums.yaml +8 -8
- data/lib/isup.rb +3 -11
- metadata +3 -17
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZGE0ZTdkZmFjODcwN2RmZmJlOGY0YzA2NmI1MWEzOWE2MTBhZGFhZQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
Y2EwMWVmNmE2NzhkYWFkY2JkOWJlNzg2NDEzYTkyMjhjODVmZGIyNw==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NWQ4ZGM0MzUxYjQ3YzdmMDM4YjA1YjEzMDIxZTUyZTg4MjM3ZDg3ZGM3ODk0
|
10
|
+
MzJhNDBhZTlhNjI1Mzg2ZWIwYWUyOWY3YmMzYzNkMWJkZWEwNDFlMWMyMDI5
|
11
|
+
OTkwNmI0Yjk2ZWI5MjcwZjhhM2ZmNjQ4YzJhMTI2MjQ2MzVlZWI=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MWRjMTdmNTY3MTVjMDJiODg5YjQyNDFmZmVkMjE3NjBlOTRmNjYxYzEwOGIx
|
14
|
+
MTkzOWIwMzBjNTUwODY5NDMxZGQ5MzY3NTIxOGFjM2FkNTI1ODcwNmRjZTRk
|
15
|
+
NDMxOThjZDRiNWEwY2FiMWZmNzZiZTZkODc1MjlhNGQwYjZlMWE=
|
data/lib/isup.rb
CHANGED
@@ -1,5 +1,4 @@
|
|
1
1
|
require "net/http"
|
2
|
-
require "colorize"
|
3
2
|
|
4
3
|
# A simple class to determine whether a website is down.
|
5
4
|
class Isup
|
@@ -16,18 +15,11 @@ class Isup
|
|
16
15
|
@response = Net::HTTP.get_response(URI(uri_str))
|
17
16
|
case @response
|
18
17
|
when Net::HTTPSuccess then
|
19
|
-
|
20
|
-
print "is "
|
21
|
-
print "UP\n".red
|
18
|
+
puts "#{@url} is UP"
|
22
19
|
when Net::HTTPClientError then
|
23
|
-
|
24
|
-
print "is "
|
25
|
-
print "DOWN\n".red
|
20
|
+
puts "#{@url} is DOWN"
|
26
21
|
when Net::HTTPServerError then
|
27
|
-
|
28
|
-
print "is either "
|
29
|
-
print "DOWN".red
|
30
|
-
print ", or your network is.\n"
|
22
|
+
puts "#{@url} is either DOWN, or your network is."
|
31
23
|
when Net::HTTPRedirection then
|
32
24
|
@location = @response['location']
|
33
25
|
fetch(@location, limit - 1)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: isup
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Brinker
|
@@ -9,21 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
date: 2013-04-17 00:00:00.000000000 Z
|
12
|
-
dependencies:
|
13
|
-
- !ruby/object:Gem::Dependency
|
14
|
-
name: colorize
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
-
requirements:
|
17
|
-
- - ! '>='
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: '0'
|
20
|
-
type: :runtime
|
21
|
-
prerelease: false
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
23
|
-
requirements:
|
24
|
-
- - ! '>='
|
25
|
-
- !ruby/object:Gem::Version
|
26
|
-
version: '0'
|
12
|
+
dependencies: []
|
27
13
|
description: A very simple Ruby gem to check whether a site is currently up. It does
|
28
14
|
not currently handle errors properly, and is more of a learning experience for me
|
29
15
|
than anything else. It can be used via the command line with the 'isup' command,
|
@@ -36,7 +22,7 @@ extra_rdoc_files: []
|
|
36
22
|
files:
|
37
23
|
- lib/isup.rb
|
38
24
|
- bin/isup
|
39
|
-
homepage:
|
25
|
+
homepage: https://github.com/AndrewBrinker/isup
|
40
26
|
licenses:
|
41
27
|
- Public Domain
|
42
28
|
metadata: {}
|