ruby-pwsh 1.2.3 → 2.0.0
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 +4 -4
- data/.rubocop.yml +1 -1
- data/lib/puppet/provider/dsc_base_provider/dsc_base_provider.rb +5 -5
- data/lib/pwsh/version.rb +1 -1
- data/lib/pwsh.rb +3 -3
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 696f0411f70a59f1e487088dd2e90c6f16c66949f7872c05d29ac53a5e86cc65
|
4
|
+
data.tar.gz: 7c2e373fe612fedc43a84b85afd267239de4fff91e5e5a12dc89de3fa8896231
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1fffcd2e377099b3a2d4b58787ce5d899f21c613f6a81c66ca0c555a7bcc3c02ec22514850aa60bcb56681cdf156ac86727a3c795e8f527a5c08c56a84d5dd1b
|
7
|
+
data.tar.gz: e32671cf64bd4cd3fecb838ce913c345a5169500a5c5698dc1acbec738e611fbe36e40e84d39ccd6a93aa703b80abaf343ced4da7bb5d655f2a68fe3e9868219
|
data/.rubocop.yml
CHANGED
@@ -80,7 +80,7 @@ class Puppet::Provider::DscBaseProvider # rubocop:disable Metrics/ClassLength
|
|
80
80
|
downcased_result = recursively_downcase(canonicalized)
|
81
81
|
downcased_resource = recursively_downcase(r)
|
82
82
|
# Ensure that metaparameters are preserved when we canonicalize the resource.
|
83
|
-
metaparams =
|
83
|
+
metaparams = r.select { |key, _value| Puppet::Type.metaparam?(key) }
|
84
84
|
canonicalized.merge!(metaparams) unless metaparams.nil?
|
85
85
|
downcased_result.each do |key, value|
|
86
86
|
# Canonicalize to the manifest value unless the downcased strings match and the attribute is not an enum:
|
@@ -384,8 +384,8 @@ class Puppet::Provider::DscBaseProvider # rubocop:disable Metrics/ClassLength
|
|
384
384
|
# Canonicalize the results to match the type definition representation;
|
385
385
|
# failure to do so will prevent the resource_api from comparing the result
|
386
386
|
# to the should hash retrieved from the resource definition in the manifest.
|
387
|
-
data.keys.each do |key|
|
388
|
-
type_key = "dsc_#{key.downcase}"
|
387
|
+
data.keys.each do |key|
|
388
|
+
type_key = :"dsc_#{key.downcase}"
|
389
389
|
data[type_key] = data.delete(key)
|
390
390
|
|
391
391
|
# Special handling for CIM Instances
|
@@ -598,7 +598,7 @@ class Puppet::Provider::DscBaseProvider # rubocop:disable Metrics/ClassLength
|
|
598
598
|
# @param enumerable [Enumerable] a string, array, hash, or other object to attempt to recursively downcase
|
599
599
|
def downcase_hash_keys!(enumerable)
|
600
600
|
if enumerable.is_a?(Hash)
|
601
|
-
enumerable.keys.each do |key|
|
601
|
+
enumerable.keys.each do |key|
|
602
602
|
name = key.dup.downcase
|
603
603
|
enumerable[name] = enumerable.delete(key)
|
604
604
|
downcase_hash_keys!(enumerable[name]) if enumerable[name].is_a?(Enumerable)
|
@@ -1063,7 +1063,7 @@ class Puppet::Provider::DscBaseProvider # rubocop:disable Metrics/ClassLength
|
|
1063
1063
|
# With multiple methods which need to discover secrets it is necessary to keep a single regex
|
1064
1064
|
# which can discover them. This will lazily match everything in a single-quoted string which
|
1065
1065
|
# ends with the secret postfix id and mark the actual contents of the string as the secret.
|
1066
|
-
SECRET_DATA_REGEX = /'(?<secret>[^']+)+?#{Regexp.quote(SECRET_POSTFIX)}'
|
1066
|
+
SECRET_DATA_REGEX = /'(?<secret>[^']+)+?#{Regexp.quote(SECRET_POSTFIX)}'/
|
1067
1067
|
|
1068
1068
|
# Strings containing sensitive data have a secrets postfix. These strings cannot be passed
|
1069
1069
|
# directly either to debug streams or to PowerShell and must be handled; this method contains
|
data/lib/pwsh/version.rb
CHANGED
data/lib/pwsh.rb
CHANGED
@@ -68,9 +68,9 @@ module Pwsh
|
|
68
68
|
#
|
69
69
|
# @return [Bool] true if enabled
|
70
70
|
def self.win32console_enabled?
|
71
|
-
@win32console_enabled ||=
|
72
|
-
|
73
|
-
|
71
|
+
@win32console_enabled ||=
|
72
|
+
defined?(Win32::Console) &&
|
73
|
+
Win32::Console.instance_of?(Class)
|
74
74
|
end
|
75
75
|
|
76
76
|
# TODO: This thing isn't called anywhere and the variable it sets is never referenced...
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby-pwsh
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Puppet, Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-
|
11
|
+
date: 2025-05-06 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: PowerShell code manager for ruby.
|
14
14
|
email:
|
@@ -51,6 +51,7 @@ metadata:
|
|
51
51
|
homepage_uri: https://github.com/puppetlabs/ruby-pwsh
|
52
52
|
source_code_uri: https://github.com/puppetlabs/ruby-pwsh
|
53
53
|
changelog_uri: https://github.com/puppetlabs/ruby-pwsh
|
54
|
+
rubygems_mfa_required: 'true'
|
54
55
|
post_install_message:
|
55
56
|
rdoc_options: []
|
56
57
|
require_paths:
|
@@ -59,14 +60,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
59
60
|
requirements:
|
60
61
|
- - ">="
|
61
62
|
- !ruby/object:Gem::Version
|
62
|
-
version:
|
63
|
+
version: 3.1.0
|
63
64
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
64
65
|
requirements:
|
65
66
|
- - ">="
|
66
67
|
- !ruby/object:Gem::Version
|
67
68
|
version: '0'
|
68
69
|
requirements: []
|
69
|
-
rubygems_version: 3.
|
70
|
+
rubygems_version: 3.3.27
|
70
71
|
signing_key:
|
71
72
|
specification_version: 4
|
72
73
|
summary: PowerShell code manager for ruby.
|