jenkins_pipeline_builder 0.13.2 → 0.13.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
- YjllMWFlNjVkNjkzMzFlODlmMDkwNDExNWU5NWVhZjg3YWY2ZmViOQ==
4
+ MDc1ZDNkY2I3M2NkYTk4OThlMTNlMjA0MDkwN2QwYmU0MzEyMzVjNg==
5
5
  data.tar.gz: !binary |-
6
- MTlkNTMyODljMzdmY2I5YWIxZjdjZjZkOTNjZTBhZjBkZTE1YjEyOA==
6
+ ZmM5YTA3NWZkYzRmZWYwMDE1Y2I0ZThhNjM0ZDY4YTAxZmNiYTlkNw==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NzFjNGI2ODhkYmNlNDA0OTVlMjA3MDQ3N2I2ZDM1Nzg1MDM3ZDZhYWFkNDAw
10
- YThhYWQ2ZTZlMDliOTQ4YTM1YjYxMmE5MzY4MWU4Y2Y4NDY1MTU1MjU0YWU4
11
- ZDEzYmI3MzU4NDA5ZGZiMTRkOGZhMThjMzBkYWVhZDE3OGM1NWU=
9
+ MTBkM2VhYTMzOTNjZTA2NWVkYjgzNjQ4MzE3N2Y4OGIyNjQ1YWZjNmZhMWEw
10
+ NzA2YmE5OWJlNzUzNzg0OTYxYWJjOGM3ODE1NjczNzFkMzQwZjRhOTI0NTAx
11
+ ODk2NGFkNTgzMjQ5N2VlYjljZWNmNmE2MWNlMmE3MTgyZTE2MDE=
12
12
  data.tar.gz: !binary |-
13
- ZWZhNzQ2ZTBiYjMwN2M3ZDUyMWQ3ZWI5NDI0MmNjYTQwOWJjZDJmMDc1ZWQw
14
- MDhkOWMyNWY0ODdhZmQyYThhZDllNjgxY2Q2OWI1YzZkMTAwNTEzYWQ5MmU4
15
- YjA1Yzg3MTZhYzY0MTgwZDU4ZjRlZjM2ZjYzZTcxODI0ZTY4Yzk=
13
+ Zjc4M2JlNTkyMDYwMmNkMzhkNmIzYTBkOTVjMmE3MGFiNzc2YmQwMDhhMmJk
14
+ MTA2Yjc0MzFlMzU1ODczODlkNjgyMzE2NjE5OThhMjc2MDdkYjA3NTZmOTdm
15
+ ZmNlMzhmY2U4NGEyZmQ4OTQ4NDkxMDdjNGUzMGNhOTAyODlhNTM=
@@ -93,7 +93,7 @@ module JenkinsPipelineBuilder
93
93
  defaults = job_collection.defaults
94
94
  settings = defaults.nil? ? {} : defaults[:value] || {}
95
95
  compiler = JenkinsPipelineBuilder::Compiler.new self
96
- project[:settings] = compiler.get_settings_bag(project, settings) unless project[:settings]
96
+ project[:settings] = compiler.get_settings_bag(project, settings)
97
97
 
98
98
  errors = process_project project
99
99
  print_project_errors errors
@@ -21,5 +21,5 @@
21
21
  #
22
22
 
23
23
  module JenkinsPipelineBuilder
24
- VERSION = '0.13.2'
24
+ VERSION = '0.13.3'
25
25
  end
@@ -163,6 +163,24 @@ describe JenkinsPipelineBuilder::Generator do
163
163
  expect(pr_generator).to receive(:open_prs).and_return [1, 2]
164
164
  expect(@generator.pull_request(path, job_name)).to be_truthy
165
165
  end
166
+
167
+ it 'refreshes the project settings everytime' do
168
+ job_name = 'PullRequest'
169
+ pr_generator = double('pr_generator')
170
+ expect(JenkinsPipelineBuilder::PullRequestGenerator).to receive(:new)
171
+ .with(hash_including(application_name: 'testapp',
172
+ github_site: 'https://github.com',
173
+ git_org: 'testorg',
174
+ git_repo_name: 'generator_tests'))
175
+ .and_return(pr_generator)
176
+ expect(pr_generator).to receive(:delete_closed_prs)
177
+ pr_generator.stub(:convert!) do |job_collection, pr|
178
+ job_collection.defaults[:value][:application_name] = "testapp-PR#{pr}"
179
+ end
180
+ expect(pr_generator).to receive(:open_prs).and_return [1, 2]
181
+ expect(@generator.pull_request(path, job_name)).to be_truthy
182
+ expect(@generator.job_collection.projects.first[:settings][:application_name]).to eq 'testapp-PR2'
183
+ end
166
184
  # Things to check for
167
185
  # Fail - no PR job type found
168
186
  # Encounters failure during build process
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.13.2
4
+ version: 0.13.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: 2015-11-19 00:00:00.000000000 Z
12
+ date: 2015-11-20 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: nokogiri