ruby-pwsh 0.6.1 → 0.6.2
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/CHANGELOG.md +8 -0
- data/lib/puppet/provider/dsc_base_provider/dsc_base_provider.rb +10 -0
- data/lib/pwsh/version.rb +1 -1
- data/metadata.json +1 -1
- metadata +7 -6
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: bde547f250bf8294f79418a4f2bdb085745ca28ccf9063ad5e8f9ebd64d65e06
|
|
4
|
+
data.tar.gz: 5b8a638232f9b385dec03c585dbd499b91c04df1d3a3e08fbab895668fea4760
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 245d16db7ea15ff1d7fab3b23ddfb6eb13934062126043c0ec1cc9d3b824e2fe1635ec39b89f352925d8022fdc1ab0b140d085ba60631959302c5960bdd68080
|
|
7
|
+
data.tar.gz: 7e2f20f08be81c6b72bcd8bd96736ab99cf4b8ebc4d7c0e1eaca5ce6906356be2c9fd6c459cc2ebdb2c704c024996f4214312b148191ce7959fa0318e7282a00
|
data/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file.The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org).
|
|
4
4
|
|
|
5
|
+
## [0.6.2](https://github.com/puppetlabs/ruby-pwsh/tree/0.6.2) (2020-12-09)
|
|
6
|
+
|
|
7
|
+
[Full Changelog](https://github.com/puppetlabs/ruby-pwsh/compare/0.6.1...0.6.2)
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
|
|
11
|
+
- \(MAINT\) Ensure parameters are canonicalized [\#75](https://github.com/puppetlabs/ruby-pwsh/pull/75) ([michaeltlombardi](https://github.com/michaeltlombardi))
|
|
12
|
+
|
|
5
13
|
## [0.6.1](https://github.com/puppetlabs/ruby-pwsh/tree/0.6.1) (2020-11-25)
|
|
6
14
|
|
|
7
15
|
[Full Changelog](https://github.com/puppetlabs/ruby-pwsh/compare/0.6.0...0.6.1)
|
|
@@ -50,6 +50,8 @@ class Puppet::Provider::DscBaseProvider
|
|
|
50
50
|
canonicalized = r.dup
|
|
51
51
|
@@cached_canonicalized_resource << r.dup
|
|
52
52
|
else
|
|
53
|
+
parameters = r.select { |name, _properties| parameter_attributes(context).include?(name) }
|
|
54
|
+
canonicalized.merge!(parameters)
|
|
53
55
|
canonicalized[:name] = r[:name]
|
|
54
56
|
if r[:dsc_psdscrunascredential].nil?
|
|
55
57
|
canonicalized.delete(:dsc_psdscrunascredential)
|
|
@@ -461,6 +463,14 @@ class Puppet::Provider::DscBaseProvider
|
|
|
461
463
|
context.type.attributes.select { |_attribute, properties| properties[:behaviour] == :namevar }.keys
|
|
462
464
|
end
|
|
463
465
|
|
|
466
|
+
# Parses the DSC resource type definition to retrieve the names of any attributes which are specified as parameters
|
|
467
|
+
#
|
|
468
|
+
# @param context [Object] the Puppet runtime context to operate in and send feedback to
|
|
469
|
+
# @return [Array] returns an array of attribute names as symbols which are parameters
|
|
470
|
+
def parameter_attributes(context)
|
|
471
|
+
context.type.attributes.select { |_name, properties| properties[:behaviour] == :parameter }.keys
|
|
472
|
+
end
|
|
473
|
+
|
|
464
474
|
# Look through a fully formatted string, replacing all instances where a value matches the formatted properties
|
|
465
475
|
# of an instantiated variable with references to the variable instead. This allows us to pass complex and nested
|
|
466
476
|
# CIM instances to the Invoke-DscResource parameter hash without constructing them *in* the hash.
|
data/lib/pwsh/version.rb
CHANGED
data/metadata.json
CHANGED
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: 0.6.
|
|
4
|
+
version: 0.6.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Puppet, Inc.
|
|
8
|
-
autorequire:
|
|
8
|
+
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2020-
|
|
11
|
+
date: 2020-12-10 00:00:00.000000000 Z
|
|
12
12
|
dependencies: []
|
|
13
13
|
description: PowerShell code manager for ruby.
|
|
14
14
|
email:
|
|
@@ -54,7 +54,7 @@ metadata:
|
|
|
54
54
|
homepage_uri: https://github.com/puppetlabs/ruby-pwsh
|
|
55
55
|
source_code_uri: https://github.com/puppetlabs/ruby-pwsh
|
|
56
56
|
changelog_uri: https://github.com/puppetlabs/ruby-pwsh
|
|
57
|
-
post_install_message:
|
|
57
|
+
post_install_message:
|
|
58
58
|
rdoc_options: []
|
|
59
59
|
require_paths:
|
|
60
60
|
- lib
|
|
@@ -69,8 +69,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
69
69
|
- !ruby/object:Gem::Version
|
|
70
70
|
version: '0'
|
|
71
71
|
requirements: []
|
|
72
|
-
|
|
73
|
-
|
|
72
|
+
rubyforge_project:
|
|
73
|
+
rubygems_version: 2.7.6
|
|
74
|
+
signing_key:
|
|
74
75
|
specification_version: 4
|
|
75
76
|
summary: PowerShell code manager for ruby.
|
|
76
77
|
test_files: []
|