hybrid_platforms_conductor 33.8.2 → 33.8.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
  SHA256:
3
- metadata.gz: d6e2a5efb5f9513378cc635387663c365ef3746c5e3adf70c9f8af24d9e00685
4
- data.tar.gz: aeba22f701dcc095951b1575cc33e05ecd12022b7d8a8c4e558ee6189874d97f
3
+ metadata.gz: 80a9228f00ac63d2ddf325f1fd4faeab83af8d7bbf73c43ff46d4632883462a4
4
+ data.tar.gz: 225b174fb0107a743e4daeda8a65148b8ce7d0ea81fb0862066a3626e60b7571
5
5
  SHA512:
6
- metadata.gz: '096a224a0337aacb13a20b4113b008ffc62913db6a0207016ebf1fb31660dce248284f5fd2cd1fcb5147de086701cf1a5e63b7604519feaf8cbe230dca8066f0'
7
- data.tar.gz: fb1dc0a69c3bc5b0f7b2bbb056f4abd068fbb3261efe6b249c2be908d6b5556fa9b13d1a508fa3fb2b2513794e995892d9b4c256fc2ed93064eab4395b378819
6
+ metadata.gz: cc3c6a8c0a245a1929481f2e5482fdc3b9100dc24dab7a98bfbc026a294a8ef88b359060608cafb5c9937197ad89fc39630e3b56265888f5c913be9435960a3b
7
+ data.tar.gz: c82665286ed8c6783b02640e4122eb08d555c0d04fecbc49a688194caf828144f63f243824e28be8a120f41a331cd5194497b9ede07630d9347e8888383187b9
data/CHANGELOG.md CHANGED
@@ -1,3 +1,15 @@
1
+ # [v33.8.3](https://github.com/sweet-delights/hybrid-platforms-conductor/compare/v33.8.2...v33.8.3) (2021-08-16 14:18:52)
2
+
3
+ ## Global changes
4
+ ### Patches
5
+
6
+ * [[Fix(platform_handler_serverless_chef)] [#97] Fix git_diff_impacts when a library file is removed](https://github.com/sweet-delights/hybrid-platforms-conductor/commit/da60609dbd395b9a78c5df8089b39255db1fed9f)
7
+
8
+ ## Changes for platform_handler_serverless_chef
9
+ ### Patches
10
+
11
+ * [[Fix(platform_handler_serverless_chef)] [#97] Fix git_diff_impacts when a library file is removed](https://github.com/sweet-delights/hybrid-platforms-conductor/commit/da60609dbd395b9a78c5df8089b39255db1fed9f)
12
+
1
13
  # [v33.8.2](https://github.com/sweet-delights/hybrid-platforms-conductor/compare/v33.8.1...v33.8.2) (2021-08-14 21:12:19)
2
14
 
3
15
  ## Global changes
@@ -428,14 +428,16 @@ module HybridPlatformsConductor
428
428
  end
429
429
  when %r{libraries/(.+)}
430
430
  # Find any recipe using methods from this library
431
- lib_methods_regexps = File.read("#{@repository_path}/#{impacted_file}").scan(/(\W|^)def\s+(\w+)(\W|$)/).map { |_grp_1, method_name, _grp_2| /(\W|^)#{Regexp.escape(method_name)}(\W|$)/ }
432
- known_cookbook_paths.each do |cookbooks_path|
433
- Dir.glob("#{@repository_path}/#{cookbooks_path}/**/recipes/*.rb") do |recipe_path|
434
- file_content = File.read(recipe_path)
435
- found_lib_regexp = lib_methods_regexps.find { |regexp| file_content =~ regexp }
436
- unless found_lib_regexp.nil?
437
- cookbook_name, recipe_name = recipe_path.match(%r{#{cookbooks_path}/(\w+)/recipes/(\w+)\.rb})[1..2]
438
- register.call("included library helper #{found_lib_regexp.source[6..-7]}", recipe_name, cookbook_name: cookbook_name)
431
+ if File.exist?("#{@repository_path}/#{impacted_file}")
432
+ lib_methods_regexps = File.read("#{@repository_path}/#{impacted_file}").scan(/(\W|^)def\s+(\w+)(\W|$)/).map { |_grp_1, method_name, _grp_2| /(\W|^)#{Regexp.escape(method_name)}(\W|$)/ }
433
+ known_cookbook_paths.each do |cookbooks_path|
434
+ Dir.glob("#{@repository_path}/#{cookbooks_path}/**/recipes/*.rb") do |recipe_path|
435
+ file_content = File.read(recipe_path)
436
+ found_lib_regexp = lib_methods_regexps.find { |regexp| file_content =~ regexp }
437
+ unless found_lib_regexp.nil?
438
+ cookbook_name, recipe_name = recipe_path.match(%r{#{cookbooks_path}/(\w+)/recipes/(\w+)\.rb})[1..2]
439
+ register.call("included library helper #{found_lib_regexp.source[6..-7]}", recipe_name, cookbook_name: cookbook_name)
440
+ end
439
441
  end
440
442
  end
441
443
  end
@@ -1,5 +1,5 @@
1
1
  module HybridPlatformsConductor
2
2
 
3
- VERSION = '33.8.2'
3
+ VERSION = '33.8.3'
4
4
 
5
5
  end
@@ -158,6 +158,16 @@ describe HybridPlatformsConductor::HpcPlugins::PlatformHandler::ServerlessChef d
158
158
  end
159
159
  end
160
160
 
161
+ it 'returns no impacted service due to a library helper being removed' do
162
+ with_serverless_chef_platforms('recipes') do |platform|
163
+ expect(platform.impacts_from('cookbooks/test_cookbook_2/libraries/removed.rb' => {})).to eq [
164
+ [],
165
+ [],
166
+ false
167
+ ]
168
+ end
169
+ end
170
+
161
171
  it 'ignored impacted service from an unknown helper' do
162
172
  with_serverless_chef_platforms('recipes') do |platform, repository|
163
173
  File.write("#{repository}/cookbooks/test_cookbook_1/recipes/default.rb", <<~EO_RECIPE)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hybrid_platforms_conductor
3
3
  version: !ruby/object:Gem::Version
4
- version: 33.8.2
4
+ version: 33.8.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Muriel Salvan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-08-14 00:00:00.000000000 Z
11
+ date: 2021-08-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: range_operators