hudson-remote-api 0.2.0 → 0.2.1

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 CHANGED
@@ -1 +1 @@
1
- 0.2.0
1
+ 0.2.1
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{hudson-remote-api}
8
- s.version = "0.2.0"
8
+ s.version = "0.2.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Dru Ibarra"]
@@ -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["/freeStylePorject"]
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"]
@@ -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
- #assert Hudson::Job.new('test_job')
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: 23
4
+ hash: 21
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 0
10
- version: 0.2.0
9
+ - 1
10
+ version: 0.2.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Dru Ibarra