puppet-strings 1.1.0 → 1.1.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
  SHA1:
3
- metadata.gz: 1c66cddb3ce959fa86315c18de4cfd36e9c4b332
4
- data.tar.gz: f71b3c4062b8ca1155c619d3634ca6da4ff0e2c1
3
+ metadata.gz: 617d17b2ad3472b75cc4710c3041ff341f32f908
4
+ data.tar.gz: b79393ed1448e9a68e870b1c7c26e5e1e0fa7cd3
5
5
  SHA512:
6
- metadata.gz: 8aec3266ab3f8dccc3b6d8417c9862d07fd9f7c4d53e5945ebd0b502fb01ca5e3d31264ec71971799d5e61580bbb6d097b97a28ecba98acf331a7b095c658c0d
7
- data.tar.gz: e1f0b911bdef1670b9db4beab036683cfd241193330008e44d443a83a235e17661ebfbbcc6995daa80381b29c2f166036af7d869659b6861cfbfd74355821621
6
+ metadata.gz: fd878646dc1c5daa2d95cd60a8ee63ca1550862ee1cfefe333a826ba452b6ed5962460f49717cb754ee734b8a8a2aeab1a88b752b49ed358c05043da552ae6d6
7
+ data.tar.gz: 4991c269e0354a10b447078f8714627c034b00bcbdc8db0a1d99243e9f1108fdb7a1367540abe79405a3d1ac255f1d6f16d461b0819f4abe8f47cf877a8d5e42
@@ -1,29 +1,41 @@
1
- ##2017-03-20 - Release 1.1.0
1
+ ## 2017-10-20 - Release 1.1.1
2
2
 
