puppet-strings 2.8.0 → 2.9.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
  SHA256:
3
- metadata.gz: a2d5345c5e091cd9e41b404f7529168e8e10b737d26b3b1b9a5a5bfbf118e062
4
- data.tar.gz: 0bddf9dac1b890e8b487e261fd5eec2b3df45eecbc400af22602c1aac29aa99e
3
+ metadata.gz: 9397d83c2092aed842ea468c79012270659c27b5c9ad85e1a67f614ca3fef2a2
4
+ data.tar.gz: 65bc26d31881eefbb6de381a29afe1de4274bfeb2f1748969af60f9e30dcb9fe
5
5
  SHA512:
6
- metadata.gz: 6399094f9117b6966c7b91f4ec6438f6877faf0b25ab7f2b322957f1cf81719ddae70357d32d252a7276f9795f9bce6305b8c999f1f853ec83dbd35131030d99
7
- data.tar.gz: faef11c0d37eb368b8e36a6bc7743669a7ad184893c969317434711ae13e6513e033393eb9b64e33f6d6e16f9bd0ff46dc4a784ba0ec574d398896c5b2dea095
6
+ metadata.gz: a20053eca0ac726c86ea1b21596f1c66a98f9a28679ee00c4d9b64afe30d3f9fa9ce9d67bec6dd28ef9ff4c5c70f8f0b075d43c5d07c87c382265433bda13993
7
+ data.tar.gz: a476bfcc359d3e2603902f080a7d54f4e80b04d18b470dc0e8980c20cc7b4452e44ea7e344db4bf7702ce5c3b9aa7745d52d75e5cadc5991313d596de97f0d4a
data/CHANGELOG.md CHANGED
@@ -3,6 +3,28 @@
3
3
  All significant changes to this repo will be summarized in this file.
4
4
 
5
5
 
6
+ ## [v2.9.0](https://github.com/puppetlabs/puppet-strings/tree/v2.9.0) (2021-11-29)
7
+
8
+ [Full Changelog](https://github.com/puppetlabs/puppet-strings/compare/v2.8.0...v2.9.0)
9
+
10
+ Added
11
+
12
+ - Add strings:validate:reference task [\#293](https://github.com/puppetlabs/puppet-strings/issues/293)
13
+
14
+ Fixed
15
+
16
+ - Fix rare undefined method `any?' for nil:NilClass error [\#289](https://github.com/puppetlabs/puppet-strings/pull/289) ([sanfrancrisko](https://github.com/sanfrancrisko))
17
+
18
+ **Closed issues:**
19
+
20
+ - Error: undefined method `any?' for nil:NilClass when generating documentation [\#287](https://github.com/puppetlabs/puppet-strings/issues/287)
21
+ - Update changelog with recent commits [\#283](https://github.com/puppetlabs/puppet-strings/issues/283)
22
+ - Please document the `author` tag [\#256](https://github.com/puppetlabs/puppet-strings/issues/256)
23
+
24
+ **Merged pull requests:**
25
+
26
+ - Implement a strings:validate:reference task [\#291](https://github.com/puppetlabs/puppet-strings/pull/291) ([ekohl](https://github.com/ekohl))
27
+
6
28
  ## [v2.8.0](https://github.com/puppetlabs/puppet-strings/tree/v2.8.0) (2021-07-19)
7
29
 
8
30
  [Full Changelog](https://github.com/puppetlabs/puppet-strings/compare/v2.7.0...v2.8.0)
@@ -0,0 +1,42 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'puppet-strings'
4
+ require 'tempfile'
5
+
6
+ namespace :strings do
7
+ namespace :validate do
8
+ desc 'Validate the reference is up to date'
9
+ task :reference, [:patterns, :debug, :backtrace] do |t, args|
10
+ filename = 'REFERENCE.md'
11
+
12
+ unless File.exist?(filename)
13
+ STDERR.puts "#{filename} does not exist"
14
+ exit 1
15
+ end
16
+
17
+ patterns = args[:patterns]
18
+ patterns = patterns.split if patterns
19
+ patterns ||= PuppetStrings::DEFAULT_SEARCH_PATTERNS
20
+
21
+ generated = Tempfile.create do |file|
22
+ options = {
23
+ debug: args[:debug] == 'true',
24
+ backtrace: args[:backtrace] == 'true',
25
+ json: false,
26
+ markdown: true,
27
+ path: file,
28
+ }
29
+ PuppetStrings.generate(patterns, options)
30
+
31
+ file.read
32
+ end
33
+
34
+ existing = File.read(filename)
35
+
36
+ if generated != existing
37
+ STDERR.puts "#{filename} is outdated"
38
+ exit 1
39
+ end
40
+ end
41
+ end
42
+ end
@@ -8,5 +8,6 @@ module PuppetStrings
8
8
  module Tasks
9
9
  require 'puppet-strings/tasks/generate.rb'
10
10
  require 'puppet-strings/tasks/gh_pages.rb'
11
+ require 'puppet-strings/tasks/validate.rb'
11
12
  end
12
13
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PuppetStrings
4
- VERSION = '2.8.0'
4
+ VERSION = '2.9.0'
5
5
  end
@@ -148,6 +148,7 @@ class PuppetStrings::Yard::CodeObjects::Type < PuppetStrings::Yard::CodeObjects:
148
148
  end
149
149
 
150
150
  def parameters
151
+ @parameters ||= [] # guard against not filled parameters
151
152
  # just return params if there are no providers
152
153
  return @parameters if providers.empty?
153
154
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: puppet-strings
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.8.0
4
+ version: 2.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Puppet Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-07-19 00:00:00.000000000 Z
11
+ date: 2021-11-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: yard
@@ -85,6 +85,7 @@ files:
85
85
  - lib/puppet-strings/tasks.rb
86
86
  - lib/puppet-strings/tasks/generate.rb
87
87
  - lib/puppet-strings/tasks/gh_pages.rb
88
+ - lib/puppet-strings/tasks/validate.rb
88
89
  - lib/puppet-strings/version.rb
89
90
  - lib/puppet-strings/yard.rb
90
91
  - lib/puppet-strings/yard/code_objects.rb
@@ -243,8 +244,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
243
244
  version: '0'
244
245
  requirements:
245
246
  - puppet, >= 5.0.0
246
- rubyforge_project:
247
- rubygems_version: 2.7.6.2
247
+ rubygems_version: 3.1.6
248
248
  signing_key:
249
249
  specification_version: 4
250
250
  summary: Puppet documentation via YARD