hudson-remote-api 0.3.2 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.2
1
+ 0.4.0
@@ -1,55 +1,46 @@
1
1
  # Generated by jeweler
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{hudson-remote-api}
8
- s.version = "0.3.2"
8
+ s.version = "0.4.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = [%q{Dru Ibarra}]
12
- s.date = %q{2011-10-10}
12
+ s.date = %q{2012-03-02}
13
13
  s.description = %q{Connect to Hudson's remote web API}
14
14
  s.email = %q{Druwerd@gmail.com}
15
15
  s.extra_rdoc_files = [
16
16
  "LICENSE",
17
- "README"
17
+ "README"
18
18
  ]
19
19
  s.files = [
20
- ".gitignore",
21
- "LICENSE",
22
- "README",
23
- "Rakefile",
24
- "VERSION",
25
- "hudson-remote-api.gemspec",
26
- "lib/hudson-remote-api.rb",
27
- "lib/hudson-remote-api/build.rb",
28
- "lib/hudson-remote-api/build_queue.rb",
29
- "lib/hudson-remote-api/config.rb",
30
- "lib/hudson-remote-api/errors.rb",
31
- "lib/hudson-remote-api/job.rb",
32
- "lib/hudson-remote-api/multicast.rb",
33
- "lib/hudson-remote-api/new_job_config.xml",
34
- "test/test_hudson_build.rb",
35
- "test/test_hudson_build_queue.rb",
36
- "test/test_hudson_config.rb",
37
- "test/test_hudson_job.rb",
38
- "test/test_hudson_multicast.rb"
20
+ "LICENSE",
21
+ "README",
22
+ "Rakefile",
23
+ "VERSION",
24
+ "hudson-remote-api.gemspec",
25
+ "lib/hudson-remote-api.rb",
26
+ "lib/hudson-remote-api/build.rb",
27
+ "lib/hudson-remote-api/build_queue.rb",
28
+ "lib/hudson-remote-api/config.rb",
29
+ "lib/hudson-remote-api/errors.rb",
30
+ "lib/hudson-remote-api/job.rb",
31
+ "lib/hudson-remote-api/multicast.rb",
32
+ "lib/hudson-remote-api/new_job_config.xml",
33
+ "test/test_hudson_build.rb",
34
+ "test/test_hudson_build_queue.rb",
35
+ "test/test_hudson_config.rb",
36
+ "test/test_hudson_job.rb",
37
+ "test/test_hudson_multicast.rb"
39
38
  ]
40
39
  s.homepage = %q{http://github.com/Druwerd/hudson-remote-api}
41
- s.rdoc_options = [%q{--charset=UTF-8}]
42
40
  s.require_paths = [%q{lib}]
43
41
  s.rubyforge_project = %q{hudson-remote-api}
44
- s.rubygems_version = %q{1.8.5}
42
+ s.rubygems_version = %q{1.8.6}
45
43
  s.summary = %q{Connect to Hudson's remote web API}
46
- s.test_files = [
47
- "test/test_hudson_build.rb",
48
- "test/test_hudson_build_queue.rb",
49
- "test/test_hudson_config.rb",
50
- "test/test_hudson_job.rb",
51
- "test/test_hudson_multicast.rb"
52
- ]
53
44
 
54
45
  if s.respond_to? :specification_version then
55
46
  s.specification_version = 3
@@ -4,6 +4,7 @@ module Hudson
4
4
 
5
5
  attr_accessor :name, :config, :repository_url, :repository_urls, :repository_browser_location, :description
6
6
  attr_reader :color, :last_build, :last_completed_build, :last_failed_build, :last_stable_build, :last_successful_build, :last_unsuccessful_build, :next_build_number
7
+ attr_reader :builds_list
7
8
 
8
9
  # List all Hudson jobs
9
10
  def self.list()
@@ -104,6 +105,11 @@ module Hudson
104
105
  @last_unsuccessful_build = @info_doc.elements["/freeStyleProject/lastUnsuccessfulBuild/number"].text if @info_doc.elements["/freeStyleProject/lastUnsuccessfulBuild/number"]
105
106
  @next_build_number = @info_doc.elements["/freeStyleProject/nextBuildNumber"].text if @info_doc.elements["/freeStyleProject/nextBuildNumber"]
106
107
  end
108
+
109
+ if !@info_doc.elements["/freeStyleProject/build"].nil?
110
+ @builds_list = []
111
+ @info_doc.elements.each("/freeStyleProject/build"){|e| @builds_list << e.elements["number"].text }
112
+ end
107
113
  end
108
114
 
109
115
  def active?
@@ -66,4 +66,9 @@ class TestHudsonJob < Test::Unit::TestCase
66
66
  assert job.name
67
67
  assert job.delete
68
68
  end
69
+
70
+ def test_builds_list
71
+ job = Hudson::Job.get("test_job")
72
+ assert job.builds_list.kind_of?(Array)
73
+ end
69
74
  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: 15
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
- - 3
9
- - 2
10
- version: 0.3.2
8
+ - 4
9
+ - 0
10
+ version: 0.4.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Dru Ibarra
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-10-10 00:00:00 Z
18
+ date: 2012-03-02 00:00:00 Z
19
19
  dependencies: []
20
20
 
21
21
  description: Connect to Hudson's remote web API
@@ -28,7 +28,6 @@ extra_rdoc_files:
28
28
  - LICENSE
29
29
  - README
30
30
  files:
31
- - .gitignore
32
31
  - LICENSE
33
32
  - README
34
33
  - Rakefile
@@ -51,8 +50,8 @@ homepage: http://github.com/Druwerd/hudson-remote-api
51
50
  licenses: []
52
51
 
53
52
  post_install_message:
54
- rdoc_options:
55
- - --charset=UTF-8
53
+ rdoc_options: []
54
+
56
55
  require_paths:
57
56
  - lib
58
57
  required_ruby_version: !ruby/object:Gem::Requirement
@@ -76,13 +75,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
76
75
  requirements: []
77
76
 
78
77
  rubyforge_project: hudson-remote-api
79
- rubygems_version: 1.8.5
78
+ rubygems_version: 1.8.6
80
79
  signing_key:
81
80
  specification_version: 3
82
81
  summary: Connect to Hudson's remote web API
83
- test_files:
84
- - test/test_hudson_build.rb
85
- - test/test_hudson_build_queue.rb
86
- - test/test_hudson_config.rb
87
- - test/test_hudson_job.rb
88
- - test/test_hudson_multicast.rb
82
+ test_files: []
83
+
data/.gitignore DELETED
@@ -1 +0,0 @@
1
- hudson_settings.yml