rhomobile-cijoe 0.2.9 → 0.2.10
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/cijoe.rb +2 -2
- data/lib/cijoe/server.rb +4 -1
- data/lib/cijoe/version.rb +1 -1
- data/lib/cijoe/views/statusTemplate.erb +3 -3
- metadata +3 -3
data/lib/cijoe.rb
CHANGED
@@ -97,11 +97,11 @@ class CIJoe
|
|
97
97
|
|
98
98
|
# Send email notifications if this build failed, or this build
|
99
99
|
# worked after the last one failed
|
100
|
-
if @old_builds[0].failed?
|
100
|
+
if @old_builds[0].failed? && (@old_builds[0].respond_to? :notify_fail)
|
101
101
|
@old_builds[0].notify_fail
|
102
102
|
end
|
103
103
|
|
104
|
-
if @old_builds[0].worked? && @old_builds[1].failed?
|
104
|
+
if @old_builds[0].worked? && @old_builds[1].failed? && (@old_builds[0].respond_to? :notify_recover)
|
105
105
|
@old_builds[0].notify_recover
|
106
106
|
end
|
107
107
|
|
data/lib/cijoe/server.rb
CHANGED
@@ -30,7 +30,10 @@ class CIJoe
|
|
30
30
|
|
31
31
|
# If joe is building, render the statusTemplate with the currentBuild
|
32
32
|
# Otherwise, render it with old_builds[0]
|
33
|
-
erb(:statusTemplate, {},
|
33
|
+
erb(:statusTemplate, {},
|
34
|
+
:joe => @joe,
|
35
|
+
:build => (@joe.building? ? @joe.current_build : @joe.old_builds[0]),
|
36
|
+
:url => CIJoe::Server.host.to_s + ":" + CIJoe::Server.port.to_s )
|
34
37
|
|
35
38
|
end
|
36
39
|
|
data/lib/cijoe/version.rb
CHANGED
@@ -1,16 +1,16 @@
|
|
1
1
|
<%
|
2
2
|
if build.failed?
|
3
|
-
@image =
|
3
|
+
@image = "http://" + url + "/red_bl.gif"
|
4
4
|
@time = pretty_time(build.finished_at)
|
5
5
|
@duration = "in %.2f" % (build.finished_at.to_f - build.started_at.to_f)
|
6
6
|
|
7
7
|
elsif build.worked?
|
8
|
-
@image =
|
8
|
+
@image = "http://" + url + "/green.gif"
|
9
9
|
@time = pretty_time(build.finished_at)
|
10
10
|
@duration = "in %.2f" % (build.finished_at.to_f - build.started_at.to_f)
|
11
11
|
|
12
12
|
else
|
13
|
-
@image =
|
13
|
+
@image = "http://" + url + "/green_off.gif"
|
14
14
|
@time = pretty_time(build.started_at)
|
15
15
|
@duration = "for %.2f" % (Time.now - build.started_at.to_f)
|
16
16
|
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rhomobile-cijoe
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 3
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 0.2.
|
9
|
+
- 10
|
10
|
+
version: 0.2.10
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Chris Wanstrath
|