puppet-strings 2.2.0 → 2.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (150) hide show
  1. checksums.yaml +5 -5
  2. data/CHANGELOG.md +87 -1
  3. data/CONTRIBUTING.md +32 -2
  4. data/README.md +81 -17
  5. data/lib/puppet-strings.rb +5 -3
  6. data/lib/puppet-strings/describe.rb +2 -0
  7. data/lib/puppet-strings/json.rb +4 -0
  8. data/lib/puppet-strings/markdown.rb +13 -9
  9. data/lib/puppet-strings/markdown/base.rb +30 -3
  10. data/lib/puppet-strings/markdown/data_type.rb +36 -0
  11. data/lib/puppet-strings/markdown/data_types.rb +43 -0
  12. data/lib/puppet-strings/markdown/defined_type.rb +2 -0
  13. data/lib/puppet-strings/markdown/defined_types.rb +3 -1
  14. data/lib/puppet-strings/markdown/function.rb +9 -7
  15. data/lib/puppet-strings/markdown/functions.rb +3 -1
  16. data/lib/puppet-strings/markdown/puppet_class.rb +2 -0
  17. data/lib/puppet-strings/markdown/puppet_classes.rb +3 -1
  18. data/lib/puppet-strings/markdown/puppet_plan.rb +2 -0
  19. data/lib/puppet-strings/markdown/puppet_plans.rb +3 -1
  20. data/lib/puppet-strings/markdown/puppet_task.rb +2 -0
  21. data/lib/puppet-strings/markdown/puppet_tasks.rb +3 -1
  22. data/lib/puppet-strings/markdown/resource_type.rb +21 -2
  23. data/lib/puppet-strings/markdown/resource_types.rb +3 -1
  24. data/lib/puppet-strings/markdown/table_of_contents.rb +4 -1
  25. data/lib/puppet-strings/markdown/templates/classes_and_defines.erb +18 -6
  26. data/lib/puppet-strings/markdown/templates/data_type.erb +101 -0
  27. data/lib/puppet-strings/markdown/templates/data_type_function.erb +67 -0
  28. data/lib/puppet-strings/markdown/templates/function.erb +10 -1
  29. data/lib/puppet-strings/markdown/templates/puppet_task.erb +1 -1
  30. data/lib/puppet-strings/markdown/templates/resource_type.erb +35 -13
  31. data/lib/puppet-strings/markdown/templates/table_of_contents.erb +6 -6
  32. data/lib/puppet-strings/monkey_patches/display_object_command.rb +2 -0
  33. data/lib/puppet-strings/tasks.rb +2 -0
  34. data/lib/puppet-strings/tasks/generate.rb +5 -2
  35. data/lib/puppet-strings/tasks/gh_pages.rb +3 -0
  36. data/lib/puppet-strings/version.rb +3 -1
  37. data/lib/puppet-strings/yard.rb +19 -0
  38. data/lib/puppet-strings/yard/code_objects.rb +4 -0
  39. data/lib/puppet-strings/yard/code_objects/base.rb +2 -0
  40. data/lib/puppet-strings/yard/code_objects/class.rb +5 -3
  41. data/lib/puppet-strings/yard/code_objects/data_type.rb +102 -0
  42. data/lib/puppet-strings/yard/code_objects/data_type_alias.rb +60 -0
  43. data/lib/puppet-strings/yard/code_objects/defined_type.rb +5 -3
  44. data/lib/puppet-strings/yard/code_objects/function.rb +9 -6
  45. data/lib/puppet-strings/yard/code_objects/group.rb +3 -0
  46. data/lib/puppet-strings/yard/code_objects/plan.rb +5 -3
  47. data/lib/puppet-strings/yard/code_objects/provider.rb +6 -0
  48. data/lib/puppet-strings/yard/code_objects/task.rb +3 -1
  49. data/lib/puppet-strings/yard/code_objects/type.rb +49 -5
  50. data/lib/puppet-strings/yard/handlers.rb +4 -0
  51. data/lib/puppet-strings/yard/handlers/helpers.rb +2 -0
  52. data/lib/puppet-strings/yard/handlers/json/base.rb +2 -0
  53. data/lib/puppet-strings/yard/handlers/json/task_handler.rb +2 -0
  54. data/lib/puppet-strings/yard/handlers/puppet/base.rb +3 -0
  55. data/lib/puppet-strings/yard/handlers/puppet/class_handler.rb +2 -0
  56. data/lib/puppet-strings/yard/handlers/puppet/data_type_alias_handler.rb +26 -0
  57. data/lib/puppet-strings/yard/handlers/puppet/defined_type_handler.rb +2 -0
  58. data/lib/puppet-strings/yard/handlers/puppet/function_handler.rb +3 -1
  59. data/lib/puppet-strings/yard/handlers/puppet/plan_handler.rb +2 -0
  60. data/lib/puppet-strings/yard/handlers/ruby/base.rb +7 -2
  61. data/lib/puppet-strings/yard/handlers/ruby/data_type_handler.rb +409 -0
  62. data/lib/puppet-strings/yard/handlers/ruby/function_handler.rb +9 -9
  63. data/lib/puppet-strings/yard/handlers/ruby/provider_handler.rb +13 -0
  64. data/lib/puppet-strings/yard/handlers/ruby/rsapi_handler.rb +6 -3
  65. data/lib/puppet-strings/yard/handlers/ruby/type_base.rb +25 -12
  66. data/lib/puppet-strings/yard/handlers/ruby/type_extras_handler.rb +6 -3
  67. data/lib/puppet-strings/yard/handlers/ruby/type_handler.rb +18 -1
  68. data/lib/puppet-strings/yard/parsers.rb +2 -0
  69. data/lib/puppet-strings/yard/parsers/json/parser.rb +3 -1
  70. data/lib/puppet-strings/yard/parsers/json/task_statement.rb +2 -0
  71. data/lib/puppet-strings/yard/parsers/puppet/parser.rb +11 -2
  72. data/lib/puppet-strings/yard/parsers/puppet/statement.rb +29 -0
  73. data/lib/puppet-strings/yard/tags.rb +4 -0
  74. data/lib/puppet-strings/yard/tags/enum_tag.rb +14 -0
  75. data/lib/puppet-strings/yard/tags/factory.rb +18 -0
  76. data/lib/puppet-strings/yard/tags/overload_tag.rb +5 -2
  77. data/lib/puppet-strings/yard/tags/parameter_directive.rb +5 -4
  78. data/lib/puppet-strings/yard/tags/property_directive.rb +5 -4
  79. data/lib/puppet-strings/yard/tags/summary_tag.rb +2 -0
  80. data/lib/puppet-strings/yard/templates/default/fulldoc/html/full_list_puppet_data_type.erb +10 -0
  81. data/lib/puppet-strings/yard/templates/default/fulldoc/html/setup.rb +9 -0
  82. data/lib/puppet-strings/yard/templates/default/layout/html/objects.erb +2 -0
  83. data/lib/puppet-strings/yard/templates/default/layout/html/setup.rb +18 -1
  84. data/lib/puppet-strings/yard/templates/default/puppet_data_type/html/box_info.erb +10 -0
  85. data/lib/puppet-strings/yard/templates/default/puppet_data_type/html/header.erb +1 -0
  86. data/lib/puppet-strings/yard/templates/default/puppet_data_type/html/method_details_list.erb +6 -0
  87. data/lib/puppet-strings/yard/templates/default/puppet_data_type/html/note.erb +6 -0
  88. data/lib/puppet-strings/yard/templates/default/puppet_data_type/html/overview.erb +6 -0
  89. data/lib/puppet-strings/yard/templates/default/puppet_data_type/html/setup.rb +13 -0
  90. data/lib/puppet-strings/yard/templates/default/puppet_data_type/html/source.erb +12 -0
  91. data/lib/puppet-strings/yard/templates/default/puppet_data_type/html/summary.erb +4 -0
  92. data/lib/puppet-strings/yard/templates/default/puppet_data_type/html/todo.erb +6 -0
  93. data/lib/puppet-strings/yard/templates/default/puppet_data_type_alias/html/alias_of.erb +10 -0
  94. data/lib/puppet-strings/yard/templates/default/puppet_data_type_alias/html/box_info.erb +10 -0
  95. data/lib/puppet-strings/yard/templates/default/puppet_data_type_alias/html/header.erb +1 -0
  96. data/lib/puppet-strings/yard/templates/default/puppet_data_type_alias/html/note.erb +6 -0
  97. data/lib/puppet-strings/yard/templates/default/puppet_data_type_alias/html/overview.erb +6 -0
  98. data/lib/puppet-strings/yard/templates/default/puppet_data_type_alias/html/setup.rb +17 -0
  99. data/lib/puppet-strings/yard/templates/default/puppet_data_type_alias/html/source.erb +12 -0
  100. data/lib/puppet-strings/yard/templates/default/puppet_data_type_alias/html/summary.erb +4 -0
  101. data/lib/puppet-strings/yard/templates/default/puppet_data_type_alias/html/todo.erb +6 -0
  102. data/lib/puppet-strings/yard/templates/default/puppet_function/html/setup.rb +1 -1
  103. data/lib/puppet-strings/yard/templates/default/puppet_type/html/setup.rb +3 -1
  104. data/lib/puppet-strings/yard/templates/default/tags/html/enum.erb +17 -0
  105. data/lib/puppet-strings/yard/templates/default/tags/setup.rb +7 -0
  106. data/lib/puppet-strings/yard/util.rb +7 -4
  107. data/lib/puppet/application/strings.rb +2 -0
  108. data/lib/puppet/face/strings.rb +7 -4
  109. data/lib/puppet/feature/rgen.rb +2 -0
  110. data/lib/puppet/feature/yard.rb +2 -0
  111. metadata +35 -45
  112. data/Gemfile +0 -38
  113. data/HISTORY.md +0 -218
  114. data/JSON.md +0 -802
  115. data/Rakefile +0 -98
  116. data/codecov.yml +0 -3
  117. data/misc/ANNOUNCEMENT_TEMPLATE.md +0 -40
  118. data/spec/acceptance/emit_json_options.rb +0 -71
  119. data/spec/acceptance/generate_markdown_spec.rb +0 -49
  120. data/spec/acceptance/lib/util.rb +0 -163
  121. data/spec/acceptance/running_strings_generate.rb +0 -54
  122. data/spec/fixtures/acceptance/modules/test/functions/add.pp +0 -9
  123. data/spec/fixtures/acceptance/modules/test/lib/puppet/functions/4x_function.rb +0 -5
  124. data/spec/fixtures/acceptance/modules/test/lib/puppet/parser/functions/function3x.rb +0 -2
  125. data/spec/fixtures/acceptance/modules/test/lib/puppet/provider/server/linux.rb +0 -9
  126. data/spec/fixtures/acceptance/modules/test/lib/puppet/type/database.rb +0 -15
  127. data/spec/fixtures/acceptance/modules/test/manifests/init.pp +0 -27
  128. data/spec/fixtures/acceptance/modules/test/manifests/triple_nested_classes.pp +0 -27
  129. data/spec/fixtures/acceptance/modules/test/metadata.json +0 -6
  130. data/spec/fixtures/unit/markdown/output.md +0 -508
  131. data/spec/fixtures/unit/markdown/output_with_plan.md +0 -542
  132. data/spec/spec_helper.rb +0 -46
  133. data/spec/spec_helper_acceptance.rb +0 -28
  134. data/spec/unit/puppet-strings/describe_spec.rb +0 -141
  135. data/spec/unit/puppet-strings/json_spec.rb +0 -283
  136. data/spec/unit/puppet-strings/markdown/base_spec.rb +0 -146
  137. data/spec/unit/puppet-strings/markdown_spec.rb +0 -296
  138. data/spec/unit/puppet-strings/yard/code_objects/task_spec.rb +0 -92
  139. data/spec/unit/puppet-strings/yard/handlers/json/task_handler_spec.rb +0 -116
  140. data/spec/unit/puppet-strings/yard/handlers/puppet/class_handler_spec.rb +0 -217
  141. data/spec/unit/puppet-strings/yard/handlers/puppet/defined_type_handler_spec.rb +0 -231
  142. data/spec/unit/puppet-strings/yard/handlers/puppet/function_handler_spec.rb +0 -315
  143. data/spec/unit/puppet-strings/yard/handlers/ruby/function_handler_spec.rb +0 -729
  144. data/spec/unit/puppet-strings/yard/handlers/ruby/provider_handler_spec.rb +0 -139
  145. data/spec/unit/puppet-strings/yard/handlers/ruby/rsapi_handler_spec.rb +0 -235
  146. data/spec/unit/puppet-strings/yard/handlers/ruby/type_handler_spec.rb +0 -295
  147. data/spec/unit/puppet-strings/yard/parsers/json/parser_spec.rb +0 -72
  148. data/spec/unit/puppet-strings/yard/parsers/json/task_statement_spec.rb +0 -56
  149. data/spec/unit/puppet-strings/yard/parsers/puppet/parser_spec.rb +0 -209
  150. 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/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!("=\"##{bad_link.first}\"", "=\"#label-#{bad_link.first.capitalize.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
 
@@ -38,11 +41,11 @@ module PuppetStrings::Yard::Util
38
41
  next t.to_hash if t.respond_to?(:to_hash)
39
42
 
40
43
  tag = { tag_name: t.tag_name }
41
- # grab nested information for @option tags
42
- if tag[:tag_name] == 'option'
44
+ # grab nested information for @option and @enum tags
45
+ if tag[:tag_name] == 'option' || tag[:tag_name] == 'enum'
43
46
  tag[:opt_name] = t.pair.name
44
47
  tag[:opt_text] = t.pair.text
45
- tag[:opt_types] = t.pair.types
48
+ tag[:opt_types] = t.pair.types if t.pair.types
46
49
  tag[:parent] = t.name
47
50
  end
48
51
  tag[:text] = t.text if t.text
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'puppet/application/face_base'
2
4
 
3
5
  # Implements the 'puppet strings' application.
@@ -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)
@@ -117,7 +120,7 @@ Puppet::Face.define(:strings, '0.0.1') do
117
120
 
