reckoner 0.9.2 → 0.9.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.
- data/lib/main.rb +5 -0
- data/lib/reckoner.rb +0 -1
- data/lib/sample.rb +4 -4
- metadata +2 -2
data/lib/main.rb
CHANGED
@@ -16,6 +16,7 @@ with the command line arguments, configuration file and email.
|
|
16
16
|
=end
|
17
17
|
|
18
18
|
class Main
|
19
|
+
VERSION = '0.9.3'
|
19
20
|
include SampleFile
|
20
21
|
|
21
22
|
DEFAULT_ARGUMENTS = {
|
@@ -52,6 +53,10 @@ class Main
|
|
52
53
|
o.on('-s FILE','--sample-config FILE', 'Create a sample config named FILE') do |sample|
|
53
54
|
@arguments['sample'] = sample
|
54
55
|
end
|
56
|
+
o.on('-v', '--version', 'Display version string') do |v|
|
57
|
+
puts "Ruby Reckoner version #{Main::VERSION}"
|
58
|
+
exit
|
59
|
+
end
|
55
60
|
end
|
56
61
|
@opt_parser.parse!(@argv)
|
57
62
|
end
|
data/lib/reckoner.rb
CHANGED
data/lib/sample.rb
CHANGED
@@ -2,7 +2,7 @@ module SampleFile
|
|
2
2
|
SAMPLE_CONFIGURATION_FILE = <<SAMPLE
|
3
3
|
# SAMPLE RECKONER CONFIGURATION FILES
|
4
4
|
# Reckoner uses a YAML formatted file to define the checks
|
5
|
-
# that it should
|
5
|
+
# that it should perform. The file has two sections,
|
6
6
|
# the 'check' section and the 'mail' section.
|
7
7
|
|
8
8
|
# The check section contains a list of check blocks, each
|
@@ -19,12 +19,12 @@ check:
|
|
19
19
|
|
20
20
|
# This is the simplest possible check. It simply ensures
|
21
21
|
# that there exists a file named '.bash_history'. Since this
|
22
|
-
#
|
22
|
+
# check doesn't overwrite the default 'base_path' it will
|
23
23
|
# check for this file in '/home/geoffk'
|
24
24
|
geoff_check:
|
25
25
|
files: .bash_history
|
26
26
|
|
27
|
-
# This check block, named 'etc-files', sets
|
27
|
+
# This check block, named 'etc-files', sets its own base
|
28
28
|
# path of '/etc' and then checks that two files,
|
29
29
|
# 'redhat-release' and 'inittab', exist there. Note the
|
30
30
|
# use of square brackets and the comma to make a list of files.
|
@@ -32,7 +32,7 @@ check:
|
|
32
32
|
base_path: /etc
|
33
33
|
files: [fake-file, inittab]
|
34
34
|
|
35
|
-
# This check ensures that two files exist and that they
|
35
|
+
# This check ensures that two files exist and that they are
|
36
36
|
# at least 1kb in size and have been updated in the last
|
37
37
|
# three days.
|
38
38
|
desktop-files:
|