pdk 2.1.0 → 2.1.1

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: a4d97af3b41bc901757039fbba252933d45bc0d8df7ee4394b4de179d737bc3e
4
- data.tar.gz: b09c44a9520f79fa28aaa6732d2080f170268603948fdf5522162e255c0d30aa
3
+ metadata.gz: edecbd822f5fb1747d2359fbc1ead30020a1ba942b87fd603367ba3427181d68
4
+ data.tar.gz: 817cfc7f902167ef9937059de7b98510e6e4ee64d83610f5fb7c9e5b7def41a8
5
5
  SHA512:
6
- metadata.gz: 4ef5ecbf55d7418bada352cf728913bba313cf63011d9fa19315ff65dd8247ee0a5e3dd1bb364a28ddc5dac4d4657eabc5d29556126fefed2b591f0f0e63806e
7
- data.tar.gz: 3b836af5778a24a8dbe1d990e9dd7615011764000bdcbd81fab34ebc755c4b9c7dfebd66e82b07c7751db350fb3f16c86f6e5fb072efcd773c43ab7753132085
6
+ metadata.gz: 7008ffd3d22a6810c2ce7b45f1444b0313c59092656754a20a253137a514e88d03b9a8ce2d5545dc97a0d412a33cc7b110a7dd78138758215401928439f1f796
7
+ data.tar.gz: 3a3a737010f5a24013f3dd2e51066a614a09813c9ce3fcf827b9daa6f9ff0029e1e7dd9cec412ef726a90700271624f634eb939e54dc362e842d14fe6e986770
data/CHANGELOG.md CHANGED
@@ -3,20 +3,25 @@
3
3
  All changes to this repo will be documented in this file.