118
121
  if args.length > 1
119
122
  if options[:list]
120
- $stderr.puts "WARNING: ignoring types when listing all types."
123
+ warn "WARNING: ignoring types when listing all types."
121
124
  else
122
125
  options[:describe_types] = args[0..-2]
123
126
  end
@@ -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 =~ /^1\.8/
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.
@@ -159,10 +162,10 @@ Puppet::Face.define(:strings, '0.0.1') do
159
162
  generate_options[:yard_args] = yard_args unless yard_args.empty?
160
163
  if options
161
164
  if options[:emit_json]
162
- $stderr.puts "WARNING: '--emit-json PATH' is deprecated. Use '--format json --out PATH' instead."
165
+ warn "WARNING: '--emit-json PATH' is deprecated. Use '--format json --out PATH' instead."
163
166
  end
164
167
  if options[:emit_json_stdout]
165
- $stderr.puts "WARNING: '--emit-json-stdout' is deprecated. Use '--format json' instead."
168
+ warn "WARNING: '--emit-json-stdout' is deprecated. Use '--format json' instead."
166
169
  end
167
170
  markup = options[:markup]
168
171
  generate_options[:markup] = markup if markup
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'puppet/util/feature'
2
4
 
3
5
  Puppet.features.add(:rgen, :libs => ['rgen/metamodel_builder', 'rgen/ecore/ecore'])
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'puppet/util/feature'
2
4
 
