ruby-pwsh 0.6.1 → 0.6.2

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: 2986a999feb45efb7f137175c7ba987423410fa62ec525f15b877c225d566a05
4
- data.tar.gz: e966eeca3f8d8eb089016250e7029cdf98290dedd6beff21208e031f5d28dc0b
3
+ metadata.gz: bde547f250bf8294f79418a4f2bdb085745ca28ccf9063ad5e8f9ebd64d65e06
4
+ data.tar.gz: 5b8a638232f9b385dec03c585dbd499b91c04df1d3a3e08fbab895668fea4760
5
5
  SHA512:
6
- metadata.gz: 7f74605239b19db0740f36480507f2a4fe009d7bd566dfa5bfe460e2211c42a7738eb8714d78231e5067163f8257c1d9e45262d1c54ca6d7b37b849681c4108d
7
- data.tar.gz: ee4a0cfbe10784b763dfb3c4eabbe4b09de537bdf78b2e2e06028afbab9f72b78b3fc4f3960ac3ce979ce2212fd0b5762704b990f8b1a6fb2e230641e4270343
6
+ metadata.gz: 245d16db7ea15ff1d7fab3b23ddfb6eb13934062126043c0ec1cc9d3b824e2fe1635ec39b89f352925d8022fdc1ab0b140d085ba60631959302c5960bdd68080
7
+ data.tar.gz: 7e2f20f08be81c6b72bcd8bd96736ab99cf4b8ebc4d7c0e1eaca5ce6906356be2c9fd6c459cc2ebdb2c704c024996f4214312b148191ce7959fa0318e7282a00
@@ -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.
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Pwsh
4
4
  # The version of the ruby-pwsh gem
5
- VERSION = '0.6.1'
5
+ VERSION = '0.6.2'
6
6
  end
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "puppetlabs-pwshlib",
3
- "version": "0.6.1",
3
+ "version": "0.6.2",
4
4
  "author": "puppetlabs",
5
5
  "summary": "Provide library code for interoperating with PowerShell.",
6
6
  "license": "MIT",
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.1
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-25 00:00:00.000000000 Z
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
- rubygems_version: 3.1.4
73
- signing_key:
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: []