hudson-remote-api 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/hudson-remote-api.gemspec +1 -1
- data/lib/hudson-remote-api/job.rb +2 -1
- data/test/test_hudson_job.rb +7 -1
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.1
|
data/hudson-remote-api.gemspec
CHANGED
@@ -71,7 +71,8 @@ module Hudson
|
|
71
71
|
@info = get_xml(@xml_api_path)
|
72
72
|
@info_doc = REXML::Document.new(@info)
|
73
73
|
|
74
|
-
if @info_doc.elements["/
|
74
|
+
if @info_doc.elements["/freeStyleProject"]
|
75
|
+
puts "loading build info"
|
75
76
|
@color = @info_doc.elements["/freeStyleProject/color"].text if @info_doc.elements["/freeStyleProject/color"]
|
76
77
|
@last_build = @info_doc.elements["/freeStyleProject/lastBuild/number"].text if @info_doc.elements["/freeStyleProject/lastBuild/number"]
|
77
78
|
@last_completed_build = @info_doc.elements["/freeStyleProject/lastCompletedBuild/number"].text if @info_doc.elements["/freeStyleProject/lastCompletedBuild/number"]
|
data/test/test_hudson_job.rb
CHANGED
@@ -4,6 +4,10 @@ require 'hudson-remote-api.rb'
|
|
4
4
|
|
5
5
|
class TestHudsonJob < Test::Unit::TestCase
|
6
6
|
|
7
|
+
def setup
|
8
|
+
Hudson[:url] = "http://localhost:8080"
|
9
|
+
end
|
10
|
+
|
7
11
|
def test_list
|
8
12
|
assert Hudson::Job.list
|
9
13
|
end
|
@@ -14,6 +18,8 @@ class TestHudsonJob < Test::Unit::TestCase
|
|
14
18
|
|
15
19
|
def test_init
|
16
20
|
# TODO: load job fixtures
|
17
|
-
|
21
|
+
job = Hudson::Job.new('test_job')
|
22
|
+
assert job
|
23
|
+
assert job.last_build, "failed to get last build number"
|
18
24
|
end
|
19
25
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hudson-remote-api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 21
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 0.2.
|
9
|
+
- 1
|
10
|
+
version: 0.2.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Dru Ibarra
|