3
5
  Puppet.features.add(:yard, :libs => ['yard'])
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.2.0
4
+ version: 2.6.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: 2019-04-05 00:00:00.000000000 Z
11
+ date: 2021-01-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: yard
@@ -52,18 +52,15 @@ files:
52
52
  - CHANGELOG.md
53
53
  - COMMITTERS.md
54
54
  - CONTRIBUTING.md
55
- - Gemfile
56
- - HISTORY.md
57
- - JSON.md
58
55
  - LICENSE
59
56
  - README.md
60
- - Rakefile
61
- - codecov.yml
62
57
  - lib/puppet-strings.rb
63
58
  - lib/puppet-strings/describe.rb
64
59
  - lib/puppet-strings/json.rb
65
60
  - lib/puppet-strings/markdown.rb
66
61
  - lib/puppet-strings/markdown/base.rb
62
+ - lib/puppet-strings/markdown/data_type.rb
63
+ - lib/puppet-strings/markdown/data_types.rb
67
64
  - lib/puppet-strings/markdown/defined_type.rb
68
65
  - lib/puppet-strings/markdown/defined_types.rb
69
66
  - lib/puppet-strings/markdown/function.rb
@@ -78,6 +75,8 @@ files:
78
75
  - lib/puppet-strings/markdown/resource_types.rb
