bamboo-cli 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/lib/bamboo.rb +6 -1
  2. data/lib/cli.rb +9 -4
  3. metadata +3 -3
@@ -24,10 +24,15 @@ class Bamboo
24
24
  self.class.post(url)
25
25
  end
26
26
 
27
- def info
27
+ def server
28
28
  self.class.get('/rest/api/latest/info.json')
29
29
  end
30
30
 
31
+ def info(key)
32
+ puts key
33
+ self.class.get('/rest/api/latest/plan/' + key + '.json')
34
+ end
35
+
31
36
  def me
32
37
  self.class.get('/rest/api/latest/currentUser.json')
33
38
  end
data/lib/cli.rb CHANGED
@@ -25,12 +25,17 @@ class Cli < Thor
25
25
  OUT.out BAMBOO.me
26
26
  end
27
27
 
28
- desc "info", "Gets information about the server"
29
- def info
30
- OUT.out BAMBOO.info
28
+ desc "server", "Gets information about the server"
29
+ def server
30
+ OUT.out BAMBOO.server
31
31
  end
32
32
 
33
- desc "queue BUILD-KEY", "Queues the given build"
33
+ desc "info KEY", "Gets the info (including if its building or not) of a plan or job"
34
+ def info(key)
35
+ OUT.out BAMBOO.info(key)
36
+ end
37
+
38
+ desc "queue KEY", "Queues the given build"
34
39
  method_option :allstages, :type => :boolean, :desc => "Execute all stages, including manual stages"
35
40
  method_option :stage, :type => :string, :desc => "name of the stage that should be executed even if defined as manual stage. Execution will follow to the next manual stage after this or end of plan if no subsequent manual stage"
36
41
  def queue(key)
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bamboo-cli
3
3
  version: !ruby/object:Gem::Version
4
- hash: 25
4
+ hash: 23
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 3
10
- version: 0.0.3
9
+ - 4
10
+ version: 0.0.4
11
11
  platform: ruby
12
12
  authors:
13
13
  - James Dumay