jenkins_pipeline_builder 0.15.2 → 0.15.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- NDIyNmI3Mjc5YzdjNDg4ZmZjOGFhMGMzODE3MzU4MTBlYmIzOTAxYg==
4
+ ZTNlMmY0ZTI4NmRkYzA4OGM3MTg2MjBkNDM0ZjdkNWNkZWEyN2QxYw==
5
5
  data.tar.gz: !binary |-
6
- ZjFiMDI1ZmYxY2QxZWUzMjllZTQzZGM3OTQxZWMxOWM3NDA4N2Y1ZQ==
6
+ NzcyOTg0ZGIzMzQxMzdkODFkYzgxODJhNzc5YWJhNTU5NDdmZmJhMw==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NTYxODEyMzMyNTA4N2Q5OTcwZDRiZjUyMTBlYmI3YWEyNzNiYzBkNWJiYWE5
10
- ZGU5ZmMyMDlkZjUzMzRiMGJjNTJmYjllOTUwYzFmYzE3MzNlOGQ3YjY2YTM2
11
- ZGIyMDU2MjI0OTNiNWEzYTgzNTQ2NDc4MjA4NjJiNmE3ODBkN2I=
9
+ ZmViNDNmMzE0ZjUxNWZiM2YzZWYwZWQ5NDA5NTViNzIzMmU4Y2U5MzBhZGJi
10
+ YWZjMDhmYzU5NjdhMjUyOTczOGNmZmIwNmVlYmNkMTNkODE3NDk1NDVmZmNk
11
+ NGUxN2M1OWYxMTI5YzI0MzUyYjc3OWQyYjc0NzQzNzZhMmY3NmI=
12
12
  data.tar.gz: !binary |-
13
- YTcyNGZjZGQ3NGI3M2ZhMmI5ZWJmMDU3ODdlYWZkZGY4ZWU3OTMzMTkzMjMz
14
- ZDE0MWM3NDIwZjQwN2U2NTFmMGVkM2U0NTM4OTIwMjEwMDg5YjJhYjlhZGM1
15
- M2ViMjI1YmFkMGIyYWI3ZGQ2YTJiOTBhYzA0ZDllYmEwZDNjZmU=
13
+ NzM0ZDdmZGNiNWIzN2FmZGFlZmVjNTdhY2M0YzcwZDFiMGJjNWZiYzgwZDkx
14
+ ZTI1ZWE2M2E1N2JkZmYyNmVlMzk1NWFlNmUyZjRkOGYyMjQ2ZDNjYzAxYTQy
15
+ NzYyZjNiZjU2ZjA2MDY0ZDlmZDhjZTE4Y2RlODYwOGFjNGI1MDI=
@@ -146,7 +146,8 @@ module JenkinsPipelineBuilder
146
146
  end
147
147
 
148
148
  def versions
149
- @versions ||= extensions.each_with_object({}) do |ext, hash|
149
+ # Don't memoize this, it will prevent local overrides
150
+ extensions.each_with_object({}) do |ext, hash|
150
151
  hash[Gem::Version.new(ext.min_version)] = ext
151
152
  end
152
153
  end
@@ -21,5 +21,5 @@
21
21
  #
22
22
 
23
23
  module JenkinsPipelineBuilder
24
- VERSION = '0.15.2'.freeze
24
+ VERSION = '0.15.3'.freeze
25
25
  end
@@ -24,8 +24,7 @@ describe JenkinsPipelineBuilder::Compiler do
24
24
  name: 'DummyPipeline',
25
25
  jobs: [
26
26
  '{{name}}-00',
27
- { '{{name}}-01' => { job_name: '{{name}}-02' }
28
- }
27
+ { '{{name}}-01' => { job_name: '{{name}}-02' } }
29
28
  ]
30
29
  }
31
30
  }
@@ -31,7 +31,8 @@ describe 'extension dsl' do
31
31
  end
32
32
 
33
33
  allow(JenkinsPipelineBuilder.client).to receive(:plugin).and_return double(
34
- list_installed: { 'parameterized-trigger' => '20.0' })
34
+ list_installed: { 'parameterized-trigger' => '20.0' }
35
+ )
35
36
 
36
37
  @n_xml = Nokogiri::XML::Builder.new { |xml| xml.builders }.doc
37
38
  params = { builders: { shell_command: 'asdf' } }
@@ -35,6 +35,15 @@ describe JenkinsPipelineBuilder::ExtensionSet do
35
35
  end