79
76
  - lib/puppet-strings/markdown/table_of_contents.rb
80
77
  - lib/puppet-strings/markdown/templates/classes_and_defines.erb
78
+ - lib/puppet-strings/markdown/templates/data_type.erb
79
+ - lib/puppet-strings/markdown/templates/data_type_function.erb
81
80
  - lib/puppet-strings/markdown/templates/function.erb
82
81
  - lib/puppet-strings/markdown/templates/puppet_task.erb
83
82
  - lib/puppet-strings/markdown/templates/resource_type.erb
@@ -91,6 +90,8 @@ files:
91
90
  - lib/puppet-strings/yard/code_objects.rb
92
91
  - lib/puppet-strings/yard/code_objects/base.rb
93
92
  - lib/puppet-strings/yard/code_objects/class.rb
93
+ - lib/puppet-strings/yard/code_objects/data_type.rb
94
+ - lib/puppet-strings/yard/code_objects/data_type_alias.rb
94
95
  - lib/puppet-strings/yard/code_objects/defined_type.rb
95
96
  - lib/puppet-strings/yard/code_objects/function.rb
96
97
  - lib/puppet-strings/yard/code_objects/group.rb
@@ -104,10 +105,12 @@ files:
104
105
  - lib/puppet-strings/yard/handlers/json/task_handler.rb
