gocd 0.2 → 0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/gocd/pipelines.rb +33 -0
- data/lib/gocd/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eb8cc75660538f245ab31ed03d65e10fcedf3acd
|
4
|
+
data.tar.gz: 89c749cb9ee39222f2f44612a468049285a61651
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f9f479eb3dddc85d799301a07ca3bed165f9318f37fcdca47ebdabcb806da725d54975d974f2091c4aac500d5e1394e4159fba3b1c4b43db35ad1faa2b65da00
|
7
|
+
data.tar.gz: 46219dfbcdae3514732103f784c820b2df79de33de946e23963ccd2a6fec2caff145deb286aae698605116b6a7ed156db280057ce7e6ed90561c1050a1dcfb5a
|
data/lib/gocd/pipelines.rb
CHANGED
@@ -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
|
data/lib/gocd/version.rb
CHANGED