pdk 1.5.0 → 1.6.0

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
  SHA1:
3
- metadata.gz: 93cc8f9f706dd2ce506fe5cba80f8dc1b850be29
4
- data.tar.gz: f8132274481cb6f6cdcb60241829d32de7e33118
3
+ metadata.gz: 27c6740e4512862534ffb7115a59480b99262894
4
+ data.tar.gz: 65fc2bd610787535d368cb6c2b36fefcf3aef761
5
5
  SHA512:
6
- metadata.gz: ae5eeee330f86efe4d4fcc728aea7260fa0a066da55e21f120e0cf983750d5f12bc1c72422b58e435e1d46be94de9e07dfd071f37eebcf0482705186a879ba9f
7
- data.tar.gz: 11a7de86e1765630c50d0adff32af9131262eaa4fb6e17a0ad86cd6f2218834f04e79f75a549f38ecfd8db95444a8d8a8d8201f20c8d4aa20cb2b22e7a929d80
6
+ metadata.gz: 9b9849bee4bf285549e04176801b38a9aa3495b3caa9a70c39117fd62f31b831776b9c246e978aa58b6a576756360c8e7f414d803aa88dfd61f47dec501b0c3a
7
+ data.tar.gz: 5563dca3dc8a84721c04430cd337d3b221874e2cf7d007e25285a068b79419f143458d97e7d10ccb257c750daa0a119b474d7997c32adb3bf70203875dc14bcb
data/CHANGELOG.md CHANGED
@@ -4,6 +4,42 @@ 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
6
 
