pdk 1.6.1 → 1.7.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: c70ec79ec06dd3379aa08d51a34733b3794e5b41
4
- data.tar.gz: f8c3a460c65a788e9ec44332530fc2a815060bee
3
+ metadata.gz: 67003e5136efb1f7b88aad41126a684fdf905fea
4
+ data.tar.gz: 53cf697acf1097eef065e18235c71a2e82c6adfc
5
5
  SHA512:
6
- metadata.gz: 6e7376cf631ca56e6058619b772bd3a0f08b31aa356842cce3d90c56570fb8d65357217913cf63c6c5d873d0f153bc8f149449a19333570ca77ec8295e79821a
7
- data.tar.gz: 56afeb93fa8928de3e9a2305f9b29937ecdc0c17323d7b1a8a55fdb64838c302f6ab24cad0be3bf5c5932ddf6c5618924b9238bb102c3d39fc424341fb18cddc
6
+ metadata.gz: 292950f888d8e292e246b251f8a5df637b6f9c20e0ea7cd2c53a92e5ca5303196638b797742e8de7c37445c6e00f3740f06ea945c9fef0c38d064af414029970
7
+ data.tar.gz: 282a942a3866dcd3c99b86ae3837095507c677ccb93652cd6f526868dbfea25b8f32cf764117c17e3608719651d10ce02fa82714955e96417703de3223a95ea6
data/CHANGELOG.md CHANGED
@@ -4,6 +4,23 @@ 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.7.0](https://github.com/puppetlabs/pdk/tree/v1.7.0) (2018-08-14)
8
+ [Full Changelog](https://github.com/puppetlabs/pdk/compare/v1.6.1...v1.7.0)
9
+
10
+ **Implemented enhancements:**
11
+
12
+ - \(PDK-1096, PDK-1097, PDK-1098\) Add puppet-dev flag to validate and test unit [\#559](https://github.com/puppetlabs/pdk/pull/559) ([bmjen](https://github.com/bmjen))
13
+
14
+ **Fixed bugs:**
15
+
16
+ - \(PDK-585\) Unify metadata defaults with/without interview [\#558](https://github.com/puppetlabs/pdk/pull/558) ([rodjek](https://github.com/rodjek))
17
+
18
+ **Merged pull requests:**
19
+
20
+ - \(maint\) Fix package tests [\#562](https://github.com/puppetlabs/pdk/pull/562) ([bmjen](https://github.com/bmjen))
21
+ - \(PDK-1083\) Bump PDK version to 1.7.0.pre [\#556](https://github.com/puppetlabs/pdk/pull/556) ([rodjek](https://github.com/rodjek))
22
+ - \(PDK-1077\) Expand the package acceptance test suite [\#554](https://github.com/puppetlabs/pdk/pull/554) ([rodjek](https://github.com/rodjek))
23
+
7
24
  ## [v1.6.1](https://github.com/puppetlabs/pdk/tree/v1.6.1) (2018-07-25)
8
25
  [Full Changelog](https://github.com/puppetlabs/pdk/compare/v1.6.0...v1.6.1)
9
26
 
@@ -27,6 +44,7 @@ See the [release notes](https://puppet.com/docs/pdk/latest/release_notes.html) f
27
44
 
28
45
  **Merged pull requests:**
29
46
 
47
+ - \(PDK-1078\) Prepare 1.6.1 release [\#555](https://github.com/puppetlabs/pdk/pull/555) ([rodjek](https://github.com/rodjek))
30
48
  - \(PDK-1088\) Remove unnecessary file enumeration loop during PDK build [\#553](https://github.com/puppetlabs/pdk/pull/553) ([scotje](https://github.com/scotje))
31
49
  - \(PDK-1076\) Change version to 1.6.1.pre [\#552](https://github.com/puppetlabs/pdk/pull/552) ([rodjek](https://github.com/rodjek))
32
50
  - \(PDK-1073\) Fix gem bin paths for CLI::Exec managed subprocesses [\#551](https://github.com/puppetlabs/pdk/pull/551) ([scotje](https://github.com/scotje))
@@ -41,7 +59,7 @@ See the [release notes](https://puppet.com/docs/pdk/latest/release_notes.html) f
41
59
  - \(PDK-925\) Exclude files in spec/fixtures from globbed validation targets [\#532](https://github.com/puppetlabs/pdk/pull/532) ([rodjek](https://github.com/rodjek))
42
60
  - \(maint\) Bump version for next dev cycle [\#529](https://github.com/puppetlabs/pdk/pull/529) ([bmjen](https://github.com/bmjen))
43
61
 
44
- ## [v1.6.0](https://github.com/puppetlabs/pdk/tree/v1.6.0) (2018-06-20)
62
+ ## [v1.6.0](https://github.com/puppetlabs/pdk/tree/v1.6.0) (2018-06-21)
45
63
  [Full Changelog](https://github.com/puppetlabs/pdk/compare/v1.5.0...v1.6.0)
46
64
 
47
65
  **Implemented enhancements:**
@@ -747,4 +765,4 @@ See the [release notes](https://puppet.com/docs/pdk/latest/release_notes.html) f
747
765
 
748
766
 
749
767
 
750
- \* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)*
768
+ \* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)*
@@ -8,6 +8,7 @@ module PDK::CLI
8
8
  summary _('Run unit tests.')
9
9
 
10
10
  PDK::CLI.puppet_version_options(self)
11
+ PDK::CLI.puppet_dev_option(self)
11
12
  flag nil, :list, _('List all available unit test files.')
12
13
  flag nil, :parallel, _('Run unit tests in parallel.')
13
14
  flag :v, :verbose, _('More verbose --list output. Displays a list of examples in each unit test file.')
@@ -67,6 +68,7 @@ module PDK::CLI
67
68
 
68
69
  # Ensure that the bundled gems are up to date and correct Ruby is activated before running tests.
69
70
  puppet_env = PDK::CLI::Util.puppet_from_opts_or_env(opts)
71
+ PDK::Util::PuppetVersion.fetch_puppet_dev if opts.key?(:'puppet-dev')
70
72
  PDK::Util::RubyVersion.use(puppet_env[:ruby_version])
71
73
  PDK::Util::Bundler.ensure_bundle!(puppet_env[:gemset])
72
74
 
data/lib/pdk/cli/util.rb CHANGED
@@ -83,12 +83,15 @@ module PDK
83
83
  module_function :module_version_check
84
84
 
85
85
  def puppet_from_opts_or_env(opts)
86
+ use_puppet_dev = (opts || {})[:'puppet-dev'] || ENV['PDK_PUPPET_DEV']
86
87
  desired_puppet_version = (opts || {})[:'puppet-version'] || ENV['PDK_PUPPET_VERSION']
87
88
  desired_pe_version = (opts || {})[:'pe-version'] || ENV['PDK_PE_VERSION']
88
89
 
89
90
  begin
90
91
  puppet_env =
91
- if desired_puppet_version
92
+ if use_puppet_dev
93
+ PDK::Util::PuppetVersion.puppet_dev_env
94
+ elsif desired_puppet_version
92
95
  PDK::Util::PuppetVersion.find_gem_for(desired_puppet_version)
93
96
  elsif desired_pe_version
94
97
  PDK::Util::PuppetVersion.from_pe_version(desired_pe_version)
@@ -132,6 +135,21 @@ module PDK
132
135
  pe_ver_specs << '--pe-version option' if opts[:'pe-version']
133
136
  pe_ver_specs << 'PDK_PE_VERSION environment variable' if ENV['PDK_PE_VERSION'] && !ENV['PDK_PE_VERSION'].empty?
134
137
 
138
+ puppet_dev_specs = []
139
+ puppet_dev_specs << '--puppet-dev flag' if opts[:'puppet-dev']
140
+ puppet_dev_specs << 'PDK_PUPPET_DEV environment variable' if ENV['PDK_PUPPET_DEV'] && !ENV['PDK_PUPPET_DEV'].empty?
141
+
142
+ puppet_dev_specs.each do |pup_dev_spec|
143
+ [puppet_ver_specs, pe_ver_specs].each do |offending|
144
+ next if offending.empty?
145
+
146
+ raise PDK::CLI::ExitWithError, _('You cannot specify a %{first} and %{second} at the same time') % {
147
+ first: pup_dev_spec,
148
+ second: offending.first,
149
+ }
150
+ end
151
+ end
152
+
135
153
  puppet_ver_specs.each do |pup_ver_spec|
136
154
  next if pe_ver_specs.empty?
137
155
 
@@ -143,7 +161,15 @@ module PDK
143
161
  }
144
162
  end
145
163
 
146
- if puppet_ver_specs.size == 2
164
+ if puppet_dev_specs.size == 2
165
+ warning_str = 'Puppet dev flag from command line: "--puppet-dev" '
166
+ warning_str += 'overrides value from environment: "PDK_PUPPET_DEV=true". You should not specify both.'
167
+
168
+ PDK.logger.warn(_(warning_str) % {
169
+ pup_ver_opt: opts[:'puppet-dev'],
170
+ pup_ver_env: ENV['PDK_PUPPET_DEV'],
171
+ })
172
+ elsif puppet_ver_specs.size == 2
147
173
  warning_str = 'Puppet version option from command line: "--puppet-version=%{pup_ver_opt}" '
148
174
  warning_str += 'overrides value from environment: "PDK_PUPPET_VERSION=%{pup_ver_env}". You should not specify both.'
149
175
 
@@ -14,6 +14,7 @@ module PDK::CLI
14
14
  )
15
15
 
16
16
  PDK::CLI.puppet_version_options(self)
17
+ PDK::CLI.puppet_dev_option(self)
17
18
  flag nil, :list, _('List all available validators.')
18
19
  flag :a, 'auto-correct', _('Automatically correct problems where possible.')
19
20
  flag nil, :parallel, _('Run validations in parallel.')
@@ -87,6 +88,7 @@ module PDK::CLI
87
88
 
88
89
  # Ensure that the bundled gems are up to date and correct Ruby is activated before running any validations.
89
90
  puppet_env = PDK::CLI::Util.puppet_from_opts_or_env(opts)
91
+ PDK::Util::PuppetVersion.fetch_puppet_dev if opts.key?(:'puppet-dev')
90
92
  PDK::Util::RubyVersion.use(puppet_env[:ruby_version])
91
93
  PDK::Util::Bundler.ensure_bundle!(puppet_env[:gemset])
92
94
 
data/lib/pdk/cli.rb CHANGED
@@ -55,6 +55,12 @@ module PDK::CLI
55
55
  dsl.option nil, 'pe-version', _('Puppet Enterprise version to run tests or validations against.'), argument: :required
56
56
  end
57
57
 
58
+ def self.puppet_dev_option(dsl)
59
+ dsl.option nil,
60
+ 'puppet-dev',
61
+ _('When specified, PDK will validate or test against the current Puppet source from github.com. To use this option, you must have network access to https://github.com.')
62
+ end
63
+
58
64
  @base_cmd = Cri::Command.define do
59
65
  name 'pdk'
60
66
  usage _('pdk command [options]')
@@ -113,13 +113,7 @@ module PDK
113
113
  def self.prepare_metadata(opts = {})
114
114
  opts[:username] = (opts[:username] || PDK.answers['forge_username'] || username_from_login).downcase
115
115
 
116
- defaults = {
117
- 'version' => '0.1.0',
118
- 'dependencies' => [],
119
- 'requirements' => [
120
- { 'name' => 'puppet', 'version_requirement' => '>= 4.7.0 < 6.0.0' },
121
- ],
122
- }
116
+ defaults = PDK::Module::Metadata::DEFAULTS.dup
123
117
 
124
118
  defaults['name'] = "#{opts[:username]}-#{opts[:module_name]}" unless opts[:module_name].nil?
125
119
  defaults['author'] = PDK.answers['author'] unless PDK.answers['author'].nil?
@@ -199,57 +193,11 @@ module PDK
199
193
  question: _('What operating systems does this module support?'),
200
194
  help: _('Use the up and down keys to move between the choices, space to select and enter to continue.'),
201
195
  required: true,
202
- choices: {
203
- 'RedHat based Linux' => [
204
- {
205
- 'operatingsystem' => 'CentOS',
206
- 'operatingsystemrelease' => ['7'],
207
- },
208
- {
209
- 'operatingsystem' => 'OracleLinux',
210
- 'operatingsystemrelease' => ['7'],
211
- },
212
- {
213
- 'operatingsystem' => 'RedHat',
214
- 'operatingsystemrelease' => ['7'],
215
- },
216
- {
217
- 'operatingsystem' => 'Scientific',
218
- 'operatingsystemrelease' => ['7'],
219
- },
220
- ],
221
- 'Debian based Linux' => [
222
- {
223
- 'operatingsystem' => 'Debian',
224
- 'operatingsystemrelease' => ['8'],
225
- },
226
- {
227
- 'operatingsystem' => 'Ubuntu',
228
- 'operatingsystemrelease' => ['16.04'],
229
- },
230
- ],
231
- 'Fedora' => {
232
- 'operatingsystem' => 'Fedora',
233
- 'operatingsystemrelease' => ['25'],
234
- },
235
- 'OSX' => {
236
- 'operatingsystem' => 'Darwin',
237
- 'operatingsystemrelease' => ['16'],
238
- },
239
- 'SLES' => {
240
- 'operatingsystem' => 'SLES',
241
- 'operatingsystemrelease' => ['12'],
242
- },
243
- 'Solaris' => {
244
- 'operatingsystem' => 'Solaris',
245
- 'operatingsystemrelease' => ['11'],
246
- },
247
- 'Windows' => {
248
- 'operatingsystem' => 'windows',
249
- 'operatingsystemrelease' => ['2008 R2', '2012 R2', '10'],
250
- },
251
- },
252
- default: [1, 2, 7],
196
+ choices: PDK::Module::Metadata::OPERATING_SYSTEMS,
197
+ default: PDK::Module::Metadata::DEFAULT_OPERATING_SYSTEMS.map do |os_name|
198
+ # tty-prompt uses a 1-index
199
+ PDK::Module::Metadata::OPERATING_SYSTEMS.keys.index(os_name) + 1
200
+ end,
253
201
  },
254
202
  {
255
203
  name: 'summary',
@@ -5,6 +5,63 @@ module PDK
5
5
  class Metadata
6
6
  attr_accessor :data
7
7
 
8
+ OPERATING_SYSTEMS = {
9
+ 'RedHat based Linux' => [
10
+ {
11
+ 'operatingsystem' => 'CentOS',
12
+ 'operatingsystemrelease' => ['7'],
13
+ },
14
+ {
15
+ 'operatingsystem' => 'OracleLinux',
16
+ 'operatingsystemrelease' => ['7'],
17
+ },
18
+ {
19
+ 'operatingsystem' => 'RedHat',
20
+ 'operatingsystemrelease' => ['7'],
21
+ },
22
+ {
23
+ 'operatingsystem' => 'Scientific',
24
+ 'operatingsystemrelease' => ['7'],
25
+ },
26
+ ],
27
+ 'Debian based Linux' => [
28
+ {
29
+ 'operatingsystem' => 'Debian',
30
+ 'operatingsystemrelease' => ['8'],
31
+ },
32
+ {
33
+ 'operatingsystem' => 'Ubuntu',
34
+ 'operatingsystemrelease' => ['16.04'],
35
+ },
36
+ ],
37
+ 'Fedora' => {
38
+ 'operatingsystem' => 'Fedora',
39
+ 'operatingsystemrelease' => ['25'],
40
+ },
41
+ 'OSX' => {
42
+ 'operatingsystem' => 'Darwin',
43
+ 'operatingsystemrelease' => ['16'],
44
+ },
45
+ 'SLES' => {
46
+ 'operatingsystem' => 'SLES',
47
+ 'operatingsystemrelease' => ['12'],
48
+ },
49
+ 'Solaris' => {
50
+ 'operatingsystem' => 'Solaris',
51
+ 'operatingsystemrelease' => ['11'],
52
+ },
53
+ 'Windows' => {
54
+ 'operatingsystem' => 'windows',
55
+ 'operatingsystemrelease' => ['2008 R2', '2012 R2', '10'],
56
+ },
57
+ }.freeze
58
+
59
+ DEFAULT_OPERATING_SYSTEMS = [
60
+ 'RedHat based Linux',
61
+ 'Debian based Linux',
62
+ 'Windows',
63
+ ].freeze
64
+
8
65
  DEFAULTS = {
9
66
  'name' => nil,
10
67
  'version' => '0.1.0',
@@ -16,24 +73,9 @@ module PDK
16
73
  'issues_url' => nil,
17
74
  'dependencies' => [],
18
75
  'data_provider' => nil,
19
- 'operatingsystem_support' => [
20
- {
21
- 'operatingsystem' => 'Debian',
22
- 'operatingsystemrelease' => ['8'],
23
- },
24
- {
25
- 'operatingsystem' => 'RedHat',
26
- 'operatingsystemrelease' => ['7.0'],
27
- },
28
- {
29
- 'operatingsystem' => 'Ubuntu',
30
- 'operatingsystemrelease' => ['16.04'],
31
- },
32
- {
33
- 'operatingsystem' => 'windows',
34
- 'operatingsystemrelease' => ['2012 R2'],
35
- },
36
- ],
76
+ 'operatingsystem_support' => DEFAULT_OPERATING_SYSTEMS.map { |os_name|
77
+ OPERATING_SYSTEMS[os_name]
78
+ }.flatten,
37
79
  'requirements' => [
38
80
  { 'name' => 'puppet', 'version_requirement' => '>= 4.7.0 < 6.0.0' },
39
81
  ],
@@ -1,4 +1,5 @@
1
1
  require 'pdk/util'
2
+ require 'pdk/util/git'
2
3
 
3
4
  module PDK
4
5
  module Util
@@ -6,7 +7,7 @@ module PDK
6
7
  class << self
7
8
  extend Forwardable
8
9
 
9
- def_delegators :instance, :find_gem_for, :from_pe_version, :from_module_metadata, :latest_available
10
+ def_delegators :instance, :puppet_dev_env, :puppet_dev_path, :fetch_puppet_dev, :find_gem_for, :from_pe_version, :from_module_metadata, :latest_available
10
11
 
11
12
  attr_writer :instance
12
13
 
@@ -16,6 +17,19 @@ module PDK
16
17
  end
17
18
 
18
19
  PE_VERSIONS_URL = 'https://forgeapi.puppet.com/private/versions/pe'.freeze
20
+ DEFAULT_PUPPET_DEV_URL = 'https://github.com/puppetlabs/puppet'.freeze
21
+ DEFAULT_PUPPET_DEV_BRANCH = 'master'.freeze
22
+
23
+ def puppet_dev_env
24
+ {
25
+ gem_version: 'file://%{path}' % { path: puppet_dev_path },
26
+ ruby_version: PDK::Util::RubyVersion.default_ruby_version,
27
+ }
28
+ end
29
+
30
+ def puppet_dev_path
31
+ File.join(PDK::Util.cachedir, 'src', 'puppet')
32
+ end
19
33
 
20
34
  def latest_available
21
35
  latest = find_gem(Gem::Requirement.create('>= 0'))
@@ -27,6 +41,25 @@ module PDK
27
41
  latest
28
42
  end
29
43
 
44
+ def fetch_puppet_dev
45
+ unless PDK::Util::Git.remote_repo? puppet_dev_path
46
+ FileUtils.mkdir_p puppet_dev_path
47
+ clone_result = PDK::Util::Git.git('clone', DEFAULT_PUPPET_DEV_URL, puppet_dev_path)
48
+ return if clone_result[:exit_code].zero?
49
+
50
+ PDK.logger.error clone_result[:stdout]
51
+ PDK.logger.error clone_result[:stderr]
52
+ raise PDK::CLI::FatalError, _("Unable to clone git repository at '%{repo}'.") % { repo: DEFAULT_PUPPET_DEV_URL }
53
+ end
54
+
55
+ fetch_result = PDK::Util::Git.git('--git-dir', File.join(puppet_dev_path, '.git'), 'pull', '--ff-only')
56
+ return if fetch_result[:exit_code].zero?
57
+
58
+ PDK.logger.error fetch_result[:stdout]
59
+ PDK.logger.error fetch_result[:stderr]
60
+ raise PDK::CLI::FatalError, _("Unable to pull updates for git repository at '%{cachedir}'.") % { repo: puppet_dev_path }
61
+ end
62
+
30
63
  def find_gem_for(version_str)
31
64
  version = parse_specified_version(version_str)
32
65
 
data/lib/pdk/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module PDK
2
- VERSION = '1.6.1'.freeze
2
+ VERSION = '1.7.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.6.0-37-g9a9b458\n"
9
+ "Project-Id-Version: puppet development kit v1.6.1-11-g2632a3b30\n"
10
10
  "\n"
11
11
  "Report-Msgid-Bugs-To: docs@puppet.com\n"
12
- "POT-Creation-Date: 2018-07-25 13:54+1000\n"
13
- "PO-Revision-Date: 2018-07-25 13:54+1000\n"
12
+ "POT-Creation-Date: 2018-08-14 16:41-0700\n"
13
+ "PO-Revision-Date: 2018-08-14 16:41-0700\n"
14
14
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
15
15
  "Language-Team: LANGUAGE <LL@li.org>\n"
16
16
  "Language: \n"
@@ -59,35 +59,39 @@ msgstr ""
59
59
  msgid "Puppet Enterprise version to run tests or validations against."
60
60
  msgstr ""
61
61
 
62
- #: ../lib/pdk/cli.rb:60
62
+ #: ../lib/pdk/cli.rb:61
63
+ msgid "When specified, PDK will validate or test against the current Puppet source from github.com. To use this option, you must have network access to https://github.com."
64
+ msgstr ""
65
+
66
+ #: ../lib/pdk/cli.rb:66
63
67
  msgid "pdk command [options]"
64
68
  msgstr ""
65
69
 
66
- #: ../lib/pdk/cli.rb:61
70
+ #: ../lib/pdk/cli.rb:67
67
71
  msgid "Puppet Development Kit"
68
72
  msgstr ""
69
73
 
70
- #: ../lib/pdk/cli.rb:62
74
+ #: ../lib/pdk/cli.rb:68
71
75
  msgid "The shortest path to better modules."
72
76
  msgstr ""
73
77
 
74
- #: ../lib/pdk/cli.rb:65
78
+ #: ../lib/pdk/cli.rb:71
75
79
  msgid "Show version of pdk."
76
80
  msgstr ""
77
81
 
78
- #: ../lib/pdk/cli.rb:70
82
+ #: ../lib/pdk/cli.rb:76
79
83
  msgid "Show help for this command."
80
84
  msgstr ""
81
85
 
82
- #: ../lib/pdk/cli.rb:75
86
+ #: ../lib/pdk/cli.rb:81
83
87
  msgid "Specify desired output format. Valid formats are '%{available_formats}'. You may also specify a file to which the formatted output is sent, for example: '--format=junit:report.xml'. This option may be specified multiple times if each option specifies a distinct target file."
84
88
  msgstr ""
85
89
 
86
- #: ../lib/pdk/cli.rb:86
90
+ #: ../lib/pdk/cli.rb:92
87
91
  msgid "Enable debug output."
88
92
  msgstr ""
89
93
 
90
- #: ../lib/pdk/cli.rb:90
94
+ #: ../lib/pdk/cli.rb:96
91
95
  msgid "Path to an answer file."
92
96
  msgstr ""
93
97
 
@@ -383,43 +387,43 @@ msgstr ""
383
387
  msgid "Run unit tests."
384
388
  msgstr ""
385
389
 
386
- #: ../lib/pdk/cli/test/unit.rb:11
390
+ #: ../lib/pdk/cli/test/unit.rb:12
387
391
  msgid "List all available unit test files."
388
392
  msgstr ""
389
393
 
390
- #: ../lib/pdk/cli/test/unit.rb:12
394
+ #: ../lib/pdk/cli/test/unit.rb:13
391
395
  msgid "Run unit tests in parallel."
392
396
  msgstr ""
393
397
 
394
- #: ../lib/pdk/cli/test/unit.rb:13
398
+ #: ../lib/pdk/cli/test/unit.rb:14
395
399
  msgid "More verbose --list output. Displays a list of examples in each unit test file."
396
400
  msgstr ""
397
401
 
398
- #: ../lib/pdk/cli/test/unit.rb:14
402
+ #: ../lib/pdk/cli/test/unit.rb:15
399
403
  msgid "Clean up downloaded fixtures after the test run."
400
404
  msgstr ""
401
405
 
402
- #: ../lib/pdk/cli/test/unit.rb:16
406
+ #: ../lib/pdk/cli/test/unit.rb:17
403
407
  msgid "Specify a comma-separated list of unit test files to run."
404
408
  msgstr ""
405
409
 
406
- #: ../lib/pdk/cli/test/unit.rb:29
410
+ #: ../lib/pdk/cli/test/unit.rb:30
407
411
  msgid "Unit tests can only be run from inside a valid module directory."
408
412
  msgstr ""
409
413
 
410
- #: ../lib/pdk/cli/test/unit.rb:40
414
+ #: ../lib/pdk/cli/test/unit.rb:41
411
415
  msgid "No unit test files with examples were found."
412
416
  msgstr ""
413
417
 
414
- #: ../lib/pdk/cli/test/unit.rb:42
418
+ #: ../lib/pdk/cli/test/unit.rb:43
415
419
  msgid "Unit Test Files:"
416
420
  msgstr ""
417
421
 
418
- #: ../lib/pdk/cli/test/unit.rb:51
422
+ #: ../lib/pdk/cli/test/unit.rb:52
419
423
  msgid "\t%{id}\t%{description}"
420
424
  msgstr ""
421
425
 
422
- #: ../lib/pdk/cli/test/unit.rb:56
426
+ #: ../lib/pdk/cli/test/unit.rb:57
423
427
  msgid "--verbose has no effect when not used with --list"
424
428
  msgstr ""
425
429
 
@@ -475,15 +479,19 @@ msgstr ""
475
479
  msgid "This module is compatible with an older version of PDK. Run `pdk update` to update it to your version of PDK."
476
480
  msgstr ""
477
481
 
478
- #: ../lib/pdk/cli/util.rb:103
482
+ #: ../lib/pdk/cli/util.rb:106
479
483
  msgid "Using Ruby %{version}"
480
484
  msgstr ""
481
485
 
482
- #: ../lib/pdk/cli/util.rb:113
486
+ #: ../lib/pdk/cli/util.rb:116
483
487
  msgid "Using %{gem} %{version}"
484
488
  msgstr ""
485
489
 
486
- #: ../lib/pdk/cli/util.rb:140
490
+ #: ../lib/pdk/cli/util.rb:146
491
+ msgid "You cannot specify a %{first} and %{second} at the same time"
492
+ msgstr ""
493
+
494
+ #: ../lib/pdk/cli/util.rb:158
487
495
  msgid "You cannot specify a %{first} and %{second} at the same time."
488
496
  msgstr ""
489
497
 
@@ -528,35 +536,35 @@ msgid ""
528
536
  "[targets] is an optional space-separated list of files or directories to be validated. If not specified, validators are run against all applicable files in the module."
529
537
  msgstr ""
530
538
 
531
- #: ../lib/pdk/cli/validate.rb:17
539
+ #: ../lib/pdk/cli/validate.rb:18
532
540
  msgid "List all available validators."
533
541
  msgstr ""
534
542
 
535
- #: ../lib/pdk/cli/validate.rb:18
543
+ #: ../lib/pdk/cli/validate.rb:19
536
544
  msgid "Automatically correct problems where possible."
537
545
  msgstr ""
538
546
 
539
- #: ../lib/pdk/cli/validate.rb:19
547
+ #: ../lib/pdk/cli/validate.rb:20
540
548
  msgid "Run validations in parallel."
541
549
  msgstr ""
542
550
 
543
- #: ../lib/pdk/cli/validate.rb:32
551
+ #: ../lib/pdk/cli/validate.rb:33
544
552
  msgid "Available validators: %{validator_names}"
545
553
  msgstr ""
546
554
 
547
- #: ../lib/pdk/cli/validate.rb:39
555
+ #: ../lib/pdk/cli/validate.rb:40
548
556
  msgid "Code validation can only be run from inside a valid module directory"
549
557
  msgstr ""
550
558
 
551
- #: ../lib/pdk/cli/validate.rb:55
559
+ #: ../lib/pdk/cli/validate.rb:56
552
560
  msgid "Unknown validator '%{v}'. Available validators: %{validators}."
553
561
  msgstr ""
554
562
 
555
- #: ../lib/pdk/cli/validate.rb:65 ../lib/pdk/cli/validate.rb:69
563
+ #: ../lib/pdk/cli/validate.rb:66 ../lib/pdk/cli/validate.rb:70
556
564
  msgid "Running all available validators..."
557
565
  msgstr ""
558
566
 
559
- #: ../lib/pdk/cli/validate.rb:95
567
+ #: ../lib/pdk/cli/validate.rb:97
560
568
  msgid "Validating module using %{num_of_threads} threads"
561
569
  msgstr ""
562
570
 
@@ -590,107 +598,107 @@ msgstr ""
590
598
  msgid "Your username is not a valid Forge username. Proceeding with the username %{username}. You can fix this later in metadata.json."
591
599
  msgstr ""
592
600
 
593
- #: ../lib/pdk/generate/module.rb:146
601
+ #: ../lib/pdk/generate/module.rb:140
594
602
  msgid "Unable to create directory '%{dir}': %{message}"
595
603
  msgstr ""
596
604
 
597
- #: ../lib/pdk/generate/module.rb:158
605
+ #: ../lib/pdk/generate/module.rb:152
598
606
  msgid "If you have a name for your module, add it here."
599
607
  msgstr ""
600
608
 
601
- #: ../lib/pdk/generate/module.rb:159
609
+ #: ../lib/pdk/generate/module.rb:153
602
610
  msgid "This is the name that will be associated with your module, it should be relevant to the modules content."
603
611
  msgstr ""
604
612
 
605
- #: ../lib/pdk/generate/module.rb:162
613
+ #: ../lib/pdk/generate/module.rb:156
606
614
  msgid "Module names must begin with a lowercase letter and can only include lowercase letters, numbers, and underscores."
607
615
  msgstr ""
608
616
 
609
- #: ../lib/pdk/generate/module.rb:166
617
+ #: ../lib/pdk/generate/module.rb:160
610
618
  msgid "If you have a Puppet Forge username, add it here."
611
619
  msgstr ""
612
620
 
613
- #: ../lib/pdk/generate/module.rb:167
621
+ #: ../lib/pdk/generate/module.rb:161
614
622
  msgid "We can use this to upload your module to the Forge when it's complete."
615
623
  msgstr ""
616
624
 
617
- #: ../lib/pdk/generate/module.rb:170
625
+ #: ../lib/pdk/generate/module.rb:164
618
626
  msgid "Forge usernames can only contain lowercase letters and numbers"
619
627
  msgstr ""
620
628
 
621
- #: ../lib/pdk/generate/module.rb:175
629
+ #: ../lib/pdk/generate/module.rb:169
622
630
  msgid "What version is this module?"
623
631
  msgstr ""
624
632
 
625
- #: ../lib/pdk/generate/module.rb:176
633
+ #: ../lib/pdk/generate/module.rb:170
626
634
  msgid "Puppet uses Semantic Versioning (semver.org) to version modules."
627
635
  msgstr ""
628
636
 
629
- #: ../lib/pdk/generate/module.rb:179
637
+ #: ../lib/pdk/generate/module.rb:173
630
638
  msgid "Semantic Version numbers must be in the form MAJOR.MINOR.PATCH"
631
639
  msgstr ""
632
640
 
633
- #: ../lib/pdk/generate/module.rb:185
641
+ #: ../lib/pdk/generate/module.rb:179
634
642
  msgid "Who wrote this module?"
635
643
  msgstr ""
636
644
 
637
- #: ../lib/pdk/generate/module.rb:186
645
+ #: ../lib/pdk/generate/module.rb:180
638
646
  msgid "This is used to credit the module's author."
639
647
  msgstr ""
640
648
 
641
- #: ../lib/pdk/generate/module.rb:192
649
+ #: ../lib/pdk/generate/module.rb:186
642
650
  msgid "What license does this module code fall under?"
643
651
  msgstr ""
644
652
 
645
- #: ../lib/pdk/generate/module.rb:193
653
+ #: ../lib/pdk/generate/module.rb:187
646
654
  msgid "This should be an identifier from https://spdx.org/licenses/. Common values are \"Apache-2.0\", \"MIT\", or \"proprietary\"."
647
655
  msgstr ""
648
656
 
649
- #: ../lib/pdk/generate/module.rb:199
657
+ #: ../lib/pdk/generate/module.rb:193
650
658
  msgid "What operating systems does this module support?"
651
659
  msgstr ""
652
660
 
653
- #: ../lib/pdk/generate/module.rb:200
661
+ #: ../lib/pdk/generate/module.rb:194
654
662
  msgid "Use the up and down keys to move between the choices, space to select and enter to continue."
655
663
  msgstr ""
656
664
 
657
- #: ../lib/pdk/generate/module.rb:256
665
+ #: ../lib/pdk/generate/module.rb:204
658
666
  msgid "Summarize the purpose of this module in a single sentence."
659
667
  msgstr ""
660
668
 
661
- #: ../lib/pdk/generate/module.rb:257
669
+ #: ../lib/pdk/generate/module.rb:205
662
670
  msgid "This helps other Puppet users understand what the module does."
663
671
  msgstr ""
664
672
 
665
- #: ../lib/pdk/generate/module.rb:264
673
+ #: ../lib/pdk/generate/module.rb:212
666
674
  msgid "If there is a source code repository for this module, enter the URL here."
667
675
  msgstr ""
668
676
 
669
- #: ../lib/pdk/generate/module.rb:265
677
+ #: ../lib/pdk/generate/module.rb:213
670
678
  msgid "Skip this if no repository exists yet. You can update this later in the metadata.json."
671
679
  msgstr ""
672
680
 
673
- #: ../lib/pdk/generate/module.rb:272
681
+ #: ../lib/pdk/generate/module.rb:220
674
682
  msgid "If there is a URL where others can learn more about this module, enter it here."
675
683
  msgstr ""
676
684
 
677
- #: ../lib/pdk/generate/module.rb:273 ../lib/pdk/generate/module.rb:280
685
+ #: ../lib/pdk/generate/module.rb:221 ../lib/pdk/generate/module.rb:228
678
686
  msgid "Optional. You can update this later in the metadata.json."
679
687
  msgstr ""
680
688
 
681
- #: ../lib/pdk/generate/module.rb:279
689
+ #: ../lib/pdk/generate/module.rb:227
682
690
  msgid "If there is a public issue tracker for this module, enter its URL here."
683
691
  msgstr ""
684
692
 
685
- #: ../lib/pdk/generate/module.rb:306
686
- msgid "update"
693
+ #: ../lib/pdk/generate/module.rb:254
694
+ msgid "create"
687
695
  msgstr ""
688
696
 
689
- #: ../lib/pdk/generate/module.rb:306
690
- msgid "create"
697
+ #: ../lib/pdk/generate/module.rb:254
698
+ msgid "update"
691
699
  msgstr ""
692
700
 
693
- #: ../lib/pdk/generate/module.rb:307
701
+ #: ../lib/pdk/generate/module.rb:255
694
702
  msgid ""
695
703
  "\n"
696
704
  "We need to %{action} the metadata.json file for this module, so we\\'re going to ask you %{count} questions.\n"
@@ -698,19 +706,19 @@ msgid ""
698
706
  "\n"
699
707
  msgstr ""
700
708
 
701
- #: ../lib/pdk/generate/module.rb:321
709
+ #: ../lib/pdk/generate/module.rb:269
702
710
  msgid "No answers given, interview cancelled."
703
711
  msgstr ""
704
712
 
705
- #: ../lib/pdk/generate/module.rb:345
713
+ #: ../lib/pdk/generate/module.rb:293
706
714
  msgid "Metadata will be generated based on this information, continue?"
707
715
  msgstr ""
708
716
 
709
- #: ../lib/pdk/generate/module.rb:347
717
+ #: ../lib/pdk/generate/module.rb:295
710
718
  msgid "Interview cancelled; exiting."
711
719
  msgstr ""
712
720
 
713
- #: ../lib/pdk/generate/module.rb:351
721
+ #: ../lib/pdk/generate/module.rb:299
714
722
  msgid "Process cancelled; exiting."
715
723
  msgstr ""
716
724
 
@@ -838,51 +846,51 @@ msgid ""
838
846
  "\n"
839
847
  msgstr ""
840
848
 
841
- #: ../lib/pdk/module/metadata.rb:49
849
+ #: ../lib/pdk/module/metadata.rb:91
842
850
  msgid "Cannot read metadata from file: no path to file was given."
843
851
  msgstr ""
844
852
 
845
- #: ../lib/pdk/module/metadata.rb:53
853
+ #: ../lib/pdk/module/metadata.rb:95
846
854
  msgid "'%{file}' does not exist or is not a file."
847
855
  msgstr ""
848
856
 
849
- #: ../lib/pdk/module/metadata.rb:57
857
+ #: ../lib/pdk/module/metadata.rb:99
850
858
  msgid "Unable to open '%{file}' for reading."
851
859
  msgstr ""
852
860
 
853
- #: ../lib/pdk/module/metadata.rb:63
861
+ #: ../lib/pdk/module/metadata.rb:105
854
862
  msgid "Invalid JSON in metadata.json: %{msg}"
855
863
  msgstr ""
856
864
 
857
- #: ../lib/pdk/module/metadata.rb:96
865
+ #: ../lib/pdk/module/metadata.rb:138
858
866
  msgid "Module metadata does not contain any requirements."
859
867
  msgstr ""
860
868
 
861
- #: ../lib/pdk/module/metadata.rb:97
869
+ #: ../lib/pdk/module/metadata.rb:139
862
870
  msgid "Module metadata does not contain a \"puppet\" requirement."
863
871
  msgstr ""
864
872
 
865
- #: ../lib/pdk/module/metadata.rb:98
873
+ #: ../lib/pdk/module/metadata.rb:140
866
874
  msgid "The \"puppet\" requirement in module metadata does not specify a \"version_requirement\"."
867
875
  msgstr ""
868
876
 
869
- #: ../lib/pdk/module/metadata.rb:137
877
+ #: ../lib/pdk/module/metadata.rb:179
870
878
  msgid "Field must be a dash-separated user name and module name."
871
879
  msgstr ""
872
880
 
873
- #: ../lib/pdk/module/metadata.rb:139
881
+ #: ../lib/pdk/module/metadata.rb:181
874
882
  msgid "Module name must contain only alphanumeric or underscore characters."
875
883
  msgstr ""
876
884
 
877
- #: ../lib/pdk/module/metadata.rb:141
885
+ #: ../lib/pdk/module/metadata.rb:183
878
886
  msgid "Module name must begin with a letter."
879
887
  msgstr ""
880
888
 
881
- #: ../lib/pdk/module/metadata.rb:143
889
+ #: ../lib/pdk/module/metadata.rb:185
882
890
  msgid "Namespace must contain only alphanumeric characters."
883
891
  msgstr ""
884
892
 
885
- #: ../lib/pdk/module/metadata.rb:146
893
+ #: ../lib/pdk/module/metadata.rb:188
886
894
  msgid "Invalid 'name' field in metadata.json: %{err}"
887
895
  msgstr ""
888
896
 
@@ -1041,11 +1049,11 @@ msgid "Failed to prepare to run the unit tests."
1041
1049
  msgstr ""
1042
1050
 
1043
1051
  #: ../lib/pdk/tests/unit.rb:72
1044
- msgid "Running unit tests in parallel."
1052
+ msgid "Running unit tests."
1045
1053
  msgstr ""
1046
1054
 
1047
1055
  #: ../lib/pdk/tests/unit.rb:72
1048
- msgid "Running unit tests."
1056
+ msgid "Running unit tests in parallel."
1049
1057
  msgstr ""
1050
1058
 
1051
1059
  #: ../lib/pdk/tests/unit.rb:86
@@ -1134,35 +1142,43 @@ msgstr ""
1134
1142
  msgid "Unable to access the template repository \"%{repository}\""
1135
1143
  msgstr ""
1136
1144
 
1137
- #: ../lib/pdk/util/puppet_version.rb:24
1145
+ #: ../lib/pdk/util/puppet_version.rb:38
1138
1146
  msgid "Unable to find a Puppet gem in current Ruby environment or from Rubygems.org."
1139
1147
  msgstr ""
1140
1148
 
1141
- #: ../lib/pdk/util/puppet_version.rb:48
1149
+ #: ../lib/pdk/util/puppet_version.rb:52
1150
+ msgid "Unable to clone git repository at '%{repo}'."
1151
+ msgstr ""
1152
+
1153
+ #: ../lib/pdk/util/puppet_version.rb:60
1154
+ msgid "Unable to pull updates for git repository at '%{cachedir}'."
1155
+ msgstr ""
1156
+
1157
+ #: ../lib/pdk/util/puppet_version.rb:81
1142
1158
  msgid "Unable to find a Puppet gem matching %{requirement}."
1143
1159
  msgstr ""
1144
1160
 
1145
- #: ../lib/pdk/util/puppet_version.rb:55
1161
+ #: ../lib/pdk/util/puppet_version.rb:88
1146
1162
  msgid "Puppet %{requested_version} is not available, activating %{found_version} instead."
1147
1163
  msgstr ""
1148
1164
 
1149
- #: ../lib/pdk/util/puppet_version.rb:72
1165
+ #: ../lib/pdk/util/puppet_version.rb:105
1150
1166
  msgid "Unable to map Puppet Enterprise version %{pe_version} to a Puppet version."
1151
1167
  msgstr ""
1152
1168
 
1153
- #: ../lib/pdk/util/puppet_version.rb:77
1169
+ #: ../lib/pdk/util/puppet_version.rb:110
1154
1170
  msgid "Puppet Enterprise %{pe_version} maps to Puppet %{puppet_version}."
1155
1171
  msgstr ""
1156
1172
 
1157
- #: ../lib/pdk/util/puppet_version.rb:90
1173
+ #: ../lib/pdk/util/puppet_version.rb:123
1158
1174
  msgid "Unable to determine Puppet version for module: no metadata.json present in module."
1159
1175
  msgstr ""
1160
1176
 
1161
- #: ../lib/pdk/util/puppet_version.rb:116
1177
+ #: ../lib/pdk/util/puppet_version.rb:149
1162
1178
  msgid "%{version} is not a valid version number."
1163
1179
  msgstr ""
1164
1180
 
1165
- #: ../lib/pdk/util/puppet_version.rb:150
1181
+ #: ../lib/pdk/util/puppet_version.rb:183
1166
1182
  msgid "Failed to parse Puppet Enterprise version map file."
1167
1183
  msgstr ""
1168
1184
 
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.6.1
4
+ version: 1.7.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-07-25 00:00:00.000000000 Z
11
+ date: 2018-08-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -295,7 +295,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
295
295
  version: '0'
296
296
  requirements: []
297
297
  rubyforge_project:
298
- rubygems_version: 2.6.14.1
298
+ rubygems_version: 2.6.14
299
299
  signing_key:
300
300
  specification_version: 4
301
301
  summary: A key part of the Puppet Development Kit, the shortest path to better modules