105
106
  - lib/puppet-strings/yard/handlers/puppet/base.rb
106
107
  - lib/puppet-strings/yard/handlers/puppet/class_handler.rb
108
+ - lib/puppet-strings/yard/handlers/puppet/data_type_alias_handler.rb
107
109
  - lib/puppet-strings/yard/handlers/puppet/defined_type_handler.rb
108
110
  - lib/puppet-strings/yard/handlers/puppet/function_handler.rb
109
111
  - lib/puppet-strings/yard/handlers/puppet/plan_handler.rb
110
112
  - lib/puppet-strings/yard/handlers/ruby/base.rb
113
+ - lib/puppet-strings/yard/handlers/ruby/data_type_handler.rb
111
114
  - lib/puppet-strings/yard/handlers/ruby/function_handler.rb
112
115
  - lib/puppet-strings/yard/handlers/ruby/provider_handler.rb
113
116
  - lib/puppet-strings/yard/handlers/ruby/rsapi_handler.rb
@@ -120,12 +123,15 @@ files:
120
123
  - lib/puppet-strings/yard/parsers/puppet/parser.rb
121
124
  - lib/puppet-strings/yard/parsers/puppet/statement.rb
122
125
  - lib/puppet-strings/yard/tags.rb
126
+ - lib/puppet-strings/yard/tags/enum_tag.rb
127
+ - lib/puppet-strings/yard/tags/factory.rb
123
128
  - lib/puppet-strings/yard/tags/overload_tag.rb
124
129
  - lib/puppet-strings/yard/tags/parameter_directive.rb
