makesure 0.0.3 → 0.0.4

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/bin/makesure CHANGED
@@ -62,6 +62,8 @@ Makesure.alert_options = {
62
62
 
63
63
  Makesure.uid = "nobody" # what user should makesure run its tasks as (this can be set per system as well)
64
64
 
65
+ # Makesure.chdir = '/some/path...' # where should makesure run commands (defaults to File.dirname(Makesurefile))
66
+
65
67
  # Tell makesure about your systems
66
68
  Dir['systems/*.rb', 'lib/systems/*.rb'].each { |sys| load(sys) }
67
69
  FILE
data/bin/makesure-runner CHANGED
@@ -48,7 +48,6 @@ when 'verify'
48
48
 
49
49
  Makesure.log "Running verify #{sys} #{vrfy}"
50
50
  verify.run!
51
- Makesure.log "Everything is copacetic"
52
51
 
53
52
  when 'summarize'
54
53
  sys = ARGV[1]
data/lib/makesure/cron.rb CHANGED
@@ -20,7 +20,7 @@ module Makesure
20
20
  end
21
21
 
22
22
  def build_crontab_output
23
- chdir = File.dirname(Makesure.makesurefile)
23
+ chdir = Makesure.chdir || File.dirname(Makesure.makesurefile)
24
24
  crontab = ""
25
25
  crontab << "# Autogenerated by makesure: you probably don't want to edit this file\n"
26
26
  Makesure.systems.each do |s|
@@ -14,6 +14,7 @@ module Makesure
14
14
  begin
15
15
 
16
16
  blk.call
17
+ Makesure.log "Everything is copacetic"
17
18
 
18
19
  rescue Exception => e
19
20
  Makesure.warn "Uh oh, something's up"
@@ -2,7 +2,7 @@ module Makesure
2
2
  module Version
3
3
  MAJOR = 0
4
4
  MINOR = 0
5
- PATCH = 3
5
+ PATCH = 4
6
6
 
7
7
  STRING = [MAJOR, MINOR, PATCH].compact.join('.')
8
8
  end
data/lib/makesure.rb CHANGED
@@ -17,6 +17,7 @@ module Makesure
17
17
 
18
18
  # global options
19
19
  attr_accessor :uid,
20
+ :chdir,
20
21
  :alert_options,
21
22
  :log_level
22
23
 
data/makesure.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{makesure}
8
- s.version = "0.0.3"
8
+ s.version = "0.0.4"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Eric Waller"]
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 3
9
- version: 0.0.3
8
+ - 4
9
+ version: 0.0.4
10
10
  platform: ruby
11
11
  authors:
12
12
  - Eric Waller
@@ -147,7 +147,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
147
147
  requirements:
148
148
  - - ">="
149
149
  - !ruby/object:Gem::Version
150
- hash: 398102319
150
+ hash: 963416349
151
151
  segments:
152
152
  - 0
153
153
  version: "0"