ruby-pwsh 0.7.3 → 0.7.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e1fe9e2ecf92d6aee9019d08c83f4f7305b01bc71b83f9e9e5257731ff9896ae
4
- data.tar.gz: b74e7adfde169c6e680ade91be04a587d67bf2345ded1f1ce0cd0a6b72984122
3
+ metadata.gz: 57ca9a69869c173a437512ee463eb249ad7fd8926f8a04401a1cc3d2529fd113
4
+ data.tar.gz: 36c7863b7dd49f40e78539832dbece96843b712b7bd33452a3af8be61e678d88
5
5
  SHA512:
6
- metadata.gz: 519329615ad73d4f7f07a96ea89dc9e1716aee185481e8644ae8d8f1f688fb91acf70ac53b0fe1f38533b5bf1e475e3f9f3cf6feb79a222af9c7dc5ca19af2a9
7
- data.tar.gz: dbbbac000ca3ee3fd3f27e86592e76a9ae676e82aadc07fda35281774d835621f33880d435ae6abb70bf4e6c79f03c6396f88416c413c95a5dc77419dbdde037
6
+ metadata.gz: eaa268a3795e5e87d34eeabf2ec64bc439755c9669459d5410bc3f074b354d8e1c2e3d42fbfa0bcc884b2d3dc9e260aa6c2058bd17d92cebc10d8c74d17eb585
7
+ data.tar.gz: 3763124d44b953e8da9e52105c509a7e1f49ee78a7f26683d43ab428c391c9d7bdaab23ca7a62adefd10697060aecfdbdbda40795d73e7a5ca5199165b729537
data/CHANGELOG.md CHANGED
@@ -2,6 +2,15 @@
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.7.4](https://github.com/puppetlabs/ruby-pwsh/tree/0.7.4) (2021-02-11)
6
+
7
+ [Full Changelog](https://github.com/puppetlabs/ruby-pwsh/compare/0.7.3...0.7.4)
8
+
9
+ ### Fixed
10
+
11
+ - \(GH-105\) Ensure set runs on ambiguous ensure states [\#108](https://github.com/puppetlabs/ruby-pwsh/pull/108) ([michaeltlombardi](https://github.com/michaeltlombardi))
12
+ - \(GH-105\) Ensure canonicalized\_cache check validates against namevar [\#107](https://github.com/puppetlabs/ruby-pwsh/pull/107) ([michaeltlombardi](https://github.com/michaeltlombardi))
13
+
5
14
  ## [0.7.3](https://github.com/puppetlabs/ruby-pwsh/tree/0.7.3) (2021-02-03)
6
15
 
7
16
  [Full Changelog](https://github.com/puppetlabs/ruby-pwsh/compare/0.7.2...0.7.3)
@@ -97,6 +106,7 @@ All notable changes to this project will be documented in this file.The format i
97
106
  ### Added
98
107
 
99
108
  - \(IAC-1045\) Add the DSC base Puppet provider to pwshlib [\#39](https://github.com/puppetlabs/ruby-pwsh/pull/39) ([michaeltlombardi](https://github.com/michaeltlombardi))
109
+ - \(MODULES-10389\) Add puppet feature for dependent modules to leverage [\#20](https://github.com/puppetlabs/ruby-pwsh/pull/20) ([sanfrancrisko](https://github.com/sanfrancrisko))
100
110
 
101
111
  ## [0.4.1](https://github.com/puppetlabs/ruby-pwsh/tree/0.4.1) (2020-02-13)
102
112
 
@@ -112,7 +122,7 @@ All notable changes to this project will be documented in this file.The format i
112
122
 
113
123
  ### Added
114
124
 
115
- - \(MODULES-10389\) Add puppet feature for dependent modules to leverage [\#20](https://github.com/puppetlabs/ruby-pwsh/pull/20) ([sanfrancrisko](https://github.com/sanfrancrisko))
125
+ - \(FM-8422\) Make library releasable as a Puppet module [\#8](https://github.com/puppetlabs/ruby-pwsh/pull/8) ([michaeltlombardi](https://github.com/michaeltlombardi))
116
126
 
117
127
  ## [0.3.0](https://github.com/puppetlabs/ruby-pwsh/tree/0.3.0) (2019-12-04)
118
128
 
@@ -133,7 +143,6 @@ All notable changes to this project will be documented in this file.The format i
133
143
  ### Added
134
144
 
135
145
  - \(FEAT\) Add quality of life utilities [\#11](https://github.com/puppetlabs/ruby-pwsh/pull/11) ([michaeltlombardi](https://github.com/michaeltlombardi))
136
- - \(FM-8422\) Make library releasable as a Puppet module [\#8](https://github.com/puppetlabs/ruby-pwsh/pull/8) ([michaeltlombardi](https://github.com/michaeltlombardi))
137
146
 
138
147
 
139
148
 
@@ -44,7 +44,10 @@ class Puppet::Provider::DscBaseProvider
44
44
  def canonicalize(context, resources)
45
45
  canonicalized_resources = []
46
46
  resources.collect do |r|
47
- if fetch_cached_hashes(@@cached_canonicalized_resource, [r]).empty?
47
+ # During RSAPI refresh runs mandatory parameters are stripped and not available;
48
+ # Instead of checking again and failing, search the cache for a namevar match.
49
+ namevarized_r = r.select { |k, _v| namevar_attributes(context).include?(k) }
50
+ if fetch_cached_hashes(@@cached_canonicalized_resource, [namevarized_r]).empty?
48
51
  canonicalized = invoke_get_method(context, r)
49
52
  if canonicalized.nil?
50
53
  canonicalized = r.dup
@@ -159,6 +162,12 @@ class Puppet::Provider::DscBaseProvider
159
162
  context.deleting(name) do
160
163
  delete(context, name_hash)
161
164
  end
165
+ else
166
+ # In this case we are not sure if the resource is being created/updated/removed
167
+ # as with ensure "latest" or a specific version number, so default to update.
168
+ context.updating(name) do
169
+ update(context, name_hash, should)
170
+ end
162
171
  end
163
172
  else
164
173
  context.updating(name) do
data/lib/pwsh/version.rb CHANGED
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Pwsh
4
4
  # The version of the ruby-pwsh gem
5
- VERSION = '0.7.3'
5
+ VERSION = '0.7.4'
6
6
  end
data/metadata.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "puppetlabs-pwshlib",
3
- "version": "0.7.3",
3
+ "version": "0.7.4",
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.7.3
4
+ version: 0.7.4
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: 2021-02-03 00:00:00.000000000 Z
11
+ date: 2021-02-12 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,9 +69,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
69
69
  - !ruby/object:Gem::Version
70
70
  version: '0'
71
71
  requirements: []
72
- rubyforge_project:
73
- rubygems_version: 2.7.6
74
- signing_key:
72
+ rubygems_version: 3.2.8
73
+ signing_key:
75
74
  specification_version: 4
76
75
  summary: PowerShell code manager for ruby.
77
76
  test_files: []