7
+ ## [v1.6.0](https://github.com/puppetlabs/pdk/tree/v1.6.0) (2018-06-20)
8
+ [Full Changelog](https://github.com/puppetlabs/pdk/compare/v1.5.0...v1.6.0)
9
+
10
+ **Implemented enhancements:**
11
+
12
+ - \(PDK-949\) Add a default knockout\_prefix for options [\#517](https://github.com/puppetlabs/pdk/pull/517) ([jarretlavallee](https://github.com/jarretlavallee))
13
+ - \(PDK-636\) Make fixture cleaning optional [\#515](https://github.com/puppetlabs/pdk/pull/515) ([rodjek](https://github.com/rodjek))
14
+ - \(PDK-809\) Exit early if the module is not PDK compatible [\#506](https://github.com/puppetlabs/pdk/pull/506) ([rodjek](https://github.com/rodjek))
15
+
16
+ **Fixed bugs:**
17
+
18
+ - pdk \(FATAL\): Could not locate Gemfile [\#505](https://github.com/puppetlabs/pdk/issues/505)
19
+ - pdk convert ignoring .sync.yml `delete` values [\#444](https://github.com/puppetlabs/pdk/issues/444)
20
+ - \(PDK-979\) Set path to Gemfile when invoking `bundle lock` [\#513](https://github.com/puppetlabs/pdk/pull/513) ([scotje](https://github.com/scotje))
21
+ - \(PDK-985\) Split validation targets into chunks of 1000 [\#509](https://github.com/puppetlabs/pdk/pull/509) ([rodjek](https://github.com/rodjek))
22
+ - \(PDK-926\) Read rspec event context relative to module root [\#508](https://github.com/puppetlabs/pdk/pull/508) ([rodjek](https://github.com/rodjek))
23
+ - Change Metadata.from\_file to reliably raise [\#503](https://github.com/puppetlabs/pdk/pull/503) ([DavidS](https://github.com/DavidS))
24
+ - \(PDK-475\) Set BUNDLE\_IGNORE\_CONFIG for all commands [\#502](https://github.com/puppetlabs/pdk/pull/502) ([rodjek](https://github.com/rodjek))
25
+ - \(MAINT\) Fixup error in log output when parsing invalid .sync.yml [\#498](https://github.com/puppetlabs/pdk/pull/498) ([scotje](https://github.com/scotje))
26
+ - Add yaml header to make yamllint happy [\#496](https://github.com/puppetlabs/pdk/pull/496) ([wmuizelaar](https://github.com/wmuizelaar))
27
+ - \(PDK-802\) Work around OpenSSL multi-threading errors when needed [\#494](https://github.com/puppetlabs/pdk/pull/494) ([scotje](https://github.com/scotje))
28
+
29
+ **Closed issues:**
30
+
31
+ - Creating packages from this repo [\#519](https://github.com/puppetlabs/pdk/issues/519)
32
+ - PDK fails to checkout template from git repo on CentOS 7 [\#490](https://github.com/puppetlabs/pdk/issues/490)
33
+
34
+ **Merged pull requests:**
35
+
36
+ - \(maint\) Switch package-testing to install from build\_data\_url. [\#522](https://github.com/puppetlabs/pdk/pull/522) ([bmjen](https://github.com/bmjen))
37
+ - CI cleanups [\#507](https://github.com/puppetlabs/pdk/pull/507) ([DavidS](https://github.com/DavidS))
38
+ - Ensure that the report.txt ends with a newline [\#501](https://github.com/puppetlabs/pdk/pull/501) ([DavidS](https://github.com/DavidS))
39
+ - \(MAINT\) Bump beaker and beaker-hostgenerator for new platforms [\#499](https://github.com/puppetlabs/pdk/pull/499) ([scotje](https://github.com/scotje))
40
+ - \(maint\) Bumps version for 1.6.0 dev cycle. [\#497](https://github.com/puppetlabs/pdk/pull/497) ([bmjen](https://github.com/bmjen))
41
+ - Convert package acceptance tests over to beaker-rspec & serverspec [\#495](https://github.com/puppetlabs/pdk/pull/495) ([rodjek](https://github.com/rodjek))
42
+
7
43
  ## [v1.5.0](https://github.com/puppetlabs/pdk/tree/v1.5.0) (2018-04-30)
8
44
  [Full Changelog](https://github.com/puppetlabs/pdk/compare/v1.4.1...v1.5.0)
9
45
 
@@ -34,9 +70,11 @@ See the [release notes](https://puppet.com/docs/pdk/latest/release_notes.html) f
34
70
  - Installing PDK from .deb causes unmet dependencies on Ubuntu 17.10 Artful [\#370](https://github.com/puppetlabs/pdk/issues/370)
35
71
  - Repo Configs Contain Invalid URLs [\#319](https://github.com/puppetlabs/pdk/issues/319)
36
72
  - Gems not found in pre-release [\#254](https://github.com/puppetlabs/pdk/issues/254)
73
+ - Running PDK behind a corporate proxy fails [\#227](https://github.com/puppetlabs/pdk/issues/227)
37
74
 
38
75
  **Merged pull requests:**
39
76
 
77
+ - Release 1.5.0 [\#493](https://github.com/puppetlabs/pdk/pull/493) ([bmjen](https://github.com/bmjen))
40
78
  - \(FIXUP\) Fix issue where PDK was invoking wrong Ruby on Windows [\#492](https://github.com/puppetlabs/pdk/pull/492) ([scotje](https://github.com/scotje))
41
79
  - \(maint\) Update package testing for ruby 2.4.4. [\#488](https://github.com/puppetlabs/pdk/pull/488) ([bmjen](https://github.com/bmjen))
42
80
  - \(MAINT\) Fix package tests for version selection and airgapped usage [\#485](https://github.com/puppetlabs/pdk/pull/485) ([scotje](https://github.com/scotje))
@@ -125,6 +163,7 @@ See the [release notes](https://puppet.com/docs/pdk/latest/release_notes.html) f
125
163
 
126
164
  - "pdk convert" and "pdk new module" fails on OSX Sierra [\#396](https://github.com/puppetlabs/pdk/issues/396)
127
165
  - Update shipped ruby [\#395](https://github.com/puppetlabs/pdk/issues/395)
166
+ - Puppet and PDK T-Shirts [\#381](https://github.com/puppetlabs/pdk/issues/381)
128
167
 
129
168
  **Merged pull requests:**
130
169
 
data/lib/pdk/cli/exec.rb CHANGED
@@ -130,6 +130,8 @@ module PDK
130
130
  @process.environment[k] = v
131
131
  end
132
132
 
133
+ @process.environment['BUNDLE_IGNORE_CONFIG'] = '1'
134
+
133
135
  if context == :module
134
136
  @process.environment['GEM_HOME'] = PDK::Util::RubyVersion.gem_home
135
137
  @process.environment['GEM_PATH'] = PDK::Util::RubyVersion.gem_path
@@ -6,44 +6,58 @@ require 'pdk/util'
6
6
  module PDK
7
7
  module CLI
8
8
  class ExecGroup
9
- attr_reader :commands
10
-
11
9
  def initialize(message, opts = {})
12
10
  @options = opts.merge(PDK::CLI::Util.spinner_opts_for_platform)
13
11
 
14
12
  if PDK::CLI::Util.interactive?
15
- @multi_spinner = TTY::Spinner::Multi.new("[:spinner] #{message}", @options)
16
- @multi_spinner.auto_spin
13
+ @spinner = if parallel?
14
+ TTY::Spinner::Multi.new("[:spinner] #{message}", @options)
15
+ else
16
+ TTY::Spinner.new("[:spinner] #{message}", @options)
17
+ end
18
+ @spinner.auto_spin
17
19
  end
18
20
 
19
- @threads = []
21
+ @threads_or_procs = []
20
22
  @exit_codes = []
21
23
  end
22
24
 
23
- def register
25
+ def parallel?
26
+ @options[:parallel].nil? ? true : @options[:parallel]
27
+ end
28
+
29
+ def register(&block)
24
30
  raise PDK::CLI::FatalError, 'No block registered' unless block_given?
25
31
 
26
- @threads << Thread.new do
27
- GettextSetup.initialize(File.absolute_path('../../../locales', File.dirname(__FILE__)))
28
- GettextSetup.negotiate_locale!(GettextSetup.candidate_locales)
29
- @exit_codes << yield
30
- end
32
+ @threads_or_procs << if parallel?
33
+ Thread.new do
34
+ GettextSetup.initialize(File.absolute_path('../../../locales', File.dirname(__FILE__)))
35
+ GettextSetup.negotiate_locale!(GettextSetup.candidate_locales)
36
+ @exit_codes << yield
37
+ end
38
+ else
39
+ block
40
+ end
31
41
  end
32
42
 
33
43
  def add_spinner(message, opts = {})
34
44
  return unless PDK::CLI::Util.interactive?
35
- @multi_spinner.register("[:spinner] #{message}", @options.merge(opts).merge(PDK::CLI::Util.spinner_opts_for_platform))
45
+ @spinner.register("[:spinner] #{message}", @options.merge(opts).merge(PDK::CLI::Util.spinner_opts_for_platform))
36
46
  end
37
47
 
38
48
  def exit_code
39
- @threads.each(&:join)
49
+ if parallel?
50
+ @threads_or_procs.each(&:join)
51
+ else
52
+ @exit_codes = @threads_or_procs.map(&:call)
53
+ end
40
54
 
41
55
  exit_code = @exit_codes.max
42
56
 
43
- if exit_code.zero? && @multi_spinner
44
- @multi_spinner.success
45
- elsif @multi_spinner
46
- @multi_spinner.error
57
+ if exit_code.zero? && @spinner
58
+ @spinner.success
59
+ elsif @spinner
60
+ @spinner.error
47
61
  end
48
62
 
49
63
  exit_code
@@ -11,6 +11,7 @@ module PDK::CLI
11
11
  flag nil, :list, _('List all available unit test files.')
12
12
  flag nil, :parallel, _('Run unit tests in parallel.')
13
13
  flag :v, :verbose, _('More verbose output. Displays examples in each unit test file.')
14
+ flag :c, 'clean-fixtures', _('Clean up downloaded fixtures after the test run.')
14
15
 
15
16
  option nil, :tests, _('Specify a comma-separated list of unit test files to run.'), argument: :required, default: '' do |values|
16
17
  PDK::CLI::Util::OptionValidator.comma_separated_list?(values)
data/lib/pdk/cli/util.rb CHANGED
@@ -62,12 +62,12 @@ module PDK
62
62
 
63
63
  # This means the module does not have a pdk-version tag in the metadata.json
64
64
  # and will require a pdk convert.
65
- if module_pdk_ver.nil?
66
- PDK.logger.warn _('This module is not PDK compatible. Run `pdk convert` to make it compatible with your version of PDK.')
65
+ raise PDK::CLI::ExitWithError, _('This module is not PDK compatible. Run `pdk convert` to make it compatible with your version of PDK.') if module_pdk_ver.nil?
66
+
67
67
  # This checks that the version of pdk in the module's metadata is older
68
68
  # than 1.3.1, which means the module will need to run pdk convert to the
69
69
  # new templates.
70
- elsif Gem::Version.new(module_pdk_ver) < Gem::Version.new('1.3.1')
70
+ if Gem::Version.new(module_pdk_ver) < Gem::Version.new('1.3.1')
71
71
  PDK.logger.warn _('This module template is out of date. Run `pdk convert` to make it compatible with your version of PDK.')
72
72
  # This checks if the version of the installed PDK is older than the
73
73
  # version in the module's metadata, and advises the user to upgrade to
@@ -3,6 +3,7 @@ require 'minitar'
3
3
  require 'zlib'
4
4
  require 'pathspec'
5
5
  require 'find'
6
+ require 'pdk/tests/unit'
6
7
 
7
8
  module PDK
8
9
  module Module
@@ -36,6 +37,7 @@ module PDK
36
37
  #
37
38
  # @return [String] The path to the built package file.
38
39
  def build
40
+ cleanup_module
39
41
  create_build_dir
40
42
 
41
43
  stage_module_in_build_dir
@@ -81,6 +83,14 @@ module PDK
81
83
  FileUtils.rm_rf(build_dir, secure: true)
82
84
  end
83
85
 
86
+ # Clean up any files created during use of the PDK that shouldn't be part
87
+ # of the built module (e.g. test fixtures).
88
+ #
89
+ # @return nil
90
+ def cleanup_module
91
+ PDK::Test::Unit.tear_down
92
+ end
93
+
84
94
  # Combine the module name and version into a Forge-compatible dash
85
95
  # separated string.
86
96
  #
@@ -183,6 +183,7 @@ module PDK
183
183
  update_manager.changes[:modified].each do |_, diff|
184
184
  f.write("\n\n\n" + diff)
185
185
  end
186
+ f.write("\n")
186
187
  end
187
188
  PDK::Report.default_target.puts(_("\nYou can find a report of differences in %{path}.\n\n") % { path: path })
188
189
  end
@@ -45,6 +45,10 @@ module PDK
45
45
  end
46
46
 
47
47
  def self.from_file(metadata_json_path)
48
+ if metadata_json_path.nil?
49
+ raise ArgumentError, _('Cannot read metadata from file: no path to file was given.')
50
+ end
51
+
48
52
  unless File.file?(metadata_json_path)
49
53
  raise ArgumentError, _("'%{file}' does not exist or is not a file.") % { file: metadata_json_path }
50
54
  end
@@ -245,7 +245,7 @@ module PDK
245
245
  conf_defaults = read_config(config_path)
246
246
  sync_config = read_config(sync_config_path) unless sync_config_path.nil?
247
247
  @config = conf_defaults
248
- @config.deep_merge!(sync_config) unless sync_config.nil?
248
+ @config.deep_merge!(sync_config, knockout_prefix: '---') unless sync_config.nil?
249
249
  end
250
250
  file_config = @config.fetch(:global, {})
251
251
  file_config['module_metadata'] = @module_metadata
@@ -268,7 +268,7 @@ module PDK
268
268
  begin
269
269
  YAML.safe_load(File.read(loc), [], [], true)
270
270
  rescue StandardError => e
271
- PDK.logger.warn(_("'%{file}' is not a valid YAML file: %{message}") % { file: config_path, message: e.message })
271
+ PDK.logger.warn(_("'%{file}' is not a valid YAML file: %{message}") % { file: loc, message: e.message })
272
272
  {}
273
273
  end
274
274
  else
@@ -326,7 +326,10 @@ module PDK
326
326
  def context_lines(max_num_lines = 5)
327
327
  return if file.nil? || line.nil?
328
328
 
329
- file_content = File.read(file).split("\n")
329
+ file_path = [file, File.join(PDK::Util.module_root, file)].find { |r| File.file?(r) }
330
+ return if file_path.nil?
331
+
332
+ file_content = File.read(file_path).split("\n")
330
333
  delta = (max_num_lines - 1) / 2
331
334
  min = [0, (line - 1) - delta].max
332
335
  max = [(line - 1) + delta, file_content.length].min
@@ -7,7 +7,7 @@ module PDK
7
7
  module Test
8
8
  class Unit
9
9
  def self.cmd(tests, opts = {})
10
- rake_args = opts.key?(:parallel) ? 'parallel_spec' : 'spec'
10
+ rake_args = opts.key?(:parallel) ? 'parallel_spec_standalone' : 'spec_standalone'
11
11
  rake_args += "[#{tests}]" unless tests.nil?
12
12
  rake_args
13
13
  end
@@ -57,6 +57,8 @@ module PDK
57
57
 
58
58
  return if result[:exit_code].zero?
59
59
 
60
+ tear_down
61
+
60
62
  PDK.logger.error(_('The spec_prep rake task failed with the following error(s):'))
61
63
  print_failure(result, _('Failed to prepare to run the unit tests.'))
62
64
  end
@@ -89,7 +91,7 @@ module PDK
89
91
 
90
92
  result[:exit_code]
91
93
  ensure
92
- tear_down
94
+ tear_down if options[:'clean-fixtures']
93
95
  end
94
96
 
95
97
  def self.parse_output(report, json_data)
@@ -156,7 +156,7 @@ module PDK
156
156
  def update_lock!(options = {})
157
157
  PDK.logger.debug(_('Updating Gemfile dependencies.'))
158
158
 
159
- argv = ['lock', '--update']
159
+ argv = ['lock', "--lockfile=#{gemfile_lock}", '--update']
160
160
 
161
161
  overrides = nil
162
162
 
@@ -174,6 +174,7 @@ module PDK
174
174
  argv << '--conservative' if options && options[:conservative]
175
175
 
176
176
  cmd = bundle_command(*argv).tap do |c|
177
+ c.update_environment('BUNDLE_GEMFILE' => gemfile)
177
178
  c.update_environment(gemfile_env(overrides)) if overrides
178
179
  end
179
180
 
@@ -188,7 +189,8 @@ module PDK
188
189
  end
189
190
 
190
191
  def install!(gem_overrides = {})
191
- argv = ['install', "--gemfile=#{gemfile}", '-j4']
192
+ argv = ['install', "--gemfile=#{gemfile}"]
193
+ argv << '-j4' unless Gem.win_platform? && Gem::Version.new(PDK::Util::RubyVersion.active_ruby_version) < Gem::Version.new('2.3.5')
192
194
  argv << "--path=#{bundle_cachedir}" unless PDK::Util.package_install?
193
195
 
194
196
  cmd = bundle_command(*argv).tap do |c|
@@ -83,7 +83,17 @@ module PDK
83
83
  end
84
84
 
85
85
  def from_module_metadata(metadata = nil)
86
- metadata ||= PDK::Module::Metadata.from_file(PDK::Util.find_upwards('metadata.json'))
86
+ if metadata.nil?
87
+ metadata_file = PDK::Util.find_upwards('metadata.json')
88
+
89
+ unless metadata_file
90
+ PDK.logger.warn _('Unable to determine Puppet version for module: no metadata.json present in module.')
91
+ return nil
92
+ end
93
+
94
+ metadata = PDK::Module::Metadata.from_file(metadata_file)
95
+ end
96
+
87
97
  metadata.validate_puppet_version_requirement!
88
98
  metadata_requirement = metadata.puppet_requirement
89
99
 
@@ -115,7 +115,14 @@ module PDK
115
115
  # targets array in another array. This is so we can loop through the
116
116
  # invokes with the same logic, regardless of which invoke style is
117
117
  # needed.
118
- targets = (self::INVOKE_STYLE == :per_target) ? targets.combination(1).to_a : Array[targets]
118
+ #
119
+ if self::INVOKE_STYLE == :per_target
120
+ targets = targets.combination(1).to_a
121
+ else
122
+ targets = targets.each_slice(1000).to_a
123
+ options[:split_exec] = PDK::CLI::ExecGroup.new(spinner_text(targets), parallel: false)
124
+ end
125
+
119
126
  exit_codes = []
120
127
 
121
128
  targets.each do |invokation_targets|
@@ -124,22 +131,32 @@ module PDK
124
131
 
125
132
  command = PDK::CLI::Exec::Command.new(*cmd_argv).tap do |c|
126
133
  c.context = :module
127
- exec_group = options[:exec_group]
128
- if exec_group
129
- sub_spinner = exec_group.add_spinner(spinner_text(invokation_targets))
130
- c.register_spinner(sub_spinner)
131
- else
132
- c.add_spinner(spinner_text(invokation_targets))
134
+ unless options[:split_exec]
135
+ exec_group = options[:exec_group]
136
+ if exec_group
137
+ sub_spinner = exec_group.add_spinner(spinner_text(invokation_targets))
138
+ c.register_spinner(sub_spinner)
139
+ else
140
+ c.add_spinner(spinner_text(invokation_targets))
141
+ end
133
142
  end
134
143
  end
135
144
 
136
- result = command.execute!
137
- exit_codes << result[:exit_code]
145
+ if options[:split_exec]
146
+ options[:split_exec].register do
147
+ result = command.execute!
148
+ parse_output(report, result, invokation_targets)
149
+ result[:exit_code]
150
+ end
151
+ else
152
+ result = command.execute!
153
+ exit_codes << result[:exit_code]
138
154
 
139
- parse_output(report, result, invokation_targets)
155
+ parse_output(report, result, invokation_targets)
156
+ end
140
157
  end
141
158
 
142
- exit_codes.max
159
+ options.key?(:split_exec) ? options[:split_exec].exit_code : exit_codes.max
143
160
  end
144
161
  end
145
162
  end
data/lib/pdk/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module PDK
2
- VERSION = '1.5.0'.freeze
2
+ VERSION = '1.6.0'.freeze
3
3
  TEMPLATE_REF = VERSION
4
4
  end
data/locales/pdk.pot CHANGED
@@ -6,11 +6,11 @@
6
6
  #, fuzzy
7
7
  msgid ""
8
8
  msgstr ""
9
- "Project-Id-Version: puppet development kit v1.4.1-78-g3268a07\n"
9
+ "Project-Id-Version: puppet development kit v1.5.0-43-ga5c5c15\n"
10
10
  "\n"
11
11
  "Report-Msgid-Bugs-To: docs@puppet.com\n"
12
- "POT-Creation-Date: 2018-04-30 11:41-0700\n"
13
- "PO-Revision-Date: 2018-04-30 11:41-0700\n"
12
+ "POT-Creation-Date: 2018-06-20 21:35-0700\n"
13
+ "PO-Revision-Date: 2018-06-20 21:35-0700\n"
14
14
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
15
15
  "Language-Team: LANGUAGE <LL@li.org>\n"
16
16
  "Language: \n"
@@ -219,23 +219,23 @@ msgstr ""
219
219
  msgid "Expected execution context to be :system or :module but got '%{context}'."
220
220
  msgstr ""
221
221
 
222
- #: ../lib/pdk/cli/exec.rb:153
222
+ #: ../lib/pdk/cli/exec.rb:155
223
223
  msgid "Current working directory is not part of a module. (No metadata.json was found.)"
224
224
  msgstr ""
225
225
 
226
- #: ../lib/pdk/cli/exec.rb:208
226
+ #: ../lib/pdk/cli/exec.rb:210
227
227
  msgid "Executing '%{command}'"
228
228
  msgstr ""
229
229
 
230
- #: ../lib/pdk/cli/exec.rb:211
230
+ #: ../lib/pdk/cli/exec.rb:213
231
231
  msgid "Command environment:"
232
232
  msgstr ""
233
233
 
234
- #: ../lib/pdk/cli/exec.rb:222
234
+ #: ../lib/pdk/cli/exec.rb:224
235
235
  msgid "Failed to execute '%{command}': %{message}"
236
236
  msgstr ""
237
237
 
238
- #: ../lib/pdk/cli/exec.rb:238
238
+ #: ../lib/pdk/cli/exec.rb:240
239
239
  msgid "Execution of '%{command}' complete (duration: %{duration_in_seconds}s; exit code: %{exit_code})"
240
240
  msgstr ""
241
241
 
@@ -395,23 +395,27 @@ msgstr ""
395
395
  msgid "More verbose output. Displays examples in each unit test file."
396
396
  msgstr ""
397
397
 
398
- #: ../lib/pdk/cli/test/unit.rb:15
398
+ #: ../lib/pdk/cli/test/unit.rb:14
399
+ msgid "Clean up downloaded fixtures after the test run."
400
+ msgstr ""
401
+
402
+ #: ../lib/pdk/cli/test/unit.rb:16
399
403
  msgid "Specify a comma-separated list of unit test files to run."
400
404
  msgstr ""
401
405
 
402
- #: ../lib/pdk/cli/test/unit.rb:28
406
+ #: ../lib/pdk/cli/test/unit.rb:29
403
407
  msgid "Unit tests can only be run from inside a valid module directory."
404
408
  msgstr ""
405
409
 
406
- #: ../lib/pdk/cli/test/unit.rb:39
410
+ #: ../lib/pdk/cli/test/unit.rb:40
407
411
  msgid "No unit test files with examples were found."
408
412
  msgstr ""
409
413
 
410
- #: ../lib/pdk/cli/test/unit.rb:41
414
+ #: ../lib/pdk/cli/test/unit.rb:42
411
415
  msgid "Unit Test Files:"
412
416
  msgstr ""
413
417
 
414
- #: ../lib/pdk/cli/test/unit.rb:50
418
+ #: ../lib/pdk/cli/test/unit.rb:51
415
419
  msgid "\t%{id}\t%{description}"
416
420
  msgstr ""
417
421
 
@@ -451,7 +455,7 @@ msgstr ""
451
455
  msgid "Answer \"Y\" to continue or \"n\" to cancel."
452
456
  msgstr ""
453
457
 
454
- #: ../lib/pdk/cli/util.rb:66
458
+ #: ../lib/pdk/cli/util.rb:65
455
459
  msgid "This module is not PDK compatible. Run `pdk convert` to make it compatible with your version of PDK."
456
460
  msgstr ""
457
461
 
@@ -675,11 +679,11 @@ msgid "If there is a public issue tracker for this module, enter its URL here."
675
679
  msgstr ""
676
680
 
677
681
  #: ../lib/pdk/generate/module.rb:302
678
- msgid "create"
682
+ msgid "update"
679
683
  msgstr ""
680
684
 
681
685
  #: ../lib/pdk/generate/module.rb:302
682
- msgid "update"
686
+ msgid "create"
683
687
  msgstr ""
684
688
 
685
689
  #: ../lib/pdk/generate/module.rb:303
@@ -782,7 +786,7 @@ msgstr ""
782
786
  msgid "A task named '%{name}' already exists in this module; defined in %{file}"
783
787
  msgstr ""
784
788
 
785
- #: ../lib/pdk/module/build.rb:147
789
+ #: ../lib/pdk/module/build.rb:157
786
790
  msgid "Symlinks in modules are not supported and will not be included in the package. Please investigate symlink %{from} -> %{to}."
787
791
  msgstr ""
788
792
 
@@ -823,7 +827,7 @@ msgid ""
823
827
  "\n"
824
828
  msgstr ""
825
829
 
826
- #: ../lib/pdk/module/convert.rb:187
830
+ #: ../lib/pdk/module/convert.rb:188
827
831
  msgid ""
828
832
  "\n"
829
833
  "You can find a report of differences in %{path}.\n"
@@ -831,46 +835,50 @@ msgid ""
831
835
  msgstr ""
832
836
 
833
837
  #: ../lib/pdk/module/metadata.rb:49
834
- msgid "'%{file}' does not exist or is not a file."
838
+ msgid "Cannot read metadata from file: no path to file was given."
835
839
  msgstr ""
836
840
 
837
841
  #: ../lib/pdk/module/metadata.rb:53
842
+ msgid "'%{file}' does not exist or is not a file."
843
+ msgstr ""
844
+
845
+ #: ../lib/pdk/module/metadata.rb:57
838
846
  msgid "Unable to open '%{file}' for reading."
839
847
  msgstr ""
840
848
 
841
- #: ../lib/pdk/module/metadata.rb:59
849
+ #: ../lib/pdk/module/metadata.rb:63
842
850
  msgid "Invalid JSON in metadata.json: %{msg}"
843
851
  msgstr ""
844
852
 
845
- #: ../lib/pdk/module/metadata.rb:92
853
+ #: ../lib/pdk/module/metadata.rb:96
846
854
  msgid "Module metadata does not contain any requirements."
847
855
  msgstr ""
848
856
 
849
- #: ../lib/pdk/module/metadata.rb:93
857
+ #: ../lib/pdk/module/metadata.rb:97
850
858
  msgid "Module metadata does not contain a \"puppet\" requirement."
851
859
  msgstr ""
852
860
 
853
- #: ../lib/pdk/module/metadata.rb:94
861
+ #: ../lib/pdk/module/metadata.rb:98
854
862
  msgid "The \"puppet\" requirement in module metadata does not specify a \"version_requirement\"."
855
863
  msgstr ""
856
864
 
857
- #: ../lib/pdk/module/metadata.rb:133
865
+ #: ../lib/pdk/module/metadata.rb:137
858
866
  msgid "Field must be a dash-separated user name and module name."
859
867
  msgstr ""
860
868
 
861
- #: ../lib/pdk/module/metadata.rb:135
869
+ #: ../lib/pdk/module/metadata.rb:139
862
870
  msgid "Module name must contain only alphanumeric or underscore characters."
863
871
  msgstr ""
864
872
 
865
- #: ../lib/pdk/module/metadata.rb:137
873
+ #: ../lib/pdk/module/metadata.rb:141
866
874
  msgid "Module name must begin with a letter."
867
875
  msgstr ""
868
876
 
869
- #: ../lib/pdk/module/metadata.rb:139
877
+ #: ../lib/pdk/module/metadata.rb:143
870
878
  msgid "Namespace must contain only alphanumeric characters."
871
879
  msgstr ""
872
880
 
873
- #: ../lib/pdk/module/metadata.rb:142
881
+ #: ../lib/pdk/module/metadata.rb:146
874
882
  msgid "Invalid 'name' field in metadata.json: %{err}"
875
883
  msgstr ""
876
884
 
@@ -916,6 +924,10 @@ msgstr ""
916
924
  msgid "Unable to clone git repository at '%{repo}' into '%{dest}'."
917
925
  msgstr ""
918
926
 
927
+ #: ../lib/pdk/module/update.rb:12
928
+ msgid "This module is already up to date with version %{version} of the template."
929
+ msgstr ""
930
+
919
931
  #: ../lib/pdk/module/update.rb:97
920
932
  msgid "Updating %{module_name} using the default template, from %{current_version} to %{new_version}"
921
933
  msgstr ""
@@ -1012,35 +1024,35 @@ msgstr ""
1012
1024
  msgid "Preparing to run the unit tests."
1013
1025
  msgstr ""
1014
1026
 
1015
- #: ../lib/pdk/tests/unit.rb:60
1027
+ #: ../lib/pdk/tests/unit.rb:62
1016
1028
  msgid "The spec_prep rake task failed with the following error(s):"
1017
1029
  msgstr ""
1018
1030
 
1019
- #: ../lib/pdk/tests/unit.rb:61
1031
+ #: ../lib/pdk/tests/unit.rb:63
1020
1032
  msgid "Failed to prepare to run the unit tests."
1021
1033
  msgstr ""
1022
1034
 
1023
- #: ../lib/pdk/tests/unit.rb:70
1024
- msgid "Running unit tests in parallel."
1035
+ #: ../lib/pdk/tests/unit.rb:72
1036
+ msgid "Running unit tests."
1025
1037
  msgstr ""
1026
1038
 
1027
- #: ../lib/pdk/tests/unit.rb:70
1028
- msgid "Running unit tests."
1039
+ #: ../lib/pdk/tests/unit.rb:72
1040
+ msgid "Running unit tests in parallel."
1029
1041
  msgstr ""
1030
1042
 
1031
- #: ../lib/pdk/tests/unit.rb:84
1043
+ #: ../lib/pdk/tests/unit.rb:86
1032
1044
  msgid "Unit test output did not contain a valid JSON result: %{output}"
1033
1045
  msgstr ""
1034
1046
 
1035
- #: ../lib/pdk/tests/unit.rb:136
1047
+ #: ../lib/pdk/tests/unit.rb:138
1036
1048
  msgid "Evaluated %{total} tests in %{duration} seconds: %{failures} failures, %{pending} pending."
1037
1049
  msgstr ""
1038
1050
 
1039
- #: ../lib/pdk/tests/unit.rb:193
1051
+ #: ../lib/pdk/tests/unit.rb:195
1040
1052
  msgid "Failed to find valid JSON in output from rspec: %{output}"
1041
1053
  msgstr ""
1042
1054
 
1043
- #: ../lib/pdk/tests/unit.rb:198
1055
+ #: ../lib/pdk/tests/unit.rb:200
1044
1056
  msgid "Unable to enumerate examples. rspec reported: %{message}"
1045
1057
  msgstr ""
1046
1058
 
@@ -1088,25 +1100,25 @@ msgstr ""
1088
1100
  msgid "Updating Gemfile dependencies."
1089
1101
  msgstr ""
1090
1102
 
1091
- #: ../lib/pdk/util/bundler.rb:184
1103
+ #: ../lib/pdk/util/bundler.rb:185
1092
1104
  msgid "Unable to resolve Gemfile dependencies."
1093
1105
  msgstr ""
1094
1106
 
1095
- #: ../lib/pdk/util/bundler.rb:195
1107
+ #: ../lib/pdk/util/bundler.rb:197
1096
1108
  msgid "Installing missing Gemfile dependencies."
1097
1109
  msgstr ""
1098
1110
 
1099
- #: ../lib/pdk/util/bundler.rb:203
1111
+ #: ../lib/pdk/util/bundler.rb:205
1100
1112
  msgid "Unable to install missing Gemfile dependencies."
1101
1113
  msgstr ""
1102
1114
 
1103
- #: ../lib/pdk/util/bundler.rb:217
1115
+ #: ../lib/pdk/util/bundler.rb:219
1104
1116
  msgid ""
1105
1117
  "Failed to generate binstubs for '%{gems}':\n"
1106
1118
  "%{output}"
1107
1119
  msgstr ""
1108
1120
 
1109
- #: ../lib/pdk/util/bundler.rb:218
1121
+ #: ../lib/pdk/util/bundler.rb:220
1110
1122
  msgid "Unable to install requested binstubs."
1111
1123
  msgstr ""
1112
1124
 
@@ -1134,11 +1146,15 @@ msgstr ""
1134
1146
  msgid "Puppet Enterprise %{pe_version} maps to Puppet %{puppet_version}."
1135
1147
  msgstr ""
1136
1148
 
1137
- #: ../lib/pdk/util/puppet_version.rb:106
1149
+ #: ../lib/pdk/util/puppet_version.rb:90
1150
+ msgid "Unable to determine Puppet version for module: no metadata.json present in module."
1151
+ msgstr ""
1152
+
1153
+ #: ../lib/pdk/util/puppet_version.rb:116
1138
1154
  msgid "%{version} is not a valid version number."
1139
1155
  msgstr ""
1140
1156
 
1141
- #: ../lib/pdk/util/puppet_version.rb:140
1157
+ #: ../lib/pdk/util/puppet_version.rb:150
1142
1158
  msgid "Failed to parse Puppet Enterprise version map file."
1143
1159
  msgstr ""
1144
1160
 
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: 1.5.0
4
+ version: 1.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Puppet, Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-04-30 00:00:00.000000000 Z
11
+ date: 2018-06-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler