downtime 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 CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- Y2IxMzQ3N2U2NThhOWFjZTNjYTcwYTY4YmNhNjNmNDc0MmIzYjg4Yg==
4
+ MWU1ZjUwMzdiYWM2ODFjYzJhODUyMjFiOWM5ZDBjNDJhM2ZkM2NhNQ==
5
5
  data.tar.gz: !binary |-
6
- NWVjMDlmZTc3Y2U4NWM3M2MyOWQ5OGY3YmQ3ODBiODNiMDY2Yjc0ZQ==
6
+ NzViNzg5MjdjMDcyMDdkNmUzNmM3N2I4YmE4ZjQ1MWJlZTgzZTE2OQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- N2QxMWViYWI0YmU4NjA3OWJhMjQ0NmZjN2ZkY2MxNmIzOGYxNzk4ZTU2MWRh
10
- ODdhNzNlNGI0NmQ1NDUyZjg2NzcwYWNjMWU4NTliNzY0ZTQ0MzkzMjMzZGM5
11
- MzY0ZWVkYWYwZTMzZGJjYTA4ZjBmNjA3MTY5YzRkMDE5Y2IxMWU=
9
+ N2ZkYjcyZDJiOGNlN2MzOWM2ZDU0MDZhYzEwN2JlZTVmNGY0YjQ4MmZmOGNh
10
+ ZGRhMDYxMTNhMDIwMzAwNjMzZDc1YzIxZTMyN2Q1ZWQ5N2FhNGIyNzBjNzBm
11
+ Y2Q5ZThiMGQxNTQ0YjI5NWU4NzQwY2YwMzAzNTVhZWIxYmMzOGM=
12
12
  data.tar.gz: !binary |-
13
- N2ZmOGExNTY3NzkxYTE5YzBjMzJmNjczOTlhZjA4MjBjOTMzOGQxNmVkOTVj
14
- NDhmYzYwMTI5YmY4Y2VhMjdlYjRiMDk3MDMwNWZmN2E0ZGQyZDJkODNjZTFm
15
- OTA4OGFkNGY2NmI1MDVmMzZhZjAyZDM3NjE0ZGNkZjZkYjY3ZDA=
13
+ MmFiY2U1Y2I1Y2ZkNTI1NjdiN2ZhOWQ5MjYxZDBmNGMzZjQ2NGIyYTc3NzYy
14
+ MjQ0MWM5MTgzNWZjNWFjYzQ4MDUyMWZhNTBmOGYwODk4NzM5OTdiNGY5ZTEz
15
+ ZDkwNTNmZTIxODFkOWE4MDA2NjNmZDUyNWEwYmJiMDczOTc4YzE=
data/LICENSE.txt CHANGED
@@ -1,3 +1,3 @@
1
- Copyright (c) 2015 Felix Wolfsteller
1
+ Copyright (c) 2015 Felix Wolfsteller, Siedlungsgenossenschaft Ökodorf e.G.
2
2
 
3
3
  Released under the GPL 3 (see gpl-3.0.txt) .
data/bin/downtime CHANGED
@@ -2,8 +2,12 @@
2
2
 
3
3
  require 'downtime'
4
4
 
5
+ if ARGV.length
6
+ puts "downtime #{Downtime::VERSION} - updates downtime.log according to output of dig command."
7
+ exit 0
8
+ end
9
+
5
10
  check = Downtime::DowntimeCheck.new
6
- check.perform
7
11
 
8
12
  # I'd like a friendly exit code
9
13
 
@@ -14,3 +18,7 @@ check.perform
14
18
  # Downtime.down_now!
15
19
  # exit 1
16
20
  #end
21
+
22
+ # Semantics are a bit weird, exit 0 if not down
23
+
24
+ exit check.perform ? 0 : 1
@@ -1,3 +1,3 @@
1
1
  module Downtime
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
data/lib/downtime.rb CHANGED
@@ -54,6 +54,7 @@ module Downtime
54
54
  File.open(@log_file, 'w') do |f|
55
55
  f.puts lines
56
56
  end
57
+ up
57
58
  end
58
59
 
59
60
  def is_up? host=nil
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: downtime
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
  - Felix Wolfsteller