Page MenuHomeDevCentral

D472.diff
No OneTemporary

D472.diff

diff --git a/tommy.rb b/tommy.rb
--- a/tommy.rb
+++ b/tommy.rb
@@ -18,11 +18,11 @@
property :last_complete_url
property :last_failed_url
property :colour
-
+
def self.parse_incoming_json(json)
returned_projects = []
projects = json['jobs']
-
+
projects.each do |project|
next if !project['buildable']
@@ -36,10 +36,10 @@
:last_failed_url => (project['lastFailedBuild'].blank? ? "" : project['lastFailedBuild']['url'] ),
:colour => project['color'])
end
-
+
return returned_projects
end
-
+
def is_green?
self.last_stable_build == self.last_build_number
end
@@ -52,7 +52,7 @@
get '/' do
json = RestClient::Resource.new("#{HUDSON_URL}/api/json?depth=1")
@projects = Project.parse_incoming_json(Crack::JSON.parse(json.get))
-
+
erb :index
end

File Metadata

Mime Type
text/plain
Expires
Tue, Feb 25, 00:23 (7 h, 15 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2435296
Default Alt Text
D472.diff (910 B)

Event Timeline