checkup 0.0.4 → 0.0.5

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.
@@ -1,18 +1,12 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- checkup (0.0.1)
5
- httparty
4
+ checkup (0.0.4)
6
5
  thor (~> 0.14.6)
7
6
 
8
7
  GEM
9
8
  remote: http://rubygems.org/
10
9
  specs:
11
- httparty (0.9.0)
12
- multi_json (~> 1.0)
13
- multi_xml
14
- multi_json (1.3.6)
15
- multi_xml (0.5.1)
16
10
  thor (0.14.6)
17
11
 
18
12
  PLATFORMS
@@ -0,0 +1,34 @@
1
+ Checkup is a simple service up check. Currently only supports http check and mail notification.
2
+
3
+ Sample configuration file:
4
+
5
+ Checkup::Model.new(:foo, 'foo') do
6
+ service Http do |service|
7
+ service.url = 'http://example.de'
8
+ service.method = :get
9
+ service.expected_code = 200
10
+ service.expected_response = /.+html.+/
11
+ end
12
+
13
+ notify_with Mail do |mail|
14
+ mail.delivery_method = :sendmail
15
+ mail.from = 'info@example.de'
16
+ mail.to = 'bar@example.de'
17
+
18
+ mail.on_success = true
19
+ mail.on_warning = true
20
+ mail.on_failure = true
21
+ end
22
+ end
23
+
24
+ You can execute this via:
25
+
26
+ checkup perform -r /path/to/models -t foo
27
+
28
+ With [whenever](https://github.com/javan/whenever), you can create a crontab to use this regulary:
29
+
30
+ every 5.minutes do
31
+ command "checkup perform -r /var/checkup -t foo"
32
+ end
33
+
34
+ This can be added to the crontab of the current user with `whenever --update-crontab`.
@@ -8,8 +8,9 @@ Gem::Specification.new do |gem|
8
8
  gem.platform = Gem::Platform::RUBY
9
9
  gem.authors = 'Heiko Moeller'
10
10
  gem.email = 'femaref@googlemail.com'
11
- gem.homepage = 'http://rubygems.org/gems/checkup'
12
- gem.summary = ''
11
+ gem.homepage = 'https://github.com/Femaref/checkup'
12
+ gem.summary = 'Small tool to check service status'
13
+ gem.description = 'Checkup is a simple tool to check the status of services, including websites'
13
14
 
14
15
 
15
16
  gem.files = %x[git ls-files].split("\n")
@@ -3,11 +3,24 @@ module Checkup
3
3
  module ErrorsHelper
4
4
  def const_missing(const)
5
5
  if const.to_s.end_with?('Error')
6
- module_eval("class #{const} < Checkup::Errors::Error; end")
6
+ # create new exception class
7
+ module_eval do
8
+ new_class = Class.new Checkup::Errors::Error
9
+ const_set const, new_class
10
+ end
11
+
7
12
  else
8
- module_eval("module #{const}; extend Checkup::ErrorsHelper; end")
13
+
14
+ # dealing with a module here, create it
15
+ module_eval do
16
+ new_module = Module.new do
17
+ extend Checkup::ErrorsHelper
18
+ end
19
+
20
+ const_set const, new_module
21
+ end
9
22
  end
10
- const_get(const)
23
+ const_get const
11
24
  end
12
25
  end
13
26
 
@@ -13,7 +13,7 @@ module Checkup
13
13
  # Defines the minor version
14
14
  # PATCH:
15
15
  # Defines the patch version
16
- MAJOR, MINOR, PATCH = 0, 0, 4
16
+ MAJOR, MINOR, PATCH = 0, 0, 5
17
17
 
18
18
  ##
19
19
  # Returns the major version ( big release based off of multiple minor releases )
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: checkup
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-11-07 00:00:00.000000000 Z
12
+ date: 2012-11-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: thor
@@ -27,7 +27,7 @@ dependencies:
27
27
  - - ~>
28
28
  - !ruby/object:Gem::Version
29
29
  version: 0.14.6
30
- description:
30
+ description: Checkup is a simple tool to check the status of services, including websites
31
31
  email: femaref@googlemail.com
32
32
  executables:
33
33
  - checkup
@@ -37,6 +37,7 @@ files:
37
37
  - .gitignore
38
38
  - Gemfile
39
39
  - Gemfile.lock
40
+ - README.md
40
41
  - bin/checkup
41
42
  - checkup.gemspec
42
43
  - lib/checkup.rb
@@ -60,7 +61,7 @@ files:
60
61
  - lib/checkup/template.rb
61
62
  - lib/checkup/version.rb
62
63
  - templates/notifier/mail/error.erb
63
- homepage: http://rubygems.org/gems/checkup
64
+ homepage: https://github.com/Femaref/checkup
64
65
  licenses: []
65
66
  post_install_message:
66
67
  rdoc_options: []
@@ -83,5 +84,5 @@ rubyforge_project:
83
84
  rubygems_version: 1.8.23
84
85
  signing_key:
85
86
  specification_version: 3
86
- summary: ''
87
+ summary: Small tool to check service status
87
88
  test_files: []