36
36
  end
37
37
 
38
+ context '#versions' do
39
+ it 'does not memoize itself' do
40
+ set.add_extension 'builder', '0', description: :first
41
+ set.versions
42
+ set.add_extension 'builder', '0', description: :second
43
+ expect(set.versions[Gem::Version.new('0')].description).to eq :second
44
+ end
45
+ end
46
+
38
47
  context '#extension' do
39
48
  def new_ext(version = '0.0')
40
49
  ext = JenkinsPipelineBuilder::Extension.new
@@ -52,7 +52,8 @@ describe 'builders' do
52
52
  context 'multi_job builder' do
53
53
  before :each do
54
54
  allow(JenkinsPipelineBuilder.client).to receive(:plugin).and_return double(
55
- list_installed: { 'jenkins-multijob-plugin' => '20.0' })
55
+ list_installed: { 'jenkins-multijob-plugin' => '20.0' }
56
+ )
56
57
  end
57
58
  it 'generates a configuration' do
58
59
  params = { builders: { multi_job: { phases: { foo: { jobs: [{ name: 'foo' }] } } } } }
@@ -85,7 +86,8 @@ describe 'builders' do
85
86
  context 'maven3' do
86
87
  before :each do
87
88
  allow(JenkinsPipelineBuilder.client).to receive(:plugin).and_return double(
88
- list_installed: { 'maven-plugin' => '20.0' })
89
+ list_installed: { 'maven-plugin' => '20.0' }
90
+ )
89
91
  end
90
92
 
91
93
  it 'generates a configuration' do
@@ -102,7 +104,8 @@ describe 'builders' do
102
104
  context 'blocking_downstream' do
103
105
  before :each do
104
106
  allow(JenkinsPipelineBuilder.client).to receive(:plugin).and_return double(
105
- list_installed: { 'parameterized-trigger' => '20.0' })
107
+ list_installed: { 'parameterized-trigger' => '20.0' }
108
+ )
106
109
 
107
110
  JenkinsPipelineBuilder.registry.traverse_registry_path('job', params, @n_xml)
108
111
 
@@ -143,7 +146,8 @@ describe 'builders' do
143
146
  before :each do
144
147
  error = ''
145
148
  allow(JenkinsPipelineBuilder.client).to receive(:plugin).and_return double(
146
- list_installed: { 'groovy' => '1.24' })
149
+ list_installed: { 'groovy' => '1.24' }
150
+ )
147
151
 
148
152
  begin
149
153
  JenkinsPipelineBuilder.registry.traverse_registry_path('job', params, @n_xml)
@@ -28,7 +28,8 @@ describe 'publishers' do
28
28
  context 'sonar publisher' do
29
29
  before :each do
30
30
  allow(JenkinsPipelineBuilder.client).to receive(:plugin).and_return double(
31
- list_installed: { 'sonar' => '20.0' })
31
+ list_installed: { 'sonar' => '20.0' }
32
+ )
32
33
  end
33
34
 
34
35
  it 'generates a default configuration' do
@@ -101,7 +102,8 @@ describe 'publishers' do
101
102
  context 'description_setter' do
102
103
  before :each do
103
104
  allow(JenkinsPipelineBuilder.client).to receive(:plugin).and_return double(
104
- list_installed: { 'description-setter' => '20.0' })
105
+ list_installed: { 'description-setter' => '20.0' }
106
+ )
105
107
  end
106
108
  it 'generates a configuration' do
107
109
  params = { publishers: { description_setter: {} } }
@@ -116,8 +118,8 @@ describe 'publishers' do
116
118
  context 'downstream' do
117
119
  before :each do
118
120
  allow(JenkinsPipelineBuilder.client).to receive(:plugin).and_return double(
119
- list_installed: { 'parameterized-trigger' => '20.0'
120
- })
121
+ list_installed: { 'parameterized-trigger' => '20.0' }
122
+ )
121
123
  end
122
124
 
123
125
  it 'generates a configuration' do
@@ -137,8 +139,8 @@ describe 'publishers' do
137
139
  context 'cobertura_report' do
138
140
  before :each do
139
141
  allow(JenkinsPipelineBuilder.client).to receive(:plugin).and_return double(
140
- list_installed: { 'cobertura' => '20.0'
141
- })
142
+ list_installed: { 'cobertura' => '20.0' }
143
+ )
142
144
  end
143
145
  it 'generates a configuration' do
144
146
  params = { publishers: { cobertura_report: {} } }
