buildmeister 1.1.2 → 1.1.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/VERSION +1 -1
- data/bin/buildmeister +7 -8
- data/lib/buildmeister/base.rb +20 -4
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.1.
|
1
|
+
1.1.3
|
data/bin/buildmeister
CHANGED
@@ -3,15 +3,14 @@
|
|
3
3
|
require File.expand_path(File.dirname(__FILE__) + "/../lib/buildmeister")
|
4
4
|
|
5
5
|
begin
|
6
|
-
|
7
|
-
|
8
|
-
ARGV.clear
|
9
|
-
|
10
|
-
Buildmeister::Base.new(*args).send command
|
6
|
+
bm = Buildmeister::Base.new(*ARGV.dup)
|
7
|
+
bm.go!
|
11
8
|
rescue Interrupt => i
|
12
|
-
|
13
|
-
|
14
|
-
|
9
|
+
if bm.command == 'notify'
|
10
|
+
Buildmeister::Notifier.post("Buildmeister Shut Down", "Goodbye!")
|
11
|
+
puts "\rThank you for using Buildmeister!"
|
12
|
+
end
|
13
|
+
rescue StandardError => e
|
15
14
|
Buildmeister::Notifier.post("Buildmeister Error: #{e.class}", e.message)
|
16
15
|
puts "Quitting Buildmeister due to error: #{e.message}"
|
17
16
|
puts e.backtrace
|
data/lib/buildmeister/base.rb
CHANGED
@@ -7,10 +7,9 @@ module Buildmeister
|
|
7
7
|
|
8
8
|
RETRY_COUNT = 5
|
9
9
|
|
10
|
-
attr_accessor :projects, :notification_interval, :
|
10
|
+
attr_accessor :projects, :notification_interval, :command
|
11
11
|
|
12
12
|
def initialize(*args)
|
13
|
-
self.args = args
|
14
13
|
@options = {:mode => :verbose}
|
15
14
|
|
16
15
|
OptionParser.new do |opts|
|
@@ -31,6 +30,16 @@ module Buildmeister
|
|
31
30
|
opts.on('-p', '--project PROJECT', 'Use Project') do |p|
|
32
31
|
@options[:project] = p
|
33
32
|
end
|
33
|
+
|
34
|
+
opts.on_tail("-h", "--help", "Show this message") do
|
35
|
+
puts opts
|
36
|
+
exit
|
37
|
+
end
|
38
|
+
|
39
|
+
if args.empty?
|
40
|
+
puts opts
|
41
|
+
exit
|
42
|
+
end
|
34
43
|
end.parse!(args)
|
35
44
|
|
36
45
|
# Lighthouse setup
|
@@ -53,10 +62,17 @@ module Buildmeister
|
|
53
62
|
end
|
54
63
|
|
55
64
|
self.notification_interval = @config['notification_interval']
|
65
|
+
|
66
|
+
# Did we pass in a command?
|
67
|
+
self.command = args.first
|
68
|
+
end
|
69
|
+
|
70
|
+
def go!
|
71
|
+
send command if command
|
56
72
|
end
|
57
73
|
|
58
74
|
def changed?
|
59
|
-
projects.any?
|
75
|
+
projects.any?(&:changed?)
|
60
76
|
end
|
61
77
|
|
62
78
|
def title
|
@@ -144,7 +160,7 @@ module Buildmeister
|
|
144
160
|
end
|
145
161
|
|
146
162
|
def refresh!
|
147
|
-
projects.each
|
163
|
+
projects.each(&:refresh!)
|
148
164
|
end
|
149
165
|
|
150
166
|
def self.load_config
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 1
|
7
7
|
- 1
|
8
|
-
-
|
9
|
-
version: 1.1.
|
8
|
+
- 3
|
9
|
+
version: 1.1.3
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Leigh Caplan
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-
|
17
|
+
date: 2010-06-01 00:00:00 -07:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|