125
130
  - lib/puppet-strings/yard/tags/property_directive.rb
126
131
  - lib/puppet-strings/yard/tags/summary_tag.rb
127
132
  - lib/puppet-strings/yard/templates/default/fulldoc/html/css/common.css
128
133
  - lib/puppet-strings/yard/templates/default/fulldoc/html/full_list_puppet_class.erb
134
+ - lib/puppet-strings/yard/templates/default/fulldoc/html/full_list_puppet_data_type.erb
129
135
  - lib/puppet-strings/yard/templates/default/fulldoc/html/full_list_puppet_defined_type.erb
130
136
  - lib/puppet-strings/yard/templates/default/fulldoc/html/full_list_puppet_function.erb
131
137
  - lib/puppet-strings/yard/templates/default/fulldoc/html/full_list_puppet_plan.erb
@@ -144,6 +150,24 @@ files:
144
150
  - lib/puppet-strings/yard/templates/default/puppet_class/html/source.erb
145
151
  - lib/puppet-strings/yard/templates/default/puppet_class/html/summary.erb
146
152
  - lib/puppet-strings/yard/templates/default/puppet_class/html/todo.erb
153
+ - lib/puppet-strings/yard/templates/default/puppet_data_type/html/box_info.erb
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
156
+ - lib/puppet-strings/yard/templates/default/puppet_data_type/html/note.erb
157
+ - lib/puppet-strings/yard/templates/default/puppet_data_type/html/overview.erb
158
+ - lib/puppet-strings/yard/templates/default/puppet_data_type/html/setup.rb
159
+ - lib/puppet-strings/yard/templates/default/puppet_data_type/html/source.erb
160
+ - lib/puppet-strings/yard/templates/default/puppet_data_type/html/summary.erb
161
+ - lib/puppet-strings/yard/templates/default/puppet_data_type/html/todo.erb
162
+ - lib/puppet-strings/yard/templates/default/puppet_data_type_alias/html/alias_of.erb
163
+ - lib/puppet-strings/yard/templates/default/puppet_data_type_alias/html/box_info.erb
164
+ - lib/puppet-strings/yard/templates/default/puppet_data_type_alias/html/header.erb
165
+ - lib/puppet-strings/yard/templates/default/puppet_data_type_alias/html/note.erb
166
+ - lib/puppet-strings/yard/templates/default/puppet_data_type_alias/html/overview.erb
167
+ - lib/puppet-strings/yard/templates/default/puppet_data_type_alias/html/setup.rb
168
+ - lib/puppet-strings/yard/templates/default/puppet_data_type_alias/html/source.erb
169
+ - lib/puppet-strings/yard/templates/default/puppet_data_type_alias/html/summary.erb
170
+ - lib/puppet-strings/yard/templates/default/puppet_data_type_alias/html/todo.erb
147
171
  - lib/puppet-strings/yard/templates/default/puppet_defined_type/html/box_info.erb
148
172
  - lib/puppet-strings/yard/templates/default/puppet_defined_type/html/header.erb
149
173
  - lib/puppet-strings/yard/templates/default/puppet_defined_type/html/note.erb
@@ -191,6 +215,7 @@ files:
191
215
  - lib/puppet-strings/yard/templates/default/puppet_type/html/setup.rb
192
216
  - lib/puppet-strings/yard/templates/default/puppet_type/html/summary.erb
193
217
  - lib/puppet-strings/yard/templates/default/puppet_type/html/todo.erb
218
+ - lib/puppet-strings/yard/templates/default/tags/html/enum.erb
194
219
  - lib/puppet-strings/yard/templates/default/tags/html/puppet_overload.erb
195
220
  - lib/puppet-strings/yard/templates/default/tags/setup.rb
196
221
  - lib/puppet-strings/yard/util.rb
@@ -198,40 +223,6 @@ files:
198
223
  - lib/puppet/face/strings.rb
199
224
  - lib/puppet/feature/rgen.rb
200
225
  - lib/puppet/feature/yard.rb
