gocd 0.2 → 0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 73f02afa4f1563b4fc200676645ab8047153b75e
4
- data.tar.gz: 7d25be9fbfe3c95a416512843dc5bed296da824d
3
+ metadata.gz: eb8cc75660538f245ab31ed03d65e10fcedf3acd
4
+ data.tar.gz: 89c749cb9ee39222f2f44612a468049285a61651
5
5
  SHA512:
6
- metadata.gz: 50d506196fffd2f73f7fd2dfe4e82850dc0281655368ce473b9c2bbebd92d01786a4ebcde9f7da90fc0520968f83d782132c017cf790d32522dee4b0c72b137a
7
- data.tar.gz: bdca6eb4b5c49d67b6e09be596dbc05393d0ae5943eb424c179be0ff3105d6986fdbbf681fc64a902a5da2524d7783f2bbf3f8716c94aa894975dfce30783cab
6
+ metadata.gz: f9f479eb3dddc85d799301a07ca3bed165f9318f37fcdca47ebdabcb806da725d54975d974f2091c4aac500d5e1394e4159fba3b1c4b43db35ad1faa2b65da00
7
+ data.tar.gz: 46219dfbcdae3514732103f784c820b2df79de33de946e23963ccd2a6fec2caff145deb286aae698605116b6a7ed156db280057ce7e6ed90561c1050a1dcfb5a
@@ -26,4 +26,37 @@ module GOCD
26
26
  end
27
27
  end
28
28
  end
29
+
30
+ class PipelineGroup
31
+ def initialize(pipelines)
32
+ @pipelines = pipelines
33
+ end
34
+
35
+ def information_available?
36
+ !pipelines.nil?
37
+ end
38
+
39
+ def red_pipelines
40
+ pipelines.select { |pipeline| pipeline.red? }
41
+ end
42
+
43
+ def green_pipelines
44
+ pipelines.select { |pipeline| pipeline.green? }
45
+ end
46
+
47
+ def status
48
+ pipelines.map { |pipeline| pipeline.status }
49
+ end
50
+
51
+ def any_red?
52
+ !red_pipelines.empty?
53
+ end
54
+
55
+ def pipelines
56
+ all_pipelines = GOCD::PipelineRepository.pipelines
57
+ @pipelines.map do |pipeline|
58
+ all_pipelines.find { |p| p.name == pipeline }
59
+ end
60
+ end
61
+ end
29
62
  end
@@ -1,3 +1,3 @@
1
1
  module GOCD
2
- VERSION = "0.2"
2
+ VERSION = '0.3'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gocd
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.2'
4
+ version: '0.3'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ajit Singh