puppet-strings 2.4.0 → 2.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +97 -5
- data/COMMITTERS.md +17 -17
- data/CONTRIBUTING.md +6 -6
- data/README.md +10 -10
- data/lib/puppet-strings.rb +4 -2
- data/lib/puppet-strings/describe.rb +2 -0
- data/lib/puppet-strings/json.rb +2 -0
- data/lib/puppet-strings/markdown.rb +12 -10
- data/lib/puppet-strings/markdown/base.rb +17 -3
- data/lib/puppet-strings/markdown/data_type.rb +18 -0
- data/lib/puppet-strings/markdown/data_types.rb +3 -1
- data/lib/puppet-strings/markdown/defined_type.rb +2 -0
- data/lib/puppet-strings/markdown/defined_types.rb +3 -1
- data/lib/puppet-strings/markdown/function.rb +9 -7
- data/lib/puppet-strings/markdown/functions.rb +3 -1
- data/lib/puppet-strings/markdown/puppet_class.rb +2 -0
- data/lib/puppet-strings/markdown/puppet_classes.rb +3 -1
- data/lib/puppet-strings/markdown/puppet_plan.rb +2 -0
- data/lib/puppet-strings/markdown/puppet_plans.rb +3 -1
- data/lib/puppet-strings/markdown/puppet_task.rb +2 -0
- data/lib/puppet-strings/markdown/puppet_tasks.rb +3 -1
- data/lib/puppet-strings/markdown/resource_type.rb +21 -2
- data/lib/puppet-strings/markdown/resource_types.rb +3 -1
- data/lib/puppet-strings/markdown/table_of_contents.rb +3 -1
- data/lib/puppet-strings/markdown/templates/classes_and_defines.erb +10 -6
- data/lib/puppet-strings/markdown/templates/data_type.erb +22 -7
- data/lib/puppet-strings/markdown/templates/data_type_function.erb +67 -0
- data/lib/puppet-strings/markdown/templates/function.erb +2 -1
- data/lib/puppet-strings/markdown/templates/puppet_task.erb +1 -1
- data/lib/puppet-strings/markdown/templates/resource_type.erb +19 -13
- data/lib/puppet-strings/markdown/templates/table_of_contents.erb +6 -6
- data/lib/puppet-strings/monkey_patches/display_object_command.rb +2 -0
- data/lib/puppet-strings/tasks.rb +2 -0
- data/lib/puppet-strings/tasks/generate.rb +2 -0
- data/lib/puppet-strings/tasks/gh_pages.rb +3 -0
- data/lib/puppet-strings/version.rb +3 -1
- data/lib/puppet-strings/yard.rb +3 -0
- data/lib/puppet-strings/yard/code_objects.rb +2 -0
- data/lib/puppet-strings/yard/code_objects/base.rb +2 -0
- data/lib/puppet-strings/yard/code_objects/class.rb +4 -2
- data/lib/puppet-strings/yard/code_objects/data_type.rb +30 -8
- data/lib/puppet-strings/yard/code_objects/data_type_alias.rb +2 -0
- data/lib/puppet-strings/yard/code_objects/defined_type.rb +4 -2
- data/lib/puppet-strings/yard/code_objects/function.rb +6 -3
- data/lib/puppet-strings/yard/code_objects/group.rb +3 -0
- data/lib/puppet-strings/yard/code_objects/plan.rb +4 -2
- data/lib/puppet-strings/yard/code_objects/provider.rb +6 -0
- data/lib/puppet-strings/yard/code_objects/task.rb +2 -0
- data/lib/puppet-strings/yard/code_objects/type.rb +50 -5
- data/lib/puppet-strings/yard/handlers.rb +2 -0
- data/lib/puppet-strings/yard/handlers/helpers.rb +2 -0
- data/lib/puppet-strings/yard/handlers/json/base.rb +2 -0
- data/lib/puppet-strings/yard/handlers/json/task_handler.rb +2 -0
- data/lib/puppet-strings/yard/handlers/puppet/base.rb +3 -0
- data/lib/puppet-strings/yard/handlers/puppet/class_handler.rb +2 -0
- data/lib/puppet-strings/yard/handlers/puppet/data_type_alias_handler.rb +2 -0
- data/lib/puppet-strings/yard/handlers/puppet/defined_type_handler.rb +2 -0
- data/lib/puppet-strings/yard/handlers/puppet/function_handler.rb +3 -1
- data/lib/puppet-strings/yard/handlers/puppet/plan_handler.rb +2 -0
- data/lib/puppet-strings/yard/handlers/ruby/base.rb +5 -0
- data/lib/puppet-strings/yard/handlers/ruby/data_type_handler.rb +223 -60
- data/lib/puppet-strings/yard/handlers/ruby/function_handler.rb +9 -7
- data/lib/puppet-strings/yard/handlers/ruby/provider_handler.rb +13 -0
- data/lib/puppet-strings/yard/handlers/ruby/rsapi_handler.rb +4 -1
- data/lib/puppet-strings/yard/handlers/ruby/type_base.rb +20 -6
- data/lib/puppet-strings/yard/handlers/ruby/type_extras_handler.rb +16 -6
- data/lib/puppet-strings/yard/handlers/ruby/type_handler.rb +18 -1
- data/lib/puppet-strings/yard/parsers.rb +2 -0
- data/lib/puppet-strings/yard/parsers/json/parser.rb +2 -0
- data/lib/puppet-strings/yard/parsers/json/task_statement.rb +2 -0
- data/lib/puppet-strings/yard/parsers/puppet/parser.rb +18 -14
- data/lib/puppet-strings/yard/parsers/puppet/statement.rb +4 -0
- data/lib/puppet-strings/yard/tags.rb +2 -0
- data/lib/puppet-strings/yard/tags/enum_tag.rb +2 -0
- data/lib/puppet-strings/yard/tags/factory.rb +2 -0
- data/lib/puppet-strings/yard/tags/overload_tag.rb +4 -1
- data/lib/puppet-strings/yard/tags/parameter_directive.rb +5 -4
- data/lib/puppet-strings/yard/tags/property_directive.rb +5 -4
- data/lib/puppet-strings/yard/tags/summary_tag.rb +2 -0
- data/lib/puppet-strings/yard/templates/default/puppet_data_type/html/method_details_list.erb +6 -0
- data/lib/puppet-strings/yard/templates/default/puppet_data_type/html/setup.rb +9 -1
- data/lib/puppet-strings/yard/templates/default/puppet_function/html/setup.rb +1 -1
- data/lib/puppet-strings/yard/templates/default/puppet_type/html/setup.rb +3 -1
- data/lib/puppet-strings/yard/util.rb +4 -1
- data/lib/puppet/application/strings.rb +2 -0
- data/lib/puppet/face/strings.rb +4 -1
- data/lib/puppet/feature/rgen.rb +2 -0
- data/lib/puppet/feature/yard.rb +2 -0
- metadata +11 -52
- data/CODEOWNERS +0 -1
- data/Gemfile +0 -53
- data/HISTORY.md +0 -218
- data/JSON.md +0 -832
- data/Rakefile +0 -160
- data/codecov.yml +0 -3
- data/misc/ANNOUNCEMENT_TEMPLATE.md +0 -40
- data/spec/acceptance/emit_json_options_spec.rb +0 -69
- data/spec/acceptance/generate_markdown_spec.rb +0 -47
- data/spec/acceptance/running_strings_generate_spec.rb +0 -88
- data/spec/fixtures/acceptance/modules/test/functions/add.pp +0 -9
- data/spec/fixtures/acceptance/modules/test/lib/puppet/functions/4x_function.rb +0 -5
- data/spec/fixtures/acceptance/modules/test/lib/puppet/parser/functions/function3x.rb +0 -2
- data/spec/fixtures/acceptance/modules/test/lib/puppet/provider/server/linux.rb +0 -9
- data/spec/fixtures/acceptance/modules/test/lib/puppet/type/database.rb +0 -15
- data/spec/fixtures/acceptance/modules/test/manifests/init.pp +0 -31
- data/spec/fixtures/acceptance/modules/test/manifests/triple_nested_classes.pp +0 -27
- data/spec/fixtures/acceptance/modules/test/metadata.json +0 -10
- data/spec/fixtures/acceptance/modules/test/types/elephant.pp +0 -2
- data/spec/fixtures/unit/markdown/output.md +0 -561
- data/spec/fixtures/unit/markdown/output_with_data_types.md +0 -606
- data/spec/fixtures/unit/markdown/output_with_plan.md +0 -595
- data/spec/spec_helper.rb +0 -49
- data/spec/spec_helper_acceptance.rb +0 -58
- data/spec/spec_helper_acceptance_local.rb +0 -10
- data/spec/unit/puppet-strings/describe_spec.rb +0 -141
- data/spec/unit/puppet-strings/json_spec.rb +0 -302
- data/spec/unit/puppet-strings/markdown/base_spec.rb +0 -146
- data/spec/unit/puppet-strings/markdown_spec.rb +0 -374
- data/spec/unit/puppet-strings/yard/code_objects/task_spec.rb +0 -92
- data/spec/unit/puppet-strings/yard/handlers/json/task_handler_spec.rb +0 -116
- data/spec/unit/puppet-strings/yard/handlers/puppet/class_handler_spec.rb +0 -217
- data/spec/unit/puppet-strings/yard/handlers/puppet/data_type_alias_handler_spec.rb +0 -65
- data/spec/unit/puppet-strings/yard/handlers/puppet/defined_type_handler_spec.rb +0 -231
- data/spec/unit/puppet-strings/yard/handlers/puppet/function_handler_spec.rb +0 -315
- data/spec/unit/puppet-strings/yard/handlers/ruby/data_type_handler_spec.rb +0 -309
- data/spec/unit/puppet-strings/yard/handlers/ruby/function_handler_spec.rb +0 -746
- data/spec/unit/puppet-strings/yard/handlers/ruby/provider_handler_spec.rb +0 -158
- data/spec/unit/puppet-strings/yard/handlers/ruby/rsapi_handler_spec.rb +0 -235
- data/spec/unit/puppet-strings/yard/handlers/ruby/type_handler_spec.rb +0 -311
- data/spec/unit/puppet-strings/yard/parsers/json/parser_spec.rb +0 -72
- data/spec/unit/puppet-strings/yard/parsers/json/task_statement_spec.rb +0 -56
- data/spec/unit/puppet-strings/yard/parsers/puppet/parser_spec.rb +0 -251
- data/spec/unit/puppet-strings/yard/util_spec.rb +0 -48
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'puppet'
|
2
4
|
require 'puppet/pops'
|
3
5
|
|
@@ -32,11 +34,13 @@ module PuppetStrings::Yard::Parsers::Puppet
|
|
32
34
|
comment = []
|
33
35
|
(0..@line-2).reverse_each do |index|
|
34
36
|
break unless index <= lines.count
|
37
|
+
|
35
38
|
line = lines[index].strip
|
36
39
|
count = line.size
|
37
40
|
line.gsub!(COMMENT_REGEX, '')
|
38
41
|
# Break out if nothing was removed (wasn't a comment line)
|
39
42
|
break unless line.size < count
|
43
|
+
|
40
44
|
comment << line
|
41
45
|
end
|
42
46
|
@comments_range = (@line - comment.size - 1..@line - 1)
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
# Implements an overload tag for Puppet functions
|
2
4
|
#
|
3
5
|
# This differs from Yard's overload tag in that the signatures are formatted according to Puppet language rules.
|
@@ -22,7 +24,7 @@ class PuppetStrings::Yard::Tags::OverloadTag < YARD::Tags::Tag
|
|
22
24
|
args = @parameters.map do |parameter|
|
23
25
|
name, default = parameter
|
24
26
|
tag = tags.find { |t| t.name == name } if tags
|
25
|
-
type = tag
|
27
|
+
type = tag&.types ? "#{tag.type} " : 'Any '
|
26
28
|
prefix = "#{name[0]}" if name.start_with?('*', '&')
|
27
29
|
name = name[1..-1] if prefix
|
28
30
|
default = " = #{default}" if default
|
@@ -75,6 +77,7 @@ class PuppetStrings::Yard::Tags::OverloadTag < YARD::Tags::Tag
|
|
75
77
|
# @return Returns what the method call on the object would return.
|
76
78
|
def method_missing(method_name, *args, &block)
|
77
79
|
return object.send(method_name, *args, &block) if object.respond_to? method_name
|
80
|
+
|
78
81
|
super
|
79
82
|
end
|
80
83
|
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'puppet-strings/yard/code_objects'
|
2
4
|
|
3
5
|
# Implements a parameter directive (e.g. #@!puppet.type.param) for documenting Puppet resource types.
|
@@ -5,14 +7,13 @@ class PuppetStrings::Yard::Tags::ParameterDirective < YARD::Tags::Directive
|
|
5
7
|
# Called to invoke the directive.
|
6
8
|
# @return [void]
|
7
9
|
def call
|
8
|
-
return unless object
|
10
|
+
return unless object&.respond_to?(:add_parameter)
|
11
|
+
|
9
12
|
# Add a parameter to the resource
|
10
13
|
parameter = PuppetStrings::Yard::CodeObjects::Type::Parameter.new(tag.name, tag.text)
|
11
|
-
|
12
|
-
tag.types.each do |value|
|
14
|
+
tag.types&.each do |value|
|
13
15
|
parameter.add(value)
|
14
16
|
end
|
15
|
-
end
|
16
17
|
object.add_parameter parameter
|
17
18
|
end
|
18
19
|
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'puppet-strings/yard/code_objects'
|
2
4
|
|
3
5
|
# Implements a parameter directive (e.g. #@!puppet.type.property) for documenting Puppet resource types.
|
@@ -5,14 +7,13 @@ class PuppetStrings::Yard::Tags::PropertyDirective < YARD::Tags::Directive
|
|
5
7
|
# Called to invoke the directive.
|
6
8
|
# @return [void]
|
7
9
|
def call
|
8
|
-
return unless object
|
10
|
+
return unless object&.respond_to?(:add_property)
|
11
|
+
|
9
12
|
# Add a property to the resource
|
10
13
|
property = PuppetStrings::Yard::CodeObjects::Type::Property.new(tag.name, tag.text)
|
11
|
-
|
12
|
-
tag.types.each do |value|
|
14
|
+
tag.types&.each do |value|
|
13
15
|
property.add(value)
|
14
16
|
end
|
15
|
-
end
|
16
17
|
object.add_property property
|
17
18
|
end
|
18
19
|
|
@@ -1,5 +1,13 @@
|
|
1
1
|
# Initializes the template.
|
2
2
|
# @return [void]
|
3
3
|
def init
|
4
|
-
sections :header, :box_info, :summary, :overview, :note, :todo, T('tags'), :source
|
4
|
+
sections :header, :box_info, :summary, :overview, :note, :todo, T('tags'), :method_details_list, [T('method_details')], :source
|
5
|
+
end
|
6
|
+
|
7
|
+
def method_listing
|
8
|
+
sort_listing(object.functions)
|
9
|
+
end
|
10
|
+
|
11
|
+
def sort_listing(list)
|
12
|
+
list.sort_by {|o| [o.scope.to_s, o.name.to_s.downcase] }
|
5
13
|
end
|
@@ -16,7 +16,9 @@ end
|
|
16
16
|
def properties
|
17
17
|
# Properties are the same thing as parameters (from the documentation standpoint),
|
18
18
|
# so reuse the same template but with a different title and data source.
|
19
|
-
|
19
|
+
#
|
20
|
+
# "checks" such as "creates" and "onlyif" are another type of property
|
21
|
+
@parameters = (object.properties || []) + (object.checks || [])
|
20
22
|
@parameters.sort_by! { |p| p.name }
|
21
23
|
@tag_title = 'Properties'
|
22
24
|
erb(:parameters)
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'puppet/util'
|
2
4
|
|
3
5
|
# The module for various puppet-strings utility helpers.
|
@@ -24,8 +26,9 @@ module PuppetStrings::Yard::Util
|
|
24
26
|
# @return [String] HTML document with links converted
|
25
27
|
def self.github_to_yard_links(data)
|
26
28
|
data.scan(/href\=\"\#(.+)\"/).each do |bad_link|
|
27
|
-
data.gsub
|
29
|
+
data = data.gsub("=\"##{bad_link.first}\"", "=\"#label-#{bad_link.first.capitalize.gsub('-', '+')}\"")
|
28
30
|
end
|
31
|
+
|
29
32
|
data
|
30
33
|
end
|
31
34
|
|
data/lib/puppet/face/strings.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'puppet/face'
|
2
4
|
|
3
5
|
# Implements the 'puppet strings' interface.
|
@@ -57,6 +59,7 @@ Puppet::Face.define(:strings, '0.0.1') do
|
|
57
59
|
environment = Puppet.lookup(:current_environment)
|
58
60
|
environment.modules.each do |mod|
|
59
61
|
next unless modules.empty? || modules.include?(mod.name)
|
62
|
+
|
60
63
|
db = File.join(mod.path, '.yardoc')
|
61
64
|
patterns = PuppetStrings::DEFAULT_SEARCH_PATTERNS.map do |p|
|
62
65
|
File.join(mod.path, p)
|
@@ -145,7 +148,7 @@ Puppet::Face.define(:strings, '0.0.1') do
|
|
145
148
|
def check_required_features
|
146
149
|
raise RuntimeError, "The 'yard' gem must be installed in order to use this face." unless Puppet.features.yard?
|
147
150
|
raise RuntimeError, "The 'rgen' gem must be installed in order to use this face." unless Puppet.features.rgen?
|
148
|
-
raise RuntimeError, 'This face requires Ruby 1.9 or greater.' if RUBY_VERSION
|
151
|
+
raise RuntimeError, 'This face requires Ruby 1.9 or greater.' if RUBY_VERSION.match?(/^1\.8/)
|
149
152
|
end
|
150
153
|
|
151
154
|
# Builds the options to PuppetStrings.generate.
|
data/lib/puppet/feature/rgen.rb
CHANGED
data/lib/puppet/feature/yard.rb
CHANGED
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.
|
4
|
+
version: 2.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Puppet Inc.
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-07-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: yard
|
@@ -50,16 +50,10 @@ extra_rdoc_files:
|
|
50
50
|
- README.md
|
51
51
|
files:
|
52
52
|
- CHANGELOG.md
|
53
|
-
- CODEOWNERS
|
54
53
|
- COMMITTERS.md
|
55
54
|
- CONTRIBUTING.md
|
56
|
-
- Gemfile
|
57
|
-
- HISTORY.md
|
58
|
-
- JSON.md
|
59
55
|
- LICENSE
|
60
56
|
- README.md
|
61
|
-
- Rakefile
|
62
|
-
- codecov.yml
|
63
57
|
- lib/puppet-strings.rb
|
64
58
|
- lib/puppet-strings/describe.rb
|
65
59
|
- lib/puppet-strings/json.rb
|
@@ -82,6 +76,7 @@ files:
|
|
82
76
|
- lib/puppet-strings/markdown/table_of_contents.rb
|
83
77
|
- lib/puppet-strings/markdown/templates/classes_and_defines.erb
|
84
78
|
- lib/puppet-strings/markdown/templates/data_type.erb
|
79
|
+
- lib/puppet-strings/markdown/templates/data_type_function.erb
|
85
80
|
- lib/puppet-strings/markdown/templates/function.erb
|
86
81
|
- lib/puppet-strings/markdown/templates/puppet_task.erb
|
87
82
|
- lib/puppet-strings/markdown/templates/resource_type.erb
|
@@ -157,6 +152,7 @@ files:
|
|
157
152
|
- lib/puppet-strings/yard/templates/default/puppet_class/html/todo.erb
|
158
153
|
- lib/puppet-strings/yard/templates/default/puppet_data_type/html/box_info.erb
|
159
154
|
- lib/puppet-strings/yard/templates/default/puppet_data_type/html/header.erb
|
155
|
+
- lib/puppet-strings/yard/templates/default/puppet_data_type/html/method_details_list.erb
|
160
156
|
- lib/puppet-strings/yard/templates/default/puppet_data_type/html/note.erb
|
161
157
|
- lib/puppet-strings/yard/templates/default/puppet_data_type/html/overview.erb
|
162
158
|
- lib/puppet-strings/yard/templates/default/puppet_data_type/html/setup.rb
|
@@ -227,49 +223,11 @@ files:
|
|
227
223
|
- lib/puppet/face/strings.rb
|
228
224
|
- lib/puppet/feature/rgen.rb
|
229
225
|
- lib/puppet/feature/yard.rb
|
230
|
-
- misc/ANNOUNCEMENT_TEMPLATE.md
|
231
|
-
- spec/acceptance/emit_json_options_spec.rb
|
232
|
-
- spec/acceptance/generate_markdown_spec.rb
|
233
|
-
- spec/acceptance/running_strings_generate_spec.rb
|
234
|
-
- spec/fixtures/acceptance/modules/test/functions/add.pp
|
235
|
-
- spec/fixtures/acceptance/modules/test/lib/puppet/functions/4x_function.rb
|
236
|
-
- spec/fixtures/acceptance/modules/test/lib/puppet/parser/functions/function3x.rb
|
237
|
-
- spec/fixtures/acceptance/modules/test/lib/puppet/provider/server/linux.rb
|
238
|
-
- spec/fixtures/acceptance/modules/test/lib/puppet/type/database.rb
|
239
|
-
- spec/fixtures/acceptance/modules/test/manifests/init.pp
|
240
|
-
- spec/fixtures/acceptance/modules/test/manifests/triple_nested_classes.pp
|
241
|
-
- spec/fixtures/acceptance/modules/test/metadata.json
|
242
|
-
- spec/fixtures/acceptance/modules/test/types/elephant.pp
|
243
|
-
- spec/fixtures/unit/markdown/output.md
|
244
|
-
- spec/fixtures/unit/markdown/output_with_data_types.md
|
245
|
-
- spec/fixtures/unit/markdown/output_with_plan.md
|
246
|
-
- spec/spec_helper.rb
|
247
|
-
- spec/spec_helper_acceptance.rb
|
248
|
-
- spec/spec_helper_acceptance_local.rb
|
249
|
-
- spec/unit/puppet-strings/describe_spec.rb
|
250
|
-
- spec/unit/puppet-strings/json_spec.rb
|
251
|
-
- spec/unit/puppet-strings/markdown/base_spec.rb
|
252
|
-
- spec/unit/puppet-strings/markdown_spec.rb
|
253
|
-
- spec/unit/puppet-strings/yard/code_objects/task_spec.rb
|
254
|
-
- spec/unit/puppet-strings/yard/handlers/json/task_handler_spec.rb
|
255
|
-
- spec/unit/puppet-strings/yard/handlers/puppet/class_handler_spec.rb
|
256
|
-
- spec/unit/puppet-strings/yard/handlers/puppet/data_type_alias_handler_spec.rb
|
257
|
-
- spec/unit/puppet-strings/yard/handlers/puppet/defined_type_handler_spec.rb
|
258
|
-
- spec/unit/puppet-strings/yard/handlers/puppet/function_handler_spec.rb
|
259
|
-
- spec/unit/puppet-strings/yard/handlers/ruby/data_type_handler_spec.rb
|
260
|
-
- spec/unit/puppet-strings/yard/handlers/ruby/function_handler_spec.rb
|
261
|
-
- spec/unit/puppet-strings/yard/handlers/ruby/provider_handler_spec.rb
|
262
|
-
- spec/unit/puppet-strings/yard/handlers/ruby/rsapi_handler_spec.rb
|
263
|
-
- spec/unit/puppet-strings/yard/handlers/ruby/type_handler_spec.rb
|
264
|
-
- spec/unit/puppet-strings/yard/parsers/json/parser_spec.rb
|
265
|
-
- spec/unit/puppet-strings/yard/parsers/json/task_statement_spec.rb
|
266
|
-
- spec/unit/puppet-strings/yard/parsers/puppet/parser_spec.rb
|
267
|
-
- spec/unit/puppet-strings/yard/util_spec.rb
|
268
226
|
homepage: https://github.com/puppetlabs/puppet-strings
|
269
227
|
licenses:
|
270
228
|
- Apache-2.0
|
271
229
|
metadata: {}
|
272
|
-
post_install_message:
|
230
|
+
post_install_message:
|
273
231
|
rdoc_options: []
|
274
232
|
require_paths:
|
275
233
|
- lib
|
@@ -277,16 +235,17 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
277
235
|
requirements:
|
278
236
|
- - ">="
|
279
237
|
- !ruby/object:Gem::Version
|
280
|
-
version: 2.
|
238
|
+
version: 2.3.0
|
281
239
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
282
240
|
requirements:
|
283
241
|
- - ">="
|
284
242
|
- !ruby/object:Gem::Version
|
285
243
|
version: '0'
|
286
244
|
requirements:
|
287
|
-
- puppet, >=
|
288
|
-
|
289
|
-
|
245
|
+
- puppet, >= 5.0.0
|
246
|
+
rubyforge_project:
|
247
|
+
rubygems_version: 2.7.6.2
|
248
|
+
signing_key:
|
290
249
|
specification_version: 4
|
291
250
|
summary: Puppet documentation via YARD
|
292
251
|
test_files: []
|
data/CODEOWNERS
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
* @puppet-strings-maintainers
|
data/Gemfile
DELETED
@@ -1,53 +0,0 @@
|
|
1
|
-
source ENV['GEM_SOURCE'] || "https://rubygems.org"
|
2
|
-
|
3
|
-
gemspec
|
4
|
-
|
5
|
-
gem 'rgen'
|
6
|
-
gem 'redcarpet'
|
7
|
-
gem 'yard', '~> 0.9.11'
|
8
|
-
|
9
|
-
if ENV['PUPPET_GEM_VERSION']
|
10
|
-
gem 'puppet', ENV['PUPPET_GEM_VERSION'], :require => false
|
11
|
-
else
|
12
|
-
gem 'puppet', :require => false
|
13
|
-
end
|
14
|
-
|
15
|
-
group :test do
|
16
|
-
gem 'codecov'
|
17
|
-
gem 'mocha'
|
18
|
-
gem 'puppetlabs_spec_helper'
|
19
|
-
gem 'serverspec'
|
20
|
-
gem 'simplecov-console'
|
21
|
-
gem 'rspec', '~> 3.1'
|
22
|
-
gem 'json_spec', '~> 1.1', '>= 1.1.5'
|
23
|
-
end
|
24
|
-
|
25
|
-
group :acceptance do
|
26
|
-
# Litmus has dependencies which require Ruby 2.5 (Puppet 6) or above.
|
27
|
-
if Gem::Version.new(RUBY_VERSION.dup) >= Gem::Version.new('2.5.0')
|
28
|
-
# Until https://github.com/puppetlabs/puppet_litmus/pull/248 is merged we need to use the source of the
|
29
|
-
# of the PR. Not the greatest and prone to error, but without it, all litmus based testing is broken.
|
30
|
-
# This can be reverted once this PR is merged and Litmus is released with this fix.
|
31
|
-
gem 'puppet_litmus', git: 'https://github.com/michaeltlombardi/puppet_litmus', ref: 'maint/master/fix-upload-file'
|
32
|
-
gem 'net-ssh', '~> 5.2'
|
33
|
-
end
|
34
|
-
end
|
35
|
-
|
36
|
-
group :development do
|
37
|
-
gem 'github_changelog_generator', git: 'https://github.com/skywinder/github-changelog-generator', ref: '20ee04ba1234e9e83eb2ffb5056e23d641c7a018' if Gem::Version.new(RUBY_VERSION.dup) >= Gem::Version.new('2.2.2')
|
38
|
-
gem 'pry'
|
39
|
-
gem 'pry-byebug'
|
40
|
-
end
|
41
|
-
|
42
|
-
gem 'rubocop-rspec'
|
43
|
-
gem 'rubocop', '~> 0.57.2'
|
44
|
-
|
45
|
-
# Evaluate Gemfile.local if it exists
|
46
|
-
if File.exists? "#{__FILE__}.local"
|
47
|
-
eval(File.read("#{__FILE__}.local"), binding)
|
48
|
-
end
|
49
|
-
|
50
|
-
# Evaluate ~/.gemfile if it exists
|
51
|
-
if File.exists?(File.join(Dir.home, '.gemfile'))
|
52
|
-
eval(File.read(File.join(Dir.home, '.gemfile')), binding)
|
53
|
-
end
|
data/HISTORY.md
DELETED
@@ -1,218 +0,0 @@
|
|
1
|
-
# Previous Changes
|
2
|
-
|
3
|
-
## [2.0.0](https://github.com/puppetlabs/puppet-strings/tree/2.0.0) (2018-05-11)
|
4
|
-
|
5
|
-
[Full Changelog](https://github.com/puppetlabs/puppet-strings/compare/1.2.1...2.0.0)
|
6
|
-
|
7
|
-
### Changed
|
8
|
-
|
9
|
-
- bump required ruby and puppet versions [\#178](https://github.com/puppetlabs/puppet-strings/pull/178) ([eputnam](https://github.com/eputnam))
|
10
|
-
|
11
|
-
### Added
|
12
|
-
|
13
|
-
- \(PDOC-238\) add generated message to markdown [\#175](https://github.com/puppetlabs/puppet-strings/pull/175) ([eputnam](https://github.com/eputnam))
|
14
|
-
- \(PDOC-228\) puppet plan support [\#168](https://github.com/puppetlabs/puppet-strings/pull/168) ([eputnam](https://github.com/eputnam))
|
15
|
-
- \(PDOC-206\) support for tasks [\#161](https://github.com/puppetlabs/puppet-strings/pull/161) ([eputnam](https://github.com/eputnam))
|
16
|
-
|
17
|
-
### Fixed
|
18
|
-
|
19
|
-
- \(PDOC-36\) fix hack for README urls [\#176](https://github.com/puppetlabs/puppet-strings/pull/176) ([eputnam](https://github.com/eputnam))
|
20
|
-
- \(PDOC-240\) add handling for :array node type in rsapi\_handler [\#174](https://github.com/puppetlabs/puppet-strings/pull/174) ([eputnam](https://github.com/eputnam))
|
21
|
-
- \(PDOC-159\) server urls fix [\#173](https://github.com/puppetlabs/puppet-strings/pull/173) ([eputnam](https://github.com/eputnam))
|
22
|
-
- \(maint\) display Plans in markdown table of contents [\#171](https://github.com/puppetlabs/puppet-strings/pull/171) ([eputnam](https://github.com/eputnam))
|
23
|
-
- \(PDOC-233\) markdown whitespace fixes [\#170](https://github.com/puppetlabs/puppet-strings/pull/170) ([JohnLyman](https://github.com/JohnLyman))
|
24
|
-
- \(PDOC-229\) fix error with return\_type and @return [\#169](https://github.com/puppetlabs/puppet-strings/pull/169) ([eputnam](https://github.com/eputnam))
|
25
|
-
- \(PDOC-36\) hack to fix README links in generated HTML [\#167](https://github.com/puppetlabs/puppet-strings/pull/167) ([eputnam](https://github.com/eputnam))
|
26
|
-
- \(PDOC-192\) remove warning for title/name [\#166](https://github.com/puppetlabs/puppet-strings/pull/166) ([eputnam](https://github.com/eputnam))
|
27
|
-
- \(maint\) add condition for misleading warning [\#155](https://github.com/puppetlabs/puppet-strings/pull/155) ([eputnam](https://github.com/eputnam))
|
28
|
-
|
29
|
-
## [1.2.1](https://github.com/puppetlabs/puppet-strings/tree/1.2.1) (2018-03-01)
|
30
|
-
|
31
|
-
[Full Changelog](https://github.com/puppetlabs/puppet-strings/compare/1.2.0...1.2.1)
|
32
|
-
|
33
|
-
### Fixed
|
34
|
-
|
35
|
-
- (PDOC-224) Handle --emit-json(-stdout) again [\#162](https://github.com/puppetlabs/puppet-strings/pull/162) ([ekohl](https://github.com/ekohl))
|
36
|
-
|
37
|
-
## [1.2.0](https://github.com/puppetlabs/puppet-strings/tree/1.2.0) (2018-02-26)
|
38
|
-
|
39
|
-
[Full Changelog](https://github.com/puppetlabs/puppet-strings/compare/1.1.1...1.2.0)
|
40
|
-
|
41
|
-
### Added
|
42
|
-
|
43
|
-
- \(PDOC-184\) generate markdown [\#156](https://github.com/puppetlabs/puppet-strings/pull/156) ([eputnam](https://github.com/eputnam))
|
44
|
-
- \(PDK-437\) Add support for Resource API types [\#153](https://github.com/puppetlabs/puppet-strings/pull/153) ([DavidS](https://github.com/DavidS))
|
45
|
-
|
46
|
-
### Fixed
|
47
|
-
|
48
|
-
- Fix return type matching for Puppet functions [\#159](https://github.com/puppetlabs/puppet-strings/pull/159) ([pegasd](https://github.com/pegasd))
|
49
|
-
- Add rgen as a runtime dependency [\#149](https://github.com/puppetlabs/puppet-strings/pull/149) ([rnelson0](https://github.com/rnelson0))
|
50
|
-
|
51
|
-
## 2017-10-20 - Release 1.1.1
|
52
|
-
|
53
|
-
### BugFixes
|
54
|
-
- Remove timestamps from footer of generated HTML pages ([GeoffWilliams](https://github.com/GeoffWilliams))
|
55
|
-
- Fix argument handling for `rake strings::generate` ([hashar](https://github.com/hashar))
|
56
|
-
|
57
|
-
### Other
|
58
|
-
- Fixed Markdown formatting issues in CHANGELOG ([maju6406](https://github.com/maju6406))
|
59
|
-
- Fixed typo in README ([hfm](https://github.com/hfm))
|
60
|
-
- Fixed Markdown formatting issues in README ([gguillotte](https://github.com/gguillotte))
|
61
|
-
- Update Travis CI configurations for Ruby and Puppet versions ([ghoneycutt](https://github.com/ghoneycutt))
|
62
|
-
|
63
|
-
## 2017-03-20 - Release 1.1.0
|
64
|
-
|
65
|
-
### Summary
|
66
|
-
|
67
|
-
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.
|
68
|
-
|
69
|
-
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).
|
70
|
-
|
71
|
-
### Features
|
72
|
-
- 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.
|
73
|
-
- 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.
|
74
|
-
|
75
|
-
## 2016-11-28 - Release 1.0.0
|
76
|
-
|
77
|
-
### Summary
|
78
|
-
|
79
|
-
This release fixes up minor bugs from the 0.99.0 release and modifies the JSON schema for Puppet functions.
|
80
|
-
|
81
|
-
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).
|
82
|
-
|
83
|
-
### Features
|
84
|
-
- The JSON schema for Puppet functions has been altered to include a new 'signatures' top-level key **(PDOC-125)**
|
85
|
-
- Includes information about all function signatures (overloads). Existing overload key format has been preserved.
|
86
|
-
- Reworked README for enhanced clarity **(PDOC-133)**
|
87
|
-
|
88
|
-
### BugFixes
|
89
|
-
- Fixed an issue where the search box in the code navigator overlapped list items below it **(PDOC-93)**
|
90
|
-
- Strings can now handle multiple `defaultfor` calls in Puppet providers **(PDOC-95)**
|
91
|
-
- Fixed an issue preventing the generated \_index.html file from being uploaded to GitHub pages via the gh_pages task **(PDOC-120)**
|
92
|
-
- Fixed several issues with String's handling of Puppet 3.x and 4.x function return types **(PDOC-135)**, **(PDOC-136)**
|
93
|
-
- Fixed an issue where String's didn't properly parse overloads if no summary description was provided **(PDOC-129)**
|
94
|
-
- Strings now correctly handles Puppet 3.x functions when the `newfunction` call is on a newline **(PDOC-122)**
|
95
|
-
- Fixed an issue where certain Ruby string constructs were incompletely stripped from some docstrings **(PDOC-126)**
|
96
|
-
- Hanging indents from type feature descriptions are now properly stripped **(PDOC-127)**
|
97
|
-
|
98
|
-
## 2016-10-10 - Release 0.99.0
|
99
|
-
|
100
|
-
### Summary
|
101
|
-
|
102
|
-
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.
|
103
|
-
|
104
|
-
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).
|
105
|
-
|
106
|
-
### Features
|
107
|
-
- Complete overhaul, including code cleanup, bug fixes and new functionality **(PDOC-63)**
|
108
|
-
- 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
|
109
|
-
- New JSON schema organized to reflect the separation of types
|
110
|
-
- Support for custom functions written in the puppet language
|
111
|
-
- Support for puppet function overloads via the create_function 4.x API
|
112
|
-
- YARD bumped to latest version, 0.9.5
|
113
|
-
- Markdown is now the default format for parsing docstring text **(PDOC-86)**
|
114
|
-
- Note: this means Markdown text in YARD comments and tags, not a change in the output of strings
|
115
|
-
- New commandline options: --emit-json and --emit-json-stdout to generate JSON documentation **(PDOC-84)**
|
116
|
-
- Runtime dependency on Puppet has been removed, allowing strings to function in Puppet Enterprise 3.8 **(PDOC-80)**
|
117
|
-
- 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)
|
118
|
-
- New gemspec requirement on Ruby version 1.9.3, the oldest supported Ruby version
|
119
|
-
|
120
|
-
### BugFixes
|
121
|
-
|
122
|
-
- Prevents a blizzard of errors when documenting Puppet Core source and some puppet modules **(PDOC-63)**
|
123
|
-
- As this is a complete rewrite, many known and unknown bugs from the original code were fixed along the way
|
124
|
-
- Allow strings to be installed in PE 3.8 without overwriting existing puppet and facter installations with newer gems
|
125
|
-
|
126
|
-
## 2016-03-30 - Release 0.4.0
|
127
|
-
|
128
|
-
### Summary
|
129
|
-
|
130
|
-
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.
|
131
|
-
|
132
|
-
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).
|
133
|
-
|
134
|
-
### Features
|
135
|
-
- Support for JSON output **(PDOC-23)**
|
136
|
-
- Strings now has the ability to produce a JSON representation of a given puppet module
|
137
|
-
- The details of the JSON schema can be found [here](https://github.com/puppetlabs/puppet-strings/blob/master/json_dom.md)
|
138
|
-
- For details on how to generate JSON, see the [README](https://github.com/puppetlabs/puppet-strings/blob/master/README.md#running-puppet-strings)
|
139
|
-
- Migrate to ruby gems as a distribution method **(PDOC-28)**
|
140
|
-
- This is the last release of strings that will be available as a puppet module
|
141
|
-
- The 0.4.0 release will be released concurrently as a ruby gem
|
142
|
-
- After this release, all updates will only be available via the gem
|
143
|
-
|
144
|
-
### Bugfixes
|
145
|
-
|
146
|
-
- Fix issue that prevented strings from running with Puppet 4.4.0 **(PDOC-75)**
|
147
|
-
|
148
|
-
## 2015-09-22 - Release 0.3.1
|
149
|
-
|
150
|
-
### Summary
|
151
|
-
|
152
|
-
This is a minor bug fix release.
|
153
|
-
|
154
|
-
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).
|
155
|
-
|
156
|
-
### Bugfixes
|
157
|
-
|
158
|
-
- Prevent strings from printing unnecessary quotes in error messages **(PDOC-57)**
|
159
|
-
- Issue correct type check warnings for defined types **(PDOC-56)**
|
160
|
-
- Allow providers, types, and defines to have the same name **(PDOC-54)**
|
161
|
-
|
162
|
-
## 2015-09-21 - Release 0.3.0
|
163
|
-
|
164
|
-
### Summary
|
165
|
-
|
166
|
-
This release includes support for Puppet Types and Providers, as well as
|
167
|
-
type checking Puppet 4x functions and defined types.
|
168
|
-
|
169
|
-
All related tickets can be found under the [PDOC][PDOC JIRA] JIRA project with
|
170
|
-
the fix version of [0.3.0](https://tickets.puppetlabs.com/issues/?filter=15529).
|
171
|
-
|
172
|
-
#### Features
|
173
|
-
|
174
|
-
- Support for Puppet Types and Providers **(PDOC-35)**
|
175
|
-
- Type check Puppet 4x functions and defined types where possible and warn the user when types don't match.
|
176
|
-
- Type check defined types **(PDOC-21)**
|
177
|
-
- Type check Puppet 4x functions **(PDOC-38)** **(PDOC-19)** **(PDOC-37)**
|
178
|
-
- Output type info in generated HTML **(PDOC-19)**
|
179
|
-
- Improved warnings and logging.
|
180
|
-
- Create a consistent style for warnings. **(PDOC-49)**
|
181
|
-
- All warnings get printed on stderr.
|
182
|
-
- Yard warnings are redirected to a log file **(PDOC-38)**
|
183
|
-
- Prevent duplicate warnings **(PDOC-38)**
|
184
|
-
- Improved README installation and usage instructions.
|
185
|
-
- Installation instructions using Puppet **(PDOC-33)**
|
186
|
-
|
187
|
-
|
188
|
-
#### Bugfixes
|
189
|
-
|
190
|
-
- Fix markdown list processing **(PDOC-30)**
|
191
|
-
- Fix namespacing for nested classes and defined types **(PDOC-20)**
|
192
|
-
|
193
|
-
|
194
|
-
## 2015-03-17 - Release 0.2.0
|
195
|
-
|
196
|
-
### Summary
|
197
|
-
|
198
|
-
This release includes improvements to the HTML output generated by strings and a few bug fixes.
|
199
|
-
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).
|
200
|
-
|
201
|
-
[PDOC JIRA]: https://tickets.puppetlabs.com/browse/PDOC
|
202
|
-
|
203
|
-
#### Features
|
204
|
-
- Custom YARD templates for classes and defined types **(PDOC-17)**
|
205
|
-
- Improved HMTL output that is more appropriate for Puppet code (especially for parameters)
|
206
|
-
- Support for the explicit list of YARD tags we will be supporting initially (@param, @return, @since, @example)
|
207
|
-
- Our own custom YARD templates which can be easily extended and tweaked
|
208
|
-
|
209
|
-
- Custom YARD templates for 3.x and 4.x functions **(PDOC-24)**
|
210
|
-
- Improved HMTL output that is more appropriate for listing several functions on one webpage in addition to being more consistent with the HTML produced for classes and defined types.
|
211
|
-
- Support for the explicit list of YARD tags we will be supporting initially (@param, @return, @since, @example)
|
212
|
-
- Our own custom YARD templates which can be easily extended and tweaked
|
213
|
-
- Addition of RubCop Travis CI job to ensure code quality and consistency **(PDOC-8)**
|
214
|
-
|
215
|
-
#### Bugfixes
|
216
|
-
- Puppet namespaces are no longer mangled for nested classes and defined types **(PDOC-25)**
|
217
|
-
- Strings is now compatible with the renaming of the Puppetx/puppetx namespace to PuppetX/puppet_x **(PDOC-26)**
|
218
|
-
- Strings will no longer crash when documenting 3x functions with less than two arguments passed into newfunction **(PDOC-27)**
|