@@ -155,8 +157,8 @@ describe 'publishers' do
155
157
  context 'email_ext' do
156
158
  before :each do
157
159
  allow(JenkinsPipelineBuilder.client).to receive(:plugin).and_return double(
158
- list_installed: { 'email-ext' => '20.0'
159
- })
160
+ list_installed: { 'email-ext' => '20.0' }
161
+ )
160
162
  end
161
163
  it 'generates a configuration' do
162
164
  params = { publishers: { email_ext: { triggers: [{ type: :first_failure }] } } }
@@ -174,7 +176,8 @@ describe 'publishers' do
174
176
  context '0.1.9' do
175
177
  before :each do
176
178
  allow(JenkinsPipelineBuilder.client).to receive(:plugin).and_return double(
177
- list_installed: { 'hipchat' => '0.1.9' })
179
+ list_installed: { 'hipchat' => '0.1.9' }
180
+ )
178
181
  end
179
182
  it 'generates a configuration' do
180
183
  params = { publishers: { hipchat: {} } }
@@ -197,8 +200,8 @@ describe 'publishers' do
197
200
  context '0' do
198
201
  before :each do
199
202
  expect(JenkinsPipelineBuilder.client).to receive(:plugin).and_return double(
200
- list_installed: { 'hipchat' => '0'
201
- })
203
+ list_installed: { 'hipchat' => '0' }
204
+ )
202
205
  puts JenkinsPipelineBuilder.registry.versions
203
206
  end
204
207
 
@@ -52,7 +52,8 @@ describe 'triggers' do
52
52
  context 'upstream' do
53
53
  before :each do
54
54
  allow(JenkinsPipelineBuilder.client).to receive(:plugin).and_return double(
55
- list_installed: { 'jenkins-multijob-plugin' => '20.0' })
55
+ list_installed: { 'jenkins-multijob-plugin' => '20.0' }
56
+ )
56
57
  end
57
58
 
58
59
  it 'generates an unstable configuration' do
@@ -56,7 +56,8 @@ describe JenkinsPipelineBuilder::Generator do
56
56
  describe '#bootstrap' do
57
57
  before :each do
58
58
  allow(JenkinsPipelineBuilder.client).to receive(:plugin).and_return double(
59
- list_installed: { 'description' => '20.0', 'git' => '20.0' })
59
+ list_installed: { 'description' => '20.0', 'git' => '20.0' }
60
+ )
60
61
  end
61
62
 
62
63
  def bootstrap(fixture_path, job_name)
@@ -194,8 +195,12 @@ describe JenkinsPipelineBuilder::Generator do
194
195
  end
195
196
  let(:view_hash) do
196
197
  [{ 'view' =>
197
- { 'name' => '{{name}} View', 'type' => 'listview', 'description' => '{{description}}', 'regex' => '{{name}}.*' }
198
- }]
198
+ {
199
+ 'name' => '{{name}} View',
200
+ 'type' => 'listview',
201
+ 'description' => '{{description}}',
202
+ 'regex' => '{{name}}.*'
203
+ } }]
199
204
  end
200
205
 
201
206
  it 'loads a yaml collection from a path' do
@@ -254,7 +259,8 @@ describe JenkinsPipelineBuilder::Generator do
254
259
  describe '#file_mode' do
255
260
  before :each do
256
261
  allow(JenkinsPipelineBuilder.client).to receive(:plugin).and_return double(
257
- list_installed: { 'description' => '20.0', 'git' => '20.0' })
262
+ list_installed: { 'description' => '20.0', 'git' => '20.0' }
263
+ )
258
264
  end
259
265
  after :each do
260
266
  file_paths = ['out/xml/TemplatePipeline-10.xml',
@@ -76,7 +76,8 @@ describe JenkinsPipelineBuilder::ModuleRegistry do
76
76
 
77
77
  before :each do
78
78
  allow(JenkinsPipelineBuilder.client).to receive(:plugin).and_return double(
79
- list_installed: { 'test_name' => '20.0', 'unorderedTest' => '20.0' })
79
+ list_installed: { 'test_name' => '20.0', 'unorderedTest' => '20.0' }
80
+ )
80
81
  @n_xml = Nokogiri::XML::Document.new
81
82
 
82
83
  wrapper do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jenkins_pipeline_builder
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.15.2
4
+ version: 0.15.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Igor Moochnick
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-04-29 00:00:00.000000000 Z
12
+ date: 2016-05-10 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: nokogiri