201
- - misc/ANNOUNCEMENT_TEMPLATE.md
202
- - spec/acceptance/emit_json_options.rb
203
- - spec/acceptance/generate_markdown_spec.rb
204
- - spec/acceptance/lib/util.rb
205
- - spec/acceptance/running_strings_generate.rb
206
- - spec/fixtures/acceptance/modules/test/functions/add.pp
207
- - spec/fixtures/acceptance/modules/test/lib/puppet/functions/4x_function.rb
208
- - spec/fixtures/acceptance/modules/test/lib/puppet/parser/functions/function3x.rb
209
- - spec/fixtures/acceptance/modules/test/lib/puppet/provider/server/linux.rb
210
- - spec/fixtures/acceptance/modules/test/lib/puppet/type/database.rb
211
- - spec/fixtures/acceptance/modules/test/manifests/init.pp
212
- - spec/fixtures/acceptance/modules/test/manifests/triple_nested_classes.pp
213
- - spec/fixtures/acceptance/modules/test/metadata.json
214
- - spec/fixtures/unit/markdown/output.md
215
- - spec/fixtures/unit/markdown/output_with_plan.md
216
- - spec/spec_helper.rb
217
- - spec/spec_helper_acceptance.rb
218
- - spec/unit/puppet-strings/describe_spec.rb
219
- - spec/unit/puppet-strings/json_spec.rb
220
- - spec/unit/puppet-strings/markdown/base_spec.rb
221
- - spec/unit/puppet-strings/markdown_spec.rb
222
- - spec/unit/puppet-strings/yard/code_objects/task_spec.rb
223
- - spec/unit/puppet-strings/yard/handlers/json/task_handler_spec.rb
224
- - spec/unit/puppet-strings/yard/handlers/puppet/class_handler_spec.rb
225
- - spec/unit/puppet-strings/yard/handlers/puppet/defined_type_handler_spec.rb
226
- - spec/unit/puppet-strings/yard/handlers/puppet/function_handler_spec.rb
227
- - spec/unit/puppet-strings/yard/handlers/ruby/function_handler_spec.rb
228
- - spec/unit/puppet-strings/yard/handlers/ruby/provider_handler_spec.rb
229
- - spec/unit/puppet-strings/yard/handlers/ruby/rsapi_handler_spec.rb
230
- - spec/unit/puppet-strings/yard/handlers/ruby/type_handler_spec.rb
231
- - spec/unit/puppet-strings/yard/parsers/json/parser_spec.rb
232
- - spec/unit/puppet-strings/yard/parsers/json/task_statement_spec.rb
233
- - spec/unit/puppet-strings/yard/parsers/puppet/parser_spec.rb
234
- - spec/unit/puppet-strings/yard/util_spec.rb
235
226
  homepage: https://github.com/puppetlabs/puppet-strings
236
227
  licenses:
237
228
  - Apache-2.0
@@ -244,16 +235,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
244
235
  requirements:
245
236
  - - ">="
246
237
  - !ruby/object:Gem::Version
247
- version: 2.1.0
238
+ version: 2.3.0
248
239
  required_rubygems_version: !ruby/object:Gem::Requirement
249
240
  requirements:
250
241
  - - ">="
251
242
  - !ruby/object:Gem::Version
252
243
  version: '0'
253
244
  requirements:
254
- - puppet, >= 4.0.0
255
- rubyforge_project:
256
- rubygems_version: 2.5.1
245
+ - puppet, >= 5.0.0
246
+ rubygems_version: 3.2.5
257
247
  signing_key:
258
248
  specification_version: 4
259
249
  summary: Puppet documentation via YARD
data/Gemfile DELETED
@@ -1,38 +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
- gem 'beaker', '< 3.0'
27
- gem 'beaker-rspec'
28
- gem 'beaker-hostgenerator'
29
- gem 'beaker-abs'
30
- end
31
-
32
- group :development do
33
- 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')
34
- gem 'pry'
35
- gem 'pry-byebug'
36
- end
37
-
38
- gem 'rubocop', '~> 0.49'
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)**