gocd 1.2.4 → 1.2.5
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.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 593cc65e4e514367d8e90e8e4f0b94b10aab593e
|
4
|
+
data.tar.gz: a67d98d2fb10ad7b7737d9ea5af9bf57737a6108
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 07a84959366c3fb9115fbaa62784eb67ab843b096217103c622114756bba3fbdc94b9b5ba310baea7eb0bb1b6775f373852be0a6afc7aea34ecbf343a04208f6
|
7
|
+
data.tar.gz: 3da89e9e2ceb5a05b235c6b29751286093a2da1cc761f570e6dc6ccf7ddcfc9341f2a2a949594079a84e031254943b485e53109360875355aeed10b0b6abcaef
|
@@ -54,6 +54,18 @@ module GOCD
|
|
54
54
|
|
55
55
|
def pipelines
|
56
56
|
all_pipelines = GOCD::PipelineRepository.pipelines
|
57
|
+
missing_pipelines = []
|
58
|
+
@pipelines.select do |pipeline|
|
59
|
+
if all_pipelines.find { |p| p.name == pipeline }.nil?
|
60
|
+
missing_pipelines << pipeline
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
64
|
+
unless missing_pipelines.empty?
|
65
|
+
exception = PipelinesNotFoundException.new(missing_pipelines)
|
66
|
+
raise exception, exception.message
|
67
|
+
end
|
68
|
+
|
57
69
|
@pipelines.map do |pipeline|
|
58
70
|
all_pipelines.find { |p| p.name == pipeline }
|
59
71
|
end
|
data/lib/gocd/version.rb
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
require './lib/gocd/pipeline_status/pipelines'
|
2
2
|
require_relative '../../../lib/gocd/pipeline_status/pipeline_repository'
|
3
|
+
require_relative '../../../lib/gocd/exception/pipelines_not_found_exception'
|
3
4
|
|
4
5
|
def mock_pipeline_repository
|
5
6
|
pipeline1 = instance_double("Pipeline", :red? => true, :green? => false, :status => 'failing', :name => 'pipeline1')
|
@@ -76,5 +77,11 @@ RSpec.describe GOCD::AllPipelines, 'pipelines' do
|
|
76
77
|
pipeline_group = GOCD::PipelineGroup.new %w(pipeline1 pipeline2)
|
77
78
|
expect(pipeline_group.any_red?).to be_falsy
|
78
79
|
end
|
80
|
+
|
81
|
+
it '#red_pipelines? should throw PipelinesNotFoundException when any of the pipeline is not present in the go response' do
|
82
|
+
mock_pipeline_repository_with_green_pipelines
|
83
|
+
pipeline_group = GOCD::PipelineGroup.new %w(pipeline1 pipeline3)
|
84
|
+
expect{pipeline_group.any_red?}.to raise_error(PipelinesNotFoundException).with_message("Could not find [\"pipeline3\"]")
|
85
|
+
end
|
79
86
|
end
|
80
87
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gocd
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ajit Singh
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-12-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -117,6 +117,7 @@ files:
|
|
117
117
|
- lib/gocd/config/credentials.rb
|
118
118
|
- lib/gocd/config/server.rb
|
119
119
|
- lib/gocd/exception/data_fetch_exception.rb
|
120
|
+
- lib/gocd/exception/pipelines_not_found_exception.rb
|
120
121
|
- lib/gocd/history/history_fetcher.rb
|
121
122
|
- lib/gocd/pipeline_config/environment.rb
|
122
123
|
- lib/gocd/pipeline_config/job.rb
|