bamboo-client 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
data/bamboo-client.gemspec
CHANGED
@@ -15,7 +15,7 @@ Gem::Specification.new do |s|
|
|
15
15
|
s.rubyforge_project = "bamboo-client"
|
16
16
|
|
17
17
|
s.add_development_dependency "rspec"
|
18
|
-
s.add_development_dependency "cucumber"
|
18
|
+
s.add_development_dependency "cucumber", ">= 0.10.0"
|
19
19
|
s.add_development_dependency "simplecov"
|
20
20
|
|
21
21
|
s.add_dependency "rest-client"
|
data/lib/bamboo-client/rest.rb
CHANGED
@@ -8,9 +8,10 @@ module Bamboo
|
|
8
8
|
#
|
9
9
|
|
10
10
|
class Rest < Abstract
|
11
|
+
SERVICE = "/rest/api/latest"
|
12
|
+
|
11
13
|
def initialize(http)
|
12
14
|
super
|
13
|
-
@service = "/rest/api/latest"
|
14
15
|
end
|
15
16
|
|
16
17
|
def plans
|
@@ -28,7 +29,7 @@ module Bamboo
|
|
28
29
|
private
|
29
30
|
|
30
31
|
def get(what)
|
31
|
-
@http.get File.join(
|
32
|
+
@http.get File.join(SERVICE, what)
|
32
33
|
end
|
33
34
|
|
34
35
|
class Plan
|
@@ -56,6 +57,10 @@ module Bamboo
|
|
56
57
|
def url
|
57
58
|
@data.fetch("link")['href']
|
58
59
|
end
|
60
|
+
|
61
|
+
def queue
|
62
|
+
@http.post File.join(SERVICE, "queue/#{key}")
|
63
|
+
end
|
59
64
|
end # Plan
|
60
65
|
|
61
66
|
class Project
|
@@ -58,6 +58,11 @@ module Bamboo
|
|
58
58
|
it "has a URL" do
|
59
59
|
plan.url.should == "http://xserve.openqa.org:8085/rest/api/latest/plan/S2RB-REMWIN"
|
60
60
|
end
|
61
|
+
|
62
|
+
it "can be queued" do
|
63
|
+
http.should_receive(:post).with("/rest/api/latest/queue/S2RB-REMWIN")
|
64
|
+
plan.queue
|
65
|
+
end
|
61
66
|
end # Plan
|
62
67
|
|
63
68
|
describe Rest::Project do
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: bamboo-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.0.
|
5
|
+
version: 0.0.6
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Jari Bakken
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2011-
|
13
|
+
date: 2011-03-15 00:00:00 +01:00
|
14
14
|
default_executable:
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
@@ -32,7 +32,7 @@ dependencies:
|
|
32
32
|
requirements:
|
33
33
|
- - ">="
|
34
34
|
- !ruby/object:Gem::Version
|
35
|
-
version:
|
35
|
+
version: 0.10.0
|
36
36
|
type: :development
|
37
37
|
version_requirements: *id002
|
38
38
|
- !ruby/object:Gem::Dependency
|