bolt 3.18.0 → 3.19.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of bolt might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1da7c437e5ea72a7f457ee51a06dbe434c85099ac2313491fffc63caa19b5acb
4
- data.tar.gz: 5c081782bc847bf233e21a40094ffb0878e3bf0bf2da9ffd4ab527f1239d587e
3
+ metadata.gz: f615bd259875c82b953db516b48975c66863ef4f4002a4f55317f9f867a0cf6c
4
+ data.tar.gz: 0027a9463d88e77455c7a83e5716f3097d921a32f172b931530b5f58827f427e
5
5
  SHA512:
6
- metadata.gz: f1cf5097a426a55de0e69f62cb266b15a91521991ad777d8b21ce81653b828bc279d6111fc0d02fb2f289dc53170db0d13bc99580fcd73fab4ce67ac64751795
7
- data.tar.gz: 0fef7a9159cc63e167a9014d25a4a1937194adcbcf35492f5286d1c0c88b9202436b1fe64ea92770895350c795900e3ed701a108bfb1814570386c6411079f00
6
+ metadata.gz: 8c0d779b31ff416f05d625ba4effb197a7b453f02e19489220e228c3e35b20abf3bc04e85f09562faf8e0b12b415f20c8e6facfcded1d09212f45df2d2d73690
7
+ data.tar.gz: d5ed05307adf5ff3c71d6db4a076b972284259aa837945eaf389d71434d795f90bb95efb783006fee32076b6311c8b4baad11627511cfad9957fa60f726de937
data/Puppetfile CHANGED
@@ -10,15 +10,15 @@ mod 'puppetlabs-puppet_agent', '4.9.0'
10
10
  mod 'puppetlabs-facts', '1.4.0'
11
11
 
12
12
  # Core types and providers for Puppet 6
13
- mod 'puppetlabs-augeas_core', '1.1.2'
14
- mod 'puppetlabs-host_core', '1.0.3'
13
+ mod 'puppetlabs-augeas_core', '1.2.0'
14
+ mod 'puppetlabs-host_core', '1.1.0'
15
15
  mod 'puppetlabs-scheduled_task', '3.0.1'
16
- mod 'puppetlabs-sshkeys_core', '2.2.0'
17
- mod 'puppetlabs-zfs_core', '1.2.0'
18
- mod 'puppetlabs-cron_core', '1.0.5'
19
- mod 'puppetlabs-mount_core', '1.0.4'
20
- mod 'puppetlabs-selinux_core', '1.1.0'
21
- mod 'puppetlabs-yumrepo_core', '1.0.7'
16
+ mod 'puppetlabs-sshkeys_core', '2.3.0'
17
+ mod 'puppetlabs-zfs_core', '1.3.0'
18
+ mod 'puppetlabs-cron_core', '1.1.0'
19
+ mod 'puppetlabs-mount_core', '1.1.0'
20
+ mod 'puppetlabs-selinux_core', '1.2.0'
21
+ mod 'puppetlabs-yumrepo_core', '1.1.0'
22
22
  mod 'puppetlabs-zone_core', '1.0.3'
23
23
 
24
24
  # Useful additional modules
@@ -29,7 +29,7 @@ mod 'puppetlabs-python_task_helper', '0.5.0'
29
29
  mod 'puppetlabs-reboot', '4.1.0'
30
30
  mod 'puppetlabs-ruby_task_helper', '0.6.0'
31
31
  mod 'puppetlabs-ruby_plugin_helper', '0.2.0'
32
- mod 'puppetlabs-stdlib', '8.0.0'
32
+ mod 'puppetlabs-stdlib', '8.1.0'
33
33
 
34
34
  # Plugin modules
35
35
  mod 'puppetlabs-aws_inventory', '0.7.0'
@@ -71,7 +71,7 @@ module Bolt
71
71
  @config
72
72
  else
73
73
  @config_resolved = true
74
- @config.transform_values! { |t| t.resolved? ? t : t.resolve(@plugins) }
74
+ @config.each_value { |t| t.resolve(@plugins) unless t.resolved? }
75
75
  end
76
76
  end
77
77
 
data/lib/bolt/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Bolt
4
- VERSION = '3.18.0'
4
+ VERSION = '3.19.0'
5
5
  end
@@ -414,6 +414,8 @@ module BoltServer
414
414
  'path' => case mount_segment
415
415
  when 'files'
416
416
  "/puppet/v3/file_content/modules/#{module_segment}/#{name_segment}"
417
+ when 'scripts'
418
+ "/puppet/v3/file_content/scripts/#{module_segment}/#{name_segment}"
417
419
  when 'tasks'
418
420
  "/puppet/v3/file_content/tasks/#{module_segment}/#{name_segment}"
419
421
  when 'lib'
@@ -463,7 +465,7 @@ module BoltServer
463
465
  end
464
466
 
465
467
  def file_metadatas(versioned_project, module_name, file)
466
- abs_file_path = @pal_mutex.synchronize do
468
+ result = @pal_mutex.synchronize do
467
469
  bolt_config = config_from_project(versioned_project)
468
470
  pal = pal_from_project_bolt_config(bolt_config)
469
471
  pal.in_bolt_compiler do
@@ -473,31 +475,36 @@ module BoltServer
473
475
  # If not found, and the path starts with `files` or `scripts`, munge
474
476
  # the path and look inside that directory.
475
477
  if (abs_path = mod.file(file))
476
- abs_path
478
+ { abs_file_path: abs_path, puppetserver_root: "modules/#{module_name}/#{file}" }
477
479
  else
478
480
  subdir, relative_path = file.split(File::SEPARATOR, 2)
479
- case subdir
480
- when 'files'
481
- mod.file(relative_path)
482
- when 'scripts'
483
- mod.script(relative_path)
484
- end
481
+ abs_path, mount = case subdir
482
+ when 'files'
483
+ [mod.file(relative_path), 'modules']
484
+ when 'scripts'
485
+ [mod.script(relative_path), 'scripts']
486
+ end
487
+ next nil unless abs_path
488
+ { abs_file_path: abs_path, puppetserver_root: "#{mount}/#{module_name}/#{relative_path}" }
485
489
  end
486
490
  end
487
491
  end
488
492
 
489
- unless abs_file_path
493
+ unless result
490
494
  raise BoltServer::RequestError,
491
495
  "file: '#{file}' does not exist inside #{module_name} 'files' or 'scripts' directories"
492
496
  end
493
497
 
498
+ abs_file_path = result[:abs_file_path]
499
+ puppetserver_root = result[:puppetserver_root]
500
+
494
501
  fileset = Puppet::FileServing::Fileset.new(abs_file_path, 'recurse' => 'yes')
495
502
  Puppet::FileServing::Fileset.merge(fileset).collect do |relative_file_path, base_path|
496
503
  metadata = Puppet::FileServing::Metadata.new(base_path, relative_path: relative_file_path)
497
504
  metadata.checksum_type = 'sha256'
498
505
  metadata.links = 'follow'
499
506
  metadata.collect
500
- metadata.to_data_hash
507
+ metadata.to_data_hash.merge(puppetserver_root: puppetserver_root)
501
508
  end
502
509
  end
503
510
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bolt
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.18.0
4
+ version: 3.19.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Puppet
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-09-20 00:00:00.000000000 Z
11
+ date: 2021-10-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable