bamboo-client 0.1.1 → 0.1.2

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/.travis.yml CHANGED
@@ -1,3 +1,4 @@
1
+ language: ruby
1
2
  rvm:
2
3
  - 1.8.7
3
4
  - 1.9.2
@@ -45,6 +45,10 @@ module Bamboo
45
45
  get("result/#{URI.escape key}").auto_expand Result, @http
46
46
  end
47
47
 
48
+ def plan_for(key)
49
+ Plan.new get("plan/#{URI.escape key}").data, @http
50
+ end
51
+
48
52
  private
49
53
 
50
54
  def get(what, params = nil)
@@ -1,5 +1,5 @@
1
1
  module Bamboo
2
2
  module Client
3
- VERSION = "0.1.1"
3
+ VERSION = "0.1.2"
4
4
  end
5
5
  end
@@ -57,6 +57,15 @@ module Bamboo
57
57
  client.results_for("SOME-KEY").should == %w[foo bar]
58
58
  end
59
59
 
60
+ it "should be able to fetch a plan for a specific key" do
61
+ document.should_receive(:data).and_return('some' => 'data')
62
+
63
+ http.should_receive(:get).with("/rest/api/latest/plan/SOME-KEY", nil, nil).
64
+ and_return(document)
65
+
66
+ client.plan_for("SOME-KEY").should be_kind_of(Rest::Plan)
67
+ end
68
+
60
69
  describe Rest::Plan do
61
70
  let(:data) { json_fixture("plan") }
62
71
  let(:plan) { Rest::Plan.new data, http }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bamboo-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2012-06-18 00:00:00.000000000 Z
13
+ date: 2012-09-06 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rspec