makesure 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
data/TODO ADDED
@@ -0,0 +1 @@
1
+ * Use Process#spawn or Open3#popen3 so we can capture stderr
data/bin/makesure-runner CHANGED
@@ -48,6 +48,7 @@ when 'verify'
48
48
 
49
49
  Makesure.log "Running verify #{sys} #{vrfy}"
50
50
  verify.run!
51
+ Makesure.log "Everything is copacetic"
51
52
 
52
53
  when 'summarize'
53
54
  sys = ARGV[1]
data/lib/makesure/cron.rb CHANGED
@@ -20,6 +20,7 @@ module Makesure
20
20
  end
21
21
 
22
22
  def build_crontab_output
23
+ chdir = File.dirname(Makesure.makesurefile)
23
24
  crontab = ""
24
25
  crontab << "# Autogenerated by makesure: you probably don't want to edit this file\n"
25
26
  Makesure.systems.each do |s|
@@ -30,12 +31,14 @@ module Makesure
30
31
  s.cmds.each do |c|
31
32
  crontab << "#{c.cron}\t"
32
33
  crontab << "#{uid} " if uid
34
+ crontab << "cd #{chdir} && "
33
35
  crontab << "makesure-runner run #{c.command.inspect}\n"
34
36
  end
35
37
  crontab << "# Verification\n"
36
38
  s.verifies.each do |v|
37
39
  crontab << "#{v.cron}\t"
38
40
  crontab << "#{uid} " if uid
41
+ crontab << "cd #{chdir} && "
39
42
  crontab << "makesure-runner verify #{s.name} #{v.name}\n"
40
43
  end
41
44
  # TODO summarizes
@@ -2,7 +2,7 @@ module Makesure
2
2
  module Version
3
3
  MAJOR = 0
4
4
  MINOR = 0
5
- PATCH = 2
5
+ PATCH = 3
6
6
 
7
7
  STRING = [MAJOR, MINOR, PATCH].compact.join('.')
8
8
  end
data/lib/makesure.rb CHANGED
@@ -20,9 +20,13 @@ module Makesure
20
20
  :alert_options,
21
21
  :log_level
22
22
 
23
+ def makesurefile
24
+ File.expand_path(File.join(Dir.pwd, "Makesurefile"))
25
+ end
26
+
23
27
  def load_system_defs
24
- file = File.join(Dir.pwd, "Makesurefile")
25
- Makesure.log("Loading #{file}")
28
+ file = makesurefile
29
+ Makesure.log("Loading Makesurefile")
26
30
  load(file)
27
31
  abort "No system specifications found" unless Makesure.systems.size > 0
28
32
  Makesure.log "Loaded #{Makesure.systems.size} system specifications"
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.2"
8
+ s.version = "0.0.3"
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"]
@@ -15,7 +15,8 @@ Gem::Specification.new do |s|
15
15
  s.executables = ["makesure", "makesure-runner"]
16
16
  s.extra_rdoc_files = [
17
17
  "LICENSE.txt",
18
- "README.rdoc"
18
+ "README.rdoc",
19
+ "TODO"
19
20
  ]
20
21
  s.files = [
21
22
  ".bundle/config",
@@ -24,6 +25,7 @@ Gem::Specification.new do |s|
24
25
  "LICENSE.txt",
25
26
  "README.rdoc",
26
27
  "Rakefile",
28
+ "TODO",
27
29
  "bin/makesure",
28
30
  "bin/makesure-runner",
29
31
  "lib/makesure.rb",
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 2
9
- version: 0.0.2
8
+ - 3
9
+ version: 0.0.3
10
10
  platform: ruby
11
11
  authors:
12
12
  - Eric Waller
@@ -111,6 +111,7 @@ extensions: []
111
111
  extra_rdoc_files:
112
112
  - LICENSE.txt
113
113
  - README.rdoc
114
+ - TODO
114
115
  files:
115
116
  - .bundle/config
116
117
  - Gemfile
@@ -118,6 +119,7 @@ files:
118
119
  - LICENSE.txt
119
120
  - README.rdoc
120
121
  - Rakefile
122
+ - TODO
121
123
  - bin/makesure
122
124
  - bin/makesure-runner
123
125
  - lib/makesure.rb
@@ -145,7 +147,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
145
147
  requirements:
146
148
  - - ">="
147
149
  - !ruby/object:Gem::Version
148
- hash: -201522179
150
+ hash: 398102319
149
151
  segments:
150
152
  - 0
151
153
  version: "0"