4
4
  See the [release notes](https://puppet.com/docs/pdk/latest/release_notes.html) for a high-level summary.
5
5
 
6
- ## [v2.1.0](https://github.com/puppetlabs/pdk/tree/v2.1.0) (2021-03-31)
7
6
 
8
- [Full Changelog](https://github.com/puppetlabs/pdk/compare/v2.0.0...v2.1.0)
7
+ ## [v2.1.1](https://github.com/puppetlabs/pdk/tree/v2.1.1) (2021-06-22)
8
+
9
+ [Full Changelog](https://github.com/puppetlabs/pdk/compare/v2.1.0...v2.1.1)
9
10
 
10
11
  **Fixed bugs:**
11
12
 
12
- - Documentation issue for brew installs on Mac [\#963](https://github.com/puppetlabs/pdk/issues/963)
13
- - PDK output scrollback in VS Code is extremely limited [\#829](https://github.com/puppetlabs/pdk/issues/829)
14
- - --verbose option broken for `pdk new defined_type` [\#679](https://github.com/puppetlabs/pdk/issues/679)
15
- - getting error with "$ pdk validate" after upgraded to 1.5.0 \(private/ruby/2.4.4/lib/ruby/gems/2.4.0/gems/pdk-1.5.0/lib/pdk/validate/puppet/puppet\_syntax.rb:88:in `parse_offense': undefined method` names' for nil:NilClass \(NoMethodError\)\) [\#518](https://github.com/puppetlabs/pdk/issues/518)
13
+ - \(PDK-1085\) Fail gracefully when no unit tests available [\#1096](https://github.com/puppetlabs/pdk/pull/1096) ([sanfrancrisko](https://github.com/sanfrancrisko))
14
+ - \(GH-1090\) Verify the changelog top most version matches the metadata version [\#1088](https://github.com/puppetlabs/pdk/pull/1088) ([carabasdaniel](https://github.com/carabasdaniel))
15
+ - \(GH-1083\) Bump childprocess to '~\> 4.0.0'; Disable @process.leader [\#1084](https://github.com/puppetlabs/pdk/pull/1084) ([sanfrancrisko](https://github.com/sanfrancrisko))
16
16
 
17
- **Closed issues:**
17
+ **Merged pull requests:**
18
18
 
19
- - \[Feature Request\] Validate CD4PE Yaml files [\#970](https://github.com/puppetlabs/pdk/issues/970)
19
+ - \(PDK-1041\) Use diff-lcs 1.4.4 [\#1091](https://github.com/puppetlabs/pdk/pull/1091) ([da-ar](https://github.com/da-ar))
20
+ - Update CODEOWNERS [\#1082](https://github.com/puppetlabs/pdk/pull/1082) ([jpogran](https://github.com/jpogran))
21
+
22
+ ## [v2.1.0](https://github.com/puppetlabs/pdk/tree/v2.1.0) (2021-04-06)
23
+
24
+ [Full Changelog](https://github.com/puppetlabs/pdk/compare/v2.0.0...v2.1.0)
20
25
 
21
26
  **Merged pull requests:**
22
27
 
@@ -27,7 +27,17 @@ module PDK
27
27
  @argv = argv
28
28
 
29
29
  @process = ChildProcess.build(*@argv)
30
- @process.leader = true
30
+ # https://github.com/puppetlabs/pdk/issues/1083:
31
+ # When @process.leader is set, childprocess will set the CREATE_BREAKAWAY_FROM_JOB
32
+ # and JOB_OBJECT_LIMIT_BREAKAWAY_OK flags in the Win32 API calls. This will cause
33
+ # issues on systems > Windows 7 / Server 2008, if the JOB_OBJECT_LIMIT_BREAKAWAY_OK
34
+ # flag is set and the Task Scheduler is trying to kick off a job, it can sometimes
35
+ # result in ACCESS_DENIED being returned by the Win32 API, depending on the permission
36
+ # levels / user account this user.
37
+ # The resolution for pdk/issues/1083 is to ensure @process.leader is not set.
38
+ # This will potentially cause issues on older Windows systems, in which case we may
39
+ # need to revisit and conditionally set this param depending on what OS we're on
40
+ # @process.leader = true
31
41
 
32
42
  @stdout = Tempfile.new('stdout', mode: TEMPFILE_MODE).tap { |io| io.sync = true }
33
43
  @stderr = Tempfile.new('stderr', mode: TEMPFILE_MODE).tap { |io| io.sync = true }
@@ -22,7 +22,7 @@ module PDK::CLI
22
22
  option nil, :'forge-upload-url', _('Set forge upload url path.'),
23
23
  argument: :required, default: 'https://forgeapi.puppetlabs.com/v3/releases'
24
24
 
25
- option nil, :'forge-token', _('Set Forge API token.'), argument: :required, default: nil
25
+ option nil, :'forge-token', _('Set Forge API token.'), default: nil
26
26
 
27
27
  option nil, :version, _('Update the module to the specified version prior to release. When not specified, the new version will be computed from the Changelog where possible.'),
28
28
  argument: :required
@@ -65,6 +65,12 @@ module PDK
65
65
 
66
66
  # Update the changelog with the correct version
67
67
  PDK::Util::ChangelogGenerator.generate_changelog unless skip_changelog?
68
+
69
+ # Check if the versions match
70
+ latest_version = PDK::Util::ChangelogGenerator.latest_version
71
+ unless latest_version
72
+ raise PDK::CLI::ExitWithError, _('%{new_version} does not match %{latest_version}') % { new_version: new_version, latest_version: latest_version } if new_version != latest_version
73
+ end
68
74
  end
69
75
 
70
76
  run_documentation(options) unless skip_documentation?
@@ -110,6 +110,19 @@ module PDK
110
110
  version.join('.')
111
111
  end
112
112
 
113
+ # Returns the top most version from the CHANGELOG file
114
+ def self.latest_version
115
+ latest = nil
116
+ changelog_content.each_line do |line|
117
+ line.strip!
118
+ if line.start_with?('## [')
119
+ latest = line[line.index('[') + 1..line.index(']') - 1].delete('v')
120
+ break # stops after the top version is extracted
121
+ end
122
+ end
123
+ latest
124
+ end
125
+
113
126
  def self.changelog_file
114
127
  # Default Changelog file is CHANGELOG.md, but also search for the .MD prefix as well.
115
128
  @changelog_file ||= ['CHANGELOG.md', 'CHANGELOG.MD'].map { |file| PDK::Util::Filesystem.expand_path(file) }.find { |path| PDK::Util::Filesystem.file?(path) }
@@ -39,6 +39,7 @@ module PDK
39
39
  end
40
40
  end
41
41
 
42
+ return [] if @objects.nil?
42
43
  @objects = @objects.compact
43
44
  end
44
45
 
data/lib/pdk/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module PDK
2
- VERSION = '2.1.0'.freeze
2
+ VERSION = '2.1.1'.freeze
3
3
  TEMPLATE_REF = VERSION
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 2.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Puppet, Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-04-06 00:00:00.000000000 Z
11
+ date: 2021-06-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -36,14 +36,14 @@ dependencies:
36
36
  requirements:
37
37
  - - "~>"
38
38
  - !ruby/object:Gem::Version
39
- version: 0.7.1
39
+ version: 4.0.0
40
40
  type: :runtime
41
41
  prerelease: false
42
42
  version_requirements: !ruby/object:Gem::Requirement
43
43
  requirements:
44
44
  - - "~>"
45
45
  - !ruby/object:Gem::Version
46
- version: 0.7.1
46
+ version: 4.0.0
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: cri
49
49
  requirement: !ruby/object:Gem::Requirement
@@ -62,16 +62,22 @@ dependencies:
62
62
  name: diff-lcs
63
63
  requirement: !ruby/object:Gem::Requirement
64
64
  requirements:
65
- - - '='
65
+ - - ">="
66
66
  - !ruby/object:Gem::Version
67
- version: '1.3'
67
+ version: 1.4.4
68
+ - - "<"
69
+ - !ruby/object:Gem::Version
70
+ version: '1.5'
68
71
  type: :runtime
69
72
  prerelease: false
70
73
  version_requirements: !ruby/object:Gem::Requirement
71
74
  requirements:
72
- - - '='
75
+ - - ">="
76
+ - !ruby/object:Gem::Version
77
+ version: 1.4.4
78
+ - - "<"
73
79
  - !ruby/object:Gem::Version
74
- version: '1.3'
80
+ version: '1.5'
75
81
  - !ruby/object:Gem::Dependency
76
82
  name: ffi
77
83
  requirement: !ruby/object:Gem::Requirement
@@ -112,14 +118,14 @@ dependencies:
112
118
  requirements:
113
119
  - - '='
114
120
  - !ruby/object:Gem::Version
115
- version: 1.3.0
121
+ version: 2.0.0
116
122
  type: :runtime
117
123
  prerelease: false
118
124
  version_requirements: !ruby/object:Gem::Requirement
119
125
  requirements:
120
126
  - - '='
121
127
  - !ruby/object:Gem::Version
122
- version: 1.3.0
128
+ version: 2.0.0
123
129
  - !ruby/object:Gem::Dependency
124
130
  name: json-schema
125
131
  requirement: !ruby/object:Gem::Requirement
@@ -457,7 +463,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
457
463
  - !ruby/object:Gem::Version
458
464
  version: '0'
459
465
  requirements: []
460
- rubygems_version: 3.1.2
466
+ rubyforge_project:
467
+ rubygems_version: 2.7.6.2
461
468
  signing_key:
462
469
  specification_version: 4
463
470
  summary: A key part of the Puppet Development Kit, the shortest path to better modules