3
- ###Summary
3
+ ### BugFixes
4
+ - Remove timestamps from footer of generated HTML pages ([GeoffWilliams](https://github.com/GeoffWilliams))
5
+ - Fix argument handling for `rake strings::generate` ([hashar](https://github.com/hashar))
6
+
7
+ ### Other
8
+ - Fixed Markdown formatting issues in CHANGELOG ([maju6406](https://github.com/maju6406))
9
+ - Fixed typo in README ([hfm](https://github.com/hfm))
10
+ - Fixed Markdown formatting issues in README ([gguillotte](https://github.com/gguillotte))
11
+ - Update Travis CI configurations for Ruby and Puppet versions ([ghoneycutt](https://github.com/ghoneycutt))
12
+
13
+ ## 2017-03-20 - Release 1.1.0
14
+
15
+ ### Summary
4
16
 
5
17
  This release adds a new `summary` tag which can be used to add a short description to classes, functions, types, and providers. In addition, `@param` tags can now include type information in Puppet 4 code without warnings being issued.
6
18
 
7
19
  All related tickets can be found under the [PDOC](https://tickets.puppetlabs.com/browse/PDOC) JIRA project with the fix version of [1.1.0](https://tickets.puppetlabs.com/issues/?filter=25603).
8
20
 
9
- ###Features
21
+ ### Features
10
22
  - The `summary` tag can be added to any code that puppet-strings supports. The recommended length limit for a summary is 140 characters. Warnings will be issued for strings longer than this limit.
11
23
  - Puppet 4 parameter types can now be explicitly documented. Previously, this was not allowed because Puppet 4 parameter types can be automatically determined without extra documentation. However, users may desire to do so anyway for consistency. Strings will emit a warning if the documented type does not match the actual type. In such an event, the incorrect documented type will be ignored in favor of the real one.
12
24
 
13
- ##2016-11-28 - Release 1.0.0
25
+ ## 2016-11-28 - Release 1.0.0
14
26
 
15
- ###Summary
27
+ ### Summary
16
28
 
17
29
  This release fixes up minor bugs from the 0.99.0 release and modifies the JSON schema for Puppet functions.
18
30
 
19
31
  All related tickets can be found under the [PDOC](https://tickets.puppetlabs.com/browse/PDOC) JIRA project with the fix version of [1.0.0](https://tickets.puppetlabs.com/issues/?filter=23607).
20
32
 
21
- ###Features
33
+ ### Features
22
34
  - The JSON schema for Puppet functions has been altered to include a new 'signatures' top-level key **(PDOC-125)**
23
35
  - Includes information about all function signatures (overloads). Existing overload key format has been preserved.
24
36
  - Reworked README for enhanced clarity **(PDOC-133)**
25
37
 
26
- ###BugFixes
38
+ ### BugFixes
27
39
  - Fixed an issue where the search box in the code navigator overlapped list items below it **(PDOC-93)**
28
40
  - Strings can now handle multiple `defaultfor` calls in Puppet providers **(PDOC-95)**
29
41
  - Fixed an issue preventing the generated \_index.html file from being uploaded to GitHub pages via the gh_pages task **(PDOC-120)**
@@ -33,15 +45,15 @@ All related tickets can be found under the [PDOC](https://tickets.puppetlabs.com
33
45
  - Fixed an issue where certain Ruby string constructs were incompletely stripped from some docstrings **(PDOC-126)**
34
46
  - Hanging indents from type feature descriptions are now properly stripped **(PDOC-127)**
35
47
 
36
- ##2016-10-10 - Release 0.99.0
48
+ ## 2016-10-10 - Release 0.99.0
37
49
 
38
- ###Summary
50
+ ### Summary
39
51
 
40
52
  This release includes a complete rewrite of strings, fixing many bugs from previous versions and generally improving the user experience. This release is intended to be the last stop before the strings major version 1.0 is released, and nearly all of the functionality of the major release is included.
41
53
 
42
54
  All related tickets can be found under the [PDOC][PDOC JIRA] JIRA project with the fix version of [0.99.0](https://tickets.puppetlabs.com/issues/?filter=22705).
43
55
 
44
- ###Features
56
+ ### Features
45
57
  - Complete overhaul, including code cleanup, bug fixes and new functionality **(PDOC-63)**
46
58
  - Documentation has been split into sections based on type: puppet 3x API functions, puppet 4x API functions, ruby classes, puppet language functions, types, and providers
47
59
  - New JSON schema organized to reflect the separation of types
@@ -55,21 +67,21 @@ All related tickets can be found under the [PDOC][PDOC JIRA] JIRA project with t
55
67
  - Note that the gem still requires puppet. We recommend that the strings gem be installed with puppet, as suggested in the [README](https://github.com/puppetlabs/puppet-strings/blob/master/README.md#installing-puppet-strings)
56
68
  - New gemspec requirement on Ruby version 1.9.3, the oldest supported Ruby version
57
69
 
58
- ###BugFixes
70
+ ### BugFixes
59
71
 
60
72
  - Prevents a blizzard of errors when documenting Puppet Core source and some puppet modules **(PDOC-63)**
61
73
  - As this is a complete rewrite, many known and unknown bugs from the original code were fixed along the way
62
74
  - Allow strings to be installed in PE 3.8 without overwriting existing puppet and facter installations with newer gems
63
75
 
64
- ##2016-03-30 - Release 0.4.0
76
+ ## 2016-03-30 - Release 0.4.0
65
77
 
66
- ###Summary
78
+ ### Summary
67
79
 
68
80
  This release adds JSON output support for strings, fixes a major bug that prevented strings from working with the 4.4.0 release of puppet, and is the last version of strings that will be released as a module.
69
81
 
70
82
  All related tickets can be found under the [PDOC][PDOC JIRA] JIRA project with the fix version of [0.4.0](https://tickets.puppetlabs.com/issues/?filter=18810).
71
83
 
72
- ###Features
84
+ ### Features
73
85
  - Support for JSON output **(PDOC-23)**
74
86
  - Strings now has the ability to produce a JSON representation of a given puppet module
75
87
  - The details of the JSON schema can be found [here](https://github.com/puppetlabs/puppet-strings/blob/master/json_dom.md)
@@ -79,27 +91,27 @@ All related tickets can be found under the [PDOC][PDOC JIRA] JIRA project with t
79
91
  - The 0.4.0 release will be released concurrently as a ruby gem
80
92
  - After this release, all updates will only be available via the gem
81
93
 
82
- ###Bugfixes
94
+ ### Bugfixes
83
95
 
84
96
  - Fix issue that prevented strings from running with Puppet 4.4.0 **(PDOC-75)**
85
97
 
86
- ##2015-09-22 - Release 0.3.1
98
+ ## 2015-09-22 - Release 0.3.1
87
99
 
88
- ###Summary
100
+ ### Summary
89
101
 
90
102
  This is a minor bug fix release.
91
103
 
92
104
  All related tickets can be found under the [PDOC][PDOC JIRA] JIRA project with the fix version of [0.3.1](https://tickets.puppetlabs.com/issues/?filter=15530).
93
105
 
94
- ###Bugfixes
106
+ ### Bugfixes
95
107
 
96
108
  - Prevent strings from printing unnecessary quotes in error messages **(PDOC-57)**
97
109
  - Issue correct type check warnings for defined types **(PDOC-56)**
98
110
  - Allow providers, types, and defines to have the same name **(PDOC-54)**
99
111
 
100
- ##2015-09-21 - Release 0.3.0
112
+ ## 2015-09-21 - Release 0.3.0
101
113
 
102
- ###Summary
114
+ ### Summary
103
115
 
104
116
  This release includes support for Puppet Types and Providers, as well as
105
117
  type checking Puppet 4x functions and defined types.
@@ -107,7 +119,7 @@ type checking Puppet 4x functions and defined types.
107
119
  All related tickets can be found under the [PDOC][PDOC JIRA] JIRA project with
108
120
  the fix version of [0.3.0](https://tickets.puppetlabs.com/issues/?filter=15529).
109
121
 
110
- ####Features
122
+ #### Features
111
123
 
112
124
  - Support for Puppet Types and Providers **(PDOC-35)**
113
125
  - Type check Puppet 4x functions and defined types where possible and warn the user when types don't match.
@@ -123,22 +135,22 @@ the fix version of [0.3.0](https://tickets.puppetlabs.com/issues/?filter=15529).
123
135
  - Installation instructions using Puppet **(PDOC-33)**
124
136
 
125
137
 
126
- ####Bugfixes
138
+ #### Bugfixes
127
139
 
128
140
  - Fix markdown list processing **(PDOC-30)**
129
141
  - Fix namespacing for nested classes and defined types **(PDOC-20)**
130
142
 
131
143
 
132
- ##2015-03-17 - Release 0.2.0
144
+ ## 2015-03-17 - Release 0.2.0
133
145
 
134
- ###Summary
146
+ ### Summary
135
147
 
136
148
  This release includes improvements to the HTML output generated by strings and a few bug fixes.
137
149
  All related tickets can be found under the [PDOC][PDOC JIRA] JIRA project with the fix version of [0.2.0](https://tickets.puppetlabs.com/issues/?filter=13760).
138
150
 
139
151
  [PDOC JIRA]: https://tickets.puppetlabs.com/browse/PDOC
140
152
 
141
- ####Features
153
+ #### Features
142
154
  - Custom YARD templates for classes and defined types **(PDOC-17)**
143
155
  - Improved HMTL output that is more appropriate for Puppet code (especially for parameters)
144
156
  - Support for the explicit list of YARD tags we will be supporting initially (@param, @return, @since, @example)
@@ -150,8 +162,7 @@ All related tickets can be found under the [PDOC][PDOC JIRA] JIRA project with t
150
162
  - Our own custom YARD templates which can be easily extended and tweaked
151
163
  - Addition of RubCop Travis CI job to ensure code quality and consistency **(PDOC-8)**
152
164
 
153
- ####Bugfixes
165
+ #### Bugfixes
154
166
  - Puppet namespaces are no longer mangled for nested classes and defined types **(PDOC-25)**
155
167
  - Strings is now compatible with the renaming of the Puppetx/puppetx namespace to PuppetX/puppet_x **(PDOC-26)**
156
168
  - Strings will no longer crash when documenting 3x functions with less than two arguments passed into newfunction **(PDOC-27)**
157
-
data/Gemfile CHANGED
@@ -23,6 +23,7 @@ group :acceptance do
23
23
  gem 'beaker', '< 3.0'
24
24
  gem 'beaker-rspec'
25
25
  gem 'beaker-hostgenerator'
26
+ gem 'beaker-abs'
26
27
  end
27
28
 
28
29
  group :development do
data/README.md CHANGED
@@ -37,7 +37,7 @@ Note that if you are running PE 3.8, you'll have a few extra steps to install pu
37
37
 
38
38
  The easiest way to install the `yard` gem is with Puppet itself:
39
39
 
40
- For Puppet 4.x and Puppet Enterprise 2015.2 and later:
40
+ For Puppet >= 4 and Puppet Enterprise 2015.2 and later:
41
41
 
42
42
  ```
43
43
  $ puppet resource package yard provider=puppet_gem
@@ -120,7 +120,7 @@ To generate documentation for a Puppet module, run Strings from that module's di
120
120
  To generate documentation for specific files in a module, run the `puppet strings generate` subcommand and specify the files.
121
121
 
122
122
  ```
123
- puppet strings generate first.pp second.pp`
123
+ puppet strings generate first.pp second.pp
124
124
  ```
125
125
 
126
126
  To generate documentation for specific directories, run the `puppet strings generate` command and specify the directories:
@@ -438,19 +438,19 @@ The `strings:generate` and `strings:gh_pages:update` tasks are available in `pup
438
438
 
439
439
  First, update your Gemfile and your Rakefile.:
440
440
 
441
- 1. Add the following to your Gemfile to use `puppet-strings`:
441
+ 1. Add the following to your Gemfile to use `puppet-strings`:
442
442
 
443
- ```ruby
444
- gem 'puppet-strings'
445
- ```
443
+ ```ruby
444
+ gem 'puppet-strings'
445
+ ```
446
446
 
447
- 2. Add the following to your `Rakefile` to use the `puppet-strings` tasks:
447
+ 2. Add the following to your `Rakefile` to use the `puppet-strings` tasks:
448
448
 
449
- ```ruby
450
- require 'puppet-strings/tasks'
451
- ```
449
+ ```ruby
450
+ require 'puppet-strings/tasks'
451
+ ```
452
452
 
453
- Adding this `require` automatically creates the Rake tasks below.
453
+ Adding this `require` automatically creates the Rake tasks below.
454
454
 
455
455
  #### Generate documentation with additional options
456
456
 
data/Rakefile CHANGED
@@ -23,6 +23,7 @@ task :acceptance do
23
23
 
24
24
  install_type = 'aio'
25
25
  target = ENV['platform']
26
+ abs = if ENV['BEAKER_ABS'] then 'abs' else 'vmpooler' end
26
27
  if ! target
27
28
  STDERR.puts 'TEST_TARGET environment variable is not set'
28
29
  STDERR.puts 'setting to default value of "centos7-64ma".'
@@ -34,7 +35,7 @@ task :acceptance do
34
35
  target += "{type=#{install_type}}"
35
36
  end
36
37
 
37
- cli = BeakerHostGenerator::CLI.new([target])
38
+ cli = BeakerHostGenerator::CLI.new([target, '--hypervisor', abs])
38
39
  nodeset_dir = 'spec/acceptance/nodesets'
39
40
  nodeset = "#{nodeset_dir}/#{target}.yml"
40
41
  FileUtils.mkdir_p(nodeset_dir)
@@ -14,8 +14,11 @@ namespace :strings do
14
14
  markup: args[:markup] || 'markdown',
15
15
  }
16
16
 
17
- options[:json] = args[:json] if args.key? :json
18
- options[:yard_args] = args[:yard_args].split if args.key? :yard_args
17
+ # rubocop:disable Style/PreferredHashMethods
18
+ # `args` is a Rake::TaskArguments and has no key? method
19
+ options[:json] = args[:json] if args.has_key? :json
20
+ options[:yard_args] = args[:yard_args].split if args.has_key? :yard_args
21
+ # rubocop:enable Style/PreferredHashMethods
19
22
 
20
23
  PuppetStrings.generate(patterns, options)
21
24
  end
@@ -0,0 +1,3 @@
1
+ <div id="footer">
2
+ Generated by <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>.
3
+ </div>
@@ -5,37 +5,37 @@ require 'json'
5
5
  include PuppetStrings::Acceptance::Util
6
6
 
7
7
  describe 'Emitting JSON' do
8
- expected = {
9
- "puppet_classes" => [],
10
- "defined_types" => [],
11
- "resource_types" => [],
12
- "providers" => [],
13
- "puppet_functions" => [
14
- "name" => "function3x",
15
- "file" => "/etc/puppet/modules/test/lib/puppet/parser/functions/function3x.rb",
16
- "line" => 1,
17
- "type" => "ruby3x",
18
- "signatures" => [
19
- {
20
- "signature" =>"function3x()",
21
- "docstring" => {
22
- "text" => "This is the function documentation for `function3x`",
23
- "tags" => [
24
- {
25
- "tag_name"=>"return",
26
- "text"=>"",
27
- "types"=>["Any"]
28
- }
29
- ]
30
- }
31
- },
32
- ],
33
- "docstring" => {
34
- "text" => "This is the function documentation for `function3x`",
35
- "tags" => ["tag_name" => "return", "text" => "", "types" => ["Any"]]},
36
- "source" => "Puppet::Parser::Functions.newfunction(:function3x, :doc => \"This is the function documentation for `function3x`\") do |args|\nend"
37
- ]
38
- }
8
+ expected = {
9
+ "puppet_classes" => [],
10
+ "defined_types" => [],
11
+ "resource_types" => [],
12
+ "providers" => [],
13
+ "puppet_functions" => [
14
+ "name" => "function3x",
15
+ "file" => "/etc/puppet/modules/test/lib/puppet/parser/functions/function3x.rb",
16
+ "line" => 1,
17
+ "type" => "ruby3x",
18
+ "signatures" => [
19
+ {
20
+ "signature" =>"function3x()",
21
+ "docstring" => {
22
+ "text" => "This is the function documentation for `function3x`",
23
+ "tags" => [
24
+ {
25
+ "tag_name"=>"return",
26
+ "text"=>"",
27
+ "types"=>["Any"]
28
+ }
29
+ ]
30
+ }
31
+ },
32
+ ],
33
+ "docstring" => {
34
+ "text" => "This is the function documentation for `function3x`",
35
+ "tags" => ["tag_name" => "return", "text" => "", "types" => ["Any"]]},
36
+ "source" => "Puppet::Parser::Functions.newfunction(:function3x, :doc => \"This is the function documentation for `function3x`\") do |args|\nend"
37
+ ]
38
+ }
39
39
 
40
40
  it 'should emit JSON to stdout when using the --emit-json-stdout option' do
41
41
  test_module_path = get_test_module_path(master, /Module test/)
@@ -49,7 +49,7 @@ expected = {
49
49
  test_module_path = get_test_module_path(master, /Module test/)
50
50
  tmpfile = master.tmpfile('json_output.json')
51
51
  on master, puppet('strings', 'generate', "--emit-json #{tmpfile}", "#{test_module_path}/lib/puppet/parser/functions/function3x.rb")
52
- output = read_file_on(master, tmpfile)
53
- expect(JSON.parse(output)).to eq(expected)
52
+ output = read_file_on(master, tmpfile)
53
+ expect(JSON.parse(output)).to eq(expected)
54
54
  end
55
55
  end
@@ -75,7 +75,7 @@ A4GBAFjOKer89961zgK5F7WF0bnj4JXMJTENAKaSbn+2kmOeUJXRmm/kEd5jhW6Y
75
75
  -----END CERTIFICATE-----
76
76
  EOM
77
77
 
78
- GLOBALSIGN_CA = <<-EOM
78
+ GLOBALSIGN_CA = <<-EOM
79
79
  -----BEGIN CERTIFICATE-----
80
80
  MIIDdTCCAl2gAwIBAgILBAAAAAABFUtaw5QwDQYJKoZIhvcNAQEFBQAwVzELMAkG
81
81
  A1UEBhMCQkUxGTAXBgNVBAoTEEdsb2JhbFNpZ24gbnYtc2ExEDAOBgNVBAsTB1Jv
@@ -170,14 +170,14 @@ SOURCE
170
170
  end
171
171
 
172
172
  describe 'parsing puppet functions with return type in defintion', if: TEST_FUNCTION_RETURN_TYPE do
173
- let(:source) { <<SOURCE
173
+ let(:source) { <<SOURCE
174
174
  # A simple foo function.
175
175
  # @return Returns a string
176
176
  function foo() >> String {
177
177
  notice world
178
178
  }
179
179
  SOURCE
180
- }
180
+ }
181
181
 
182
182
  it 'should parse the puppet function statement' do
183
183
  subject.parse
@@ -189,14 +189,14 @@ SOURCE
189
189
  end
190
190
 
191
191
  describe 'parsing puppet functions with complex return types in defintion', if: TEST_FUNCTION_RETURN_TYPE do
192
- let(:source) { <<SOURCE
192
+ let(:source) { <<SOURCE
193
193
  # A simple foo function.
194
194
  # @return Returns a struct with a hash including one key which must be an integer between 1 and 10.
195
195
  function foo() >> Struct[{'a' => Integer[1, 10]}] {
196
196
  notice world
197
197
  }
198
198
  SOURCE
199
- }
199
+ }
200
200
 
201
201
  it 'should parse the puppet function statement' do
202
202
  subject.parse
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: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Puppet Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-03-20 00:00:00.000000000 Z
11
+ date: 2017-10-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: yard
@@ -83,6 +83,7 @@ files:
83
83
  - lib/puppet-strings/yard/templates/default/fulldoc/html/full_list_puppet_provider.erb
84
84
  - lib/puppet-strings/yard/templates/default/fulldoc/html/full_list_puppet_type.erb
85
85
  - lib/puppet-strings/yard/templates/default/fulldoc/html/setup.rb
86
+ - lib/puppet-strings/yard/templates/default/layout/html/footer.erb
86
87
  - lib/puppet-strings/yard/templates/default/layout/html/objects.erb
87
88
  - lib/puppet-strings/yard/templates/default/layout/html/setup.rb
88
89
  - lib/puppet-strings/yard/templates/default/puppet_class/html/box_info.erb
@@ -169,7 +170,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
169
170
  requirements:
170
171
  - puppet, >= 3.7.0
171
172
  rubyforge_project:
172
- rubygems_version: 2.5.1
173
+ rubygems_version: 2.6.8
173
174
  signing_key:
174
175
  specification_version: 4
175
176
  summary: Puppet documentation via YARD