ruby-pwsh 0.6.0 → 0.6.1

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: 164dc89d750a5544dd4c100bd2166c0fe9d26447d5636bb18b0eec7d8dfc142f
4
- data.tar.gz: bdf317f119bd2e5a7261a711a2a5c4721feda199a955feb5265af07c6f94d8d8
3
+ metadata.gz: 2986a999feb45efb7f137175c7ba987423410fa62ec525f15b877c225d566a05
4
+ data.tar.gz: e966eeca3f8d8eb089016250e7029cdf98290dedd6beff21208e031f5d28dc0b
5
5
  SHA512:
6
- metadata.gz: 8430d204e301ce7577148a95d37a8581b3e0d37da1c3e97fcb5dce3c3a2b66601b651dd48ef3a2810d802d09cf28579dfc986712bf407e54ecb3ca8f23ab9283
7
- data.tar.gz: ed31dd3ec848dc4c7fd108ee040c5b39e532ea50fe406ba8f98dfb6bb2cf5c804b0d758c393ead8b560785d34717a629380e346f24baae6963e34094889c6fdc
6
+ metadata.gz: 7f74605239b19db0740f36480507f2a4fe009d7bd566dfa5bfe460e2211c42a7738eb8714d78231e5067163f8257c1d9e45262d1c54ca6d7b37b849681c4108d
7
+ data.tar.gz: ee4a0cfbe10784b763dfb3c4eabbe4b09de537bdf78b2e2e06028afbab9f72b78b3fc4f3960ac3ce979ce2212fd0b5762704b990f8b1a6fb2e230641e4270343
@@ -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.6.1](https://github.com/puppetlabs/ruby-pwsh/tree/0.6.1) (2020-11-25)
6
+
7
+ [Full Changelog](https://github.com/puppetlabs/ruby-pwsh/compare/0.6.0...0.6.1)
8
+
9
+ ### Fixed
10
+
11
+ - \(maint\) - Removal of inappropriate terminology [\#70](https://github.com/puppetlabs/ruby-pwsh/pull/70) ([pmcmaw](https://github.com/pmcmaw))
12
+ - \(Maint\) Fix ensurability in the dsc base provider [\#69](https://github.com/puppetlabs/ruby-pwsh/pull/69) ([michaeltlombardi](https://github.com/michaeltlombardi))
13
+
5
14
  ## [0.6.0](https://github.com/puppetlabs/ruby-pwsh/tree/0.6.0) (2020-11-24)
6
15
 
7
16
  [Full Changelog](https://github.com/puppetlabs/ruby-pwsh/compare/0.5.1...0.6.0)
@@ -79,7 +79,7 @@ process as easy as possible.
79
79
 
80
80
  2. Sending your patches
81
81
 
82
- To submit your changes via a GitHub pull request, we _highly_ recommend that you have them on a topic branch, instead of directly on "master".
82
+ To submit your changes via a GitHub pull request, we _highly_ recommend that you have them on a topic branch, instead of directly on "main".
83
83
  It makes things much easier to keep track of, especially if you decide to work on another thing before your first change is merged in.
84
84
 
85
85
  GitHub has some pretty good [general documentation](http://help.github.com/) on using their site.
data/README.md CHANGED
@@ -74,9 +74,9 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
74
74
 
75
75
  Steps to release an update to the gem and module include:
76
76
 
77
- 1. Ensure that the release branch is up to date with the master:
77
+ 1. Ensure that the release branch is up to date with the main:
78
78
  ```bash
79
- git push upstream upstream/master:release --force
79
+ git push upstream upstream/main:release --force
80
80
  ```
81
81
  1. Checkout a new working branch for the release prep (where xyz is the appropriate version, sans periods):
82
82
  ```bash
@@ -96,7 +96,7 @@ Steps to release an update to the gem and module include:
96
96
  ```
97
97
  1. Push your changes and submit a pull request for review _against the **release** branch_:
98
98
  ```bash
99
- git push -u origin maint/release-prep-xyz
99
+ git push -u origin maint/release/prep-xyz
100
100
  ```
101
101
  1. Ensure tests pass and the code is merged to `release`.
102
102
  1. Grab the commit hash from the merge commit on release, use that as the tag for the version (replacing `x.y.z` with the appropriate version and `commithash` with the relevant one), then push the tags to upstream:
@@ -114,6 +114,6 @@ Steps to release an update to the gem and module include:
114
114
  bundle exec rake build_module
115
115
  ```
116
116
  1. Publish the updated module version (found in the `pkg` folder) to [the Forge](https://forge.puppet.com/puppetlabs/pwshlib).
117
- 1. Submit the [mergeback PR from the release branch to master](https://github.com/puppetlabs/ruby-pwsh/compare/master...release).
117
+ 1. Submit the [mergeback PR from the release branch to main](https://github.com/puppetlabs/ruby-pwsh/compare/main...release).
118
118
 
119
119
  ## Known Issues
@@ -134,7 +134,7 @@ class Puppet::Provider::DscBaseProvider
134
134
  end
135
135
 
136
136
  # for compatibility sake, we use dsc_ensure instead of ensure, so context.type.ensurable? does not work
137
- if !context.type.attributes.key?(:dsc_ensure)
137
+ if context.type.attributes.key?(:dsc_ensure)
138
138
  is = create_absent(:name, name) if is.nil?
139
139
  should = create_absent(:name, name) if should.nil?
140
140
 
@@ -280,6 +280,15 @@ class Puppet::Provider::DscBaseProvider
280
280
  # If a resource is found, it's present, so refill this Puppet-only key
281
281
  data.merge!({ name: name_hash[:name] })
282
282
 
283
+ # Have to check for this to avoid a weird canonicalization warning
284
+ # The Resource API calls canonicalize against the current state which
285
+ # will lead to dsc_ensure being set to absent in the name_hash even if
286
+ # it was set to present in the manifest
287
+ name_hash_has_nil_keys = name_hash.select { |_k, v| v.nil? }.count.positive?
288
+ # We want to throw away all of the empty keys if and only if the manifest
289
+ # declaration is for an absent resource and the resource is actually absent
290
+ data.reject! { |_k, v| v.nil? } if data[:dsc_ensure] == 'Absent' && name_hash[:dsc_ensure] == 'Absent' && !name_hash_has_nil_keys
291
+
283
292
  # Cache the query to prevent a second lookup
284
293
  @@cached_query_results << data.dup if fetch_cached_hashes(@@cached_query_results, [data]).empty?
285
294
  context.debug("Returned to Puppet as #{data}")
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Pwsh
4
4
  # The version of the ruby-pwsh gem
5
- VERSION = '0.6.0'
5
+ VERSION = '0.6.1'
6
6
  end
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "puppetlabs-pwshlib",
3
- "version": "0.6.0",
3
+ "version": "0.6.1",
4
4
  "author": "puppetlabs",
5
5
  "summary": "Provide library code for interoperating with PowerShell.",
6
6
  "license": "MIT",
7
7
  "source": "https://github.com/puppetlabs/ruby-pwsh",
8
- "project_page": "https://github.com/puppetlabs/ruby-pwsh/blob/master/pwshlib.md",
8
+ "project_page": "https://github.com/puppetlabs/ruby-pwsh/blob/main/pwshlib.md",
9
9
  "issues_url": "https://github.com/puppetlabs/ruby-pwsh/issues",
10
10
  "dependencies": [
11
11
 
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.0
4
+ version: 0.6.1
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-24 00:00:00.000000000 Z
11
+ date: 2020-11-25 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.1.4
73
+ signing_key:
75
74
  specification_version: 4
76
75
  summary: PowerShell code manager for ruby.
77
76
  test_files: []