puppet-strings 2.1.0 → 2.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (120) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +78 -4
  3. data/CONTRIBUTING.md +32 -2
  4. data/README.md +81 -17
  5. data/lib/puppet-strings.rb +13 -4
  6. data/lib/puppet-strings/describe.rb +68 -0
  7. data/lib/puppet-strings/json.rb +2 -38
  8. data/lib/puppet-strings/markdown.rb +3 -1
  9. data/lib/puppet-strings/markdown/base.rb +37 -16
  10. data/lib/puppet-strings/markdown/data_type.rb +34 -0
  11. data/lib/puppet-strings/markdown/data_types.rb +41 -0
  12. data/lib/puppet-strings/markdown/function.rb +2 -2
  13. data/lib/puppet-strings/markdown/resource_type.rb +19 -2
  14. data/lib/puppet-strings/markdown/table_of_contents.rb +1 -0
  15. data/lib/puppet-strings/markdown/templates/classes_and_defines.erb +12 -4
  16. data/lib/puppet-strings/markdown/templates/data_type.erb +93 -0
  17. data/lib/puppet-strings/markdown/templates/data_type_function.erb +67 -0
  18. data/lib/puppet-strings/markdown/templates/function.erb +36 -1
  19. data/lib/puppet-strings/markdown/templates/puppet_task.erb +1 -1
  20. data/lib/puppet-strings/markdown/templates/resource_type.erb +32 -12
  21. data/lib/puppet-strings/markdown/templates/table_of_contents.erb +6 -6
  22. data/lib/puppet-strings/tasks/generate.rb +10 -3
  23. data/lib/puppet-strings/version.rb +1 -1
  24. data/lib/puppet-strings/yard.rb +16 -0
  25. data/lib/puppet-strings/yard/code_objects.rb +2 -0
  26. data/lib/puppet-strings/yard/code_objects/class.rb +2 -2
  27. data/lib/puppet-strings/yard/code_objects/data_type.rb +100 -0
  28. data/lib/puppet-strings/yard/code_objects/data_type_alias.rb +58 -0
  29. data/lib/puppet-strings/yard/code_objects/defined_type.rb +2 -2
  30. data/lib/puppet-strings/yard/code_objects/function.rb +4 -4
  31. data/lib/puppet-strings/yard/code_objects/plan.rb +2 -2
  32. data/lib/puppet-strings/yard/code_objects/provider.rb +1 -1
  33. data/lib/puppet-strings/yard/code_objects/task.rb +1 -1
  34. data/lib/puppet-strings/yard/code_objects/type.rb +48 -6
  35. data/lib/puppet-strings/yard/handlers.rb +3 -0
  36. data/lib/puppet-strings/yard/handlers/puppet/data_type_alias_handler.rb +24 -0
  37. data/lib/puppet-strings/yard/handlers/ruby/base.rb +12 -1
  38. data/lib/puppet-strings/yard/handlers/ruby/data_type_handler.rb +393 -0
  39. data/lib/puppet-strings/yard/handlers/ruby/function_handler.rb +2 -12
  40. data/lib/puppet-strings/yard/handlers/ruby/provider_handler.rb +1 -9
  41. data/lib/puppet-strings/yard/handlers/ruby/rsapi_handler.rb +3 -3
  42. data/lib/puppet-strings/yard/handlers/ruby/type_base.rb +135 -0
  43. data/lib/puppet-strings/yard/handlers/ruby/type_extras_handler.rb +56 -0
  44. data/lib/puppet-strings/yard/handlers/ruby/type_handler.rb +9 -115
  45. data/lib/puppet-strings/yard/parsers/json/parser.rb +4 -2
  46. data/lib/puppet-strings/yard/parsers/puppet/parser.rb +14 -7
  47. data/lib/puppet-strings/yard/parsers/puppet/statement.rb +25 -0
  48. data/lib/puppet-strings/yard/tags.rb +2 -0
  49. data/lib/puppet-strings/yard/tags/enum_tag.rb +12 -0
  50. data/lib/puppet-strings/yard/tags/factory.rb +16 -0
  51. data/lib/puppet-strings/yard/tags/overload_tag.rb +2 -2
  52. data/lib/puppet-strings/yard/templates/default/fulldoc/html/full_list_puppet_data_type.erb +10 -0
  53. data/lib/puppet-strings/yard/templates/default/fulldoc/html/setup.rb +9 -0
  54. data/lib/puppet-strings/yard/templates/default/layout/html/objects.erb +2 -0
  55. data/lib/puppet-strings/yard/templates/default/layout/html/setup.rb +18 -1
  56. data/lib/puppet-strings/yard/templates/default/puppet_data_type/html/box_info.erb +10 -0
  57. data/lib/puppet-strings/yard/templates/default/puppet_data_type/html/header.erb +1 -0
  58. data/lib/puppet-strings/yard/templates/default/puppet_data_type/html/method_details_list.erb +6 -0
  59. data/lib/puppet-strings/yard/templates/default/puppet_data_type/html/note.erb +6 -0
  60. data/lib/puppet-strings/yard/templates/default/puppet_data_type/html/overview.erb +6 -0
  61. data/lib/puppet-strings/yard/templates/default/puppet_data_type/html/setup.rb +13 -0
  62. data/lib/puppet-strings/yard/templates/default/puppet_data_type/html/source.erb +12 -0
  63. data/lib/puppet-strings/yard/templates/default/puppet_data_type/html/summary.erb +4 -0
  64. data/lib/puppet-strings/yard/templates/default/puppet_data_type/html/todo.erb +6 -0
  65. data/lib/puppet-strings/yard/templates/default/puppet_data_type_alias/html/alias_of.erb +10 -0
  66. data/lib/puppet-strings/yard/templates/default/puppet_data_type_alias/html/box_info.erb +10 -0
  67. data/lib/puppet-strings/yard/templates/default/puppet_data_type_alias/html/header.erb +1 -0
  68. data/lib/puppet-strings/yard/templates/default/puppet_data_type_alias/html/note.erb +6 -0
  69. data/lib/puppet-strings/yard/templates/default/puppet_data_type_alias/html/overview.erb +6 -0
  70. data/lib/puppet-strings/yard/templates/default/puppet_data_type_alias/html/setup.rb +17 -0
  71. data/lib/puppet-strings/yard/templates/default/puppet_data_type_alias/html/source.erb +12 -0
  72. data/lib/puppet-strings/yard/templates/default/puppet_data_type_alias/html/summary.erb +4 -0
  73. data/lib/puppet-strings/yard/templates/default/puppet_data_type_alias/html/todo.erb +6 -0
  74. data/lib/puppet-strings/yard/templates/default/puppet_type/html/setup.rb +3 -1
  75. data/lib/puppet-strings/yard/templates/default/tags/html/enum.erb +17 -0
  76. data/lib/puppet-strings/yard/templates/default/tags/setup.rb +7 -0
  77. data/lib/puppet-strings/yard/util.rb +48 -0
  78. data/lib/puppet/face/strings.rb +68 -3
  79. metadata +36 -45
  80. data/Gemfile +0 -37
  81. data/HISTORY.md +0 -218
  82. data/JSON.md +0 -802
  83. data/Rakefile +0 -93
  84. data/codecov.yml +0 -3
  85. data/misc/ANNOUNCEMENT_TEMPLATE.md +0 -40
  86. data/spec/acceptance/emit_json_options.rb +0 -71
  87. data/spec/acceptance/generate_markdown_spec.rb +0 -49
  88. data/spec/acceptance/lib/util.rb +0 -163
  89. data/spec/acceptance/running_strings_generate.rb +0 -54
  90. data/spec/fixtures/acceptance/modules/test/functions/add.pp +0 -9
  91. data/spec/fixtures/acceptance/modules/test/lib/puppet/functions/4x_function.rb +0 -5
  92. data/spec/fixtures/acceptance/modules/test/lib/puppet/parser/functions/function3x.rb +0 -2
  93. data/spec/fixtures/acceptance/modules/test/lib/puppet/provider/server/linux.rb +0 -9
  94. data/spec/fixtures/acceptance/modules/test/lib/puppet/type/database.rb +0 -15
  95. data/spec/fixtures/acceptance/modules/test/manifests/init.pp +0 -27
  96. data/spec/fixtures/acceptance/modules/test/manifests/triple_nested_classes.pp +0 -27
  97. data/spec/fixtures/acceptance/modules/test/metadata.json +0 -6
  98. data/spec/fixtures/unit/json/output.json +0 -660
  99. data/spec/fixtures/unit/json/output_with_plan.json +0 -697
  100. data/spec/fixtures/unit/json/output_without_puppet_function.json +0 -480
  101. data/spec/fixtures/unit/markdown/output.md +0 -444
  102. data/spec/fixtures/unit/markdown/output_with_plan.md +0 -478
  103. data/spec/spec_helper.rb +0 -45
  104. data/spec/spec_helper_acceptance.rb +0 -28
  105. data/spec/unit/puppet-strings/json_spec.rb +0 -229
  106. data/spec/unit/puppet-strings/markdown/base_spec.rb +0 -146
  107. data/spec/unit/puppet-strings/markdown_spec.rb +0 -283
  108. data/spec/unit/puppet-strings/yard/code_objects/task_spec.rb +0 -92
  109. data/spec/unit/puppet-strings/yard/handlers/json/task_handler_spec.rb +0 -124
  110. data/spec/unit/puppet-strings/yard/handlers/puppet/class_handler_spec.rb +0 -217
  111. data/spec/unit/puppet-strings/yard/handlers/puppet/defined_type_handler_spec.rb +0 -231
  112. data/spec/unit/puppet-strings/yard/handlers/puppet/function_handler_spec.rb +0 -315
  113. data/spec/unit/puppet-strings/yard/handlers/ruby/function_handler_spec.rb +0 -729
  114. data/spec/unit/puppet-strings/yard/handlers/ruby/provider_handler_spec.rb +0 -139
  115. data/spec/unit/puppet-strings/yard/handlers/ruby/rsapi_handler_spec.rb +0 -214
  116. data/spec/unit/puppet-strings/yard/handlers/ruby/type_handler_spec.rb +0 -269
  117. data/spec/unit/puppet-strings/yard/parsers/json/parser_spec.rb +0 -70
  118. data/spec/unit/puppet-strings/yard/parsers/json/task_statement_spec.rb +0 -56
  119. data/spec/unit/puppet-strings/yard/parsers/puppet/parser_spec.rb +0 -209
  120. data/spec/unit/puppet-strings/yard/util_spec.rb +0 -48
@@ -81,6 +81,65 @@ Puppet::Face.define(:strings, '0.0.1') do
81
81
  end
82
82
  end
83
83
 
84
+ action(:describe) do #This is Kris' experiment with string based describe
85
+ option "--list" do
86
+ summary "list types"
87
+ end
88
+ option "--providers" do
89
+ summary "provide details on providers"
90
+ end
91
+
92
+ #TODO: Implement the rest of describe behavior
93
+ # * --help:
94
+ # Print this help text
95
+
96
+ # * --providers:
97
+ # Describe providers in detail for each type
98
+
99
+ # * --list:
100
+ # List all types
101
+
102
+ # * --meta:
103
+ # List all metaparameters
104
+
105
+ # * --short:
106
+ # List only parameters without detail
107
+
108
+
109
+ when_invoked do |*args|
110
+ check_required_features
111
+ require 'puppet-strings'
112
+
113
+ options = args.last
114
+ options[:describe] = true
115
+ options[:stdout] = true
116
+ options[:format] = 'json'
117
+
118
+ if args.length > 1
119
+ if options[:list]
120
+ warn "WARNING: ignoring types when listing all types."
121
+ else
122
+ options[:describe_types] = args[0..-2]
123
+ end
124
+ end
125
+
126
+ #TODO: Set up search_patterns and whatever else needed to collect data for describe - currently missing some
127
+ # manifests/**/*.pp
128
+ # functions/**/*.pp
129
+ # tasks/*.json
130
+ # plans/*.pp
131
+ search_patterns = %w(
132
+ types/**/*.pp
133
+ lib/**/*.rb
134
+ )
135
+ PuppetStrings::generate(
136
+ search_patterns,
137
+ build_generate_options(options)
138
+ )
139
+ nil
140
+ end
141
+ end
142
+
84
143
  # Checks that the required features are installed.
85
144
  # @return [void]
86
145
  def check_required_features
@@ -98,18 +157,24 @@ Puppet::Face.define(:strings, '0.0.1') do
98
157
  generate_options[:debug] = Puppet[:debug]
99
158
  generate_options[:backtrace] = Puppet[:trace]
100
159
  generate_options[:yard_args] = yard_args unless yard_args.empty?
101
-
102
160
  if options
103
161
  if options[:emit_json]
104
- $stderr.puts "WARNING: '--emit-json PATH' is deprecated. Use '--format json --out PATH' instead."
162
+ warn "WARNING: '--emit-json PATH' is deprecated. Use '--format json --out PATH' instead."
105
163
  end
106
164
  if options[:emit_json_stdout]
107
- $stderr.puts "WARNING: '--emit-json-stdout' is deprecated. Use '--format json' instead."
165
+ warn "WARNING: '--emit-json-stdout' is deprecated. Use '--format json' instead."
108
166
  end
109
167
  markup = options[:markup]
110
168
  generate_options[:markup] = markup if markup
111
169
  generate_options[:path] = options[:out] if options[:out]
112
170
  generate_options[:stdout] = options[:stdout]
171
+
172
+ if options[:describe]
173
+ generate_options[:describe] = true
174
+ generate_options[:describe_types] = options[:describe_types]
175
+ generate_options[:describe_list] = options[:list]
176
+ end
177
+
113
178
  format = options[:format]
114
179
  if format
115
180
  if format.casecmp('markdown').zero?
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.1.0
4
+ version: 2.5.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: 2018-06-26 00:00:00.000000000 Z
11
+ date: 2020-07-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: yard
@@ -52,17 +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
58
+ - lib/puppet-strings/describe.rb
63
59
  - lib/puppet-strings/json.rb
64
60
  - lib/puppet-strings/markdown.rb
65
61
  - lib/puppet-strings/markdown/base.rb
62
+ - lib/puppet-strings/markdown/data_type.rb
63
+ - lib/puppet-strings/markdown/data_types.rb
66
64
  - lib/puppet-strings/markdown/defined_type.rb
67
65
  - lib/puppet-strings/markdown/defined_types.rb
68
66
  - lib/puppet-strings/markdown/function.rb
@@ -77,6 +75,8 @@ files:
77
75
  - lib/puppet-strings/markdown/resource_types.rb
78
76
  - lib/puppet-strings/markdown/table_of_contents.rb
79
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
80
80
  - lib/puppet-strings/markdown/templates/function.erb
81
81
  - lib/puppet-strings/markdown/templates/puppet_task.erb
82
82
  - lib/puppet-strings/markdown/templates/resource_type.erb
@@ -90,6 +90,8 @@ files:
90
90
  - lib/puppet-strings/yard/code_objects.rb
91
91
  - lib/puppet-strings/yard/code_objects/base.rb
92
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
93
95
  - lib/puppet-strings/yard/code_objects/defined_type.rb
94
96
  - lib/puppet-strings/yard/code_objects/function.rb
95
97
  - lib/puppet-strings/yard/code_objects/group.rb
@@ -103,13 +105,17 @@ files:
103
105
  - lib/puppet-strings/yard/handlers/json/task_handler.rb
104
106
  - lib/puppet-strings/yard/handlers/puppet/base.rb
105
107
  - lib/puppet-strings/yard/handlers/puppet/class_handler.rb
108
+ - lib/puppet-strings/yard/handlers/puppet/data_type_alias_handler.rb
106
109
  - lib/puppet-strings/yard/handlers/puppet/defined_type_handler.rb
107
110
  - lib/puppet-strings/yard/handlers/puppet/function_handler.rb
108
111
  - lib/puppet-strings/yard/handlers/puppet/plan_handler.rb
109
112
  - lib/puppet-strings/yard/handlers/ruby/base.rb
113
+ - lib/puppet-strings/yard/handlers/ruby/data_type_handler.rb
110
114
  - lib/puppet-strings/yard/handlers/ruby/function_handler.rb
111
115
  - lib/puppet-strings/yard/handlers/ruby/provider_handler.rb
112
116
  - lib/puppet-strings/yard/handlers/ruby/rsapi_handler.rb
117
+ - lib/puppet-strings/yard/handlers/ruby/type_base.rb
118
+ - lib/puppet-strings/yard/handlers/ruby/type_extras_handler.rb
113
119
  - lib/puppet-strings/yard/handlers/ruby/type_handler.rb
114
120
  - lib/puppet-strings/yard/parsers.rb
115
121
  - lib/puppet-strings/yard/parsers/json/parser.rb
@@ -117,12 +123,15 @@ files:
117
123
  - lib/puppet-strings/yard/parsers/puppet/parser.rb
118
124
  - lib/puppet-strings/yard/parsers/puppet/statement.rb
119
125
  - lib/puppet-strings/yard/tags.rb
126
+ - lib/puppet-strings/yard/tags/enum_tag.rb
127
+ - lib/puppet-strings/yard/tags/factory.rb
120
128
  - lib/puppet-strings/yard/tags/overload_tag.rb
121
129
  - lib/puppet-strings/yard/tags/parameter_directive.rb
122
130
  - lib/puppet-strings/yard/tags/property_directive.rb
123
131
  - lib/puppet-strings/yard/tags/summary_tag.rb
124
132
  - lib/puppet-strings/yard/templates/default/fulldoc/html/css/common.css
125
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
126
135
  - lib/puppet-strings/yard/templates/default/fulldoc/html/full_list_puppet_defined_type.erb
127
136
  - lib/puppet-strings/yard/templates/default/fulldoc/html/full_list_puppet_function.erb
128
137
  - lib/puppet-strings/yard/templates/default/fulldoc/html/full_list_puppet_plan.erb
@@ -141,6 +150,24 @@ files:
141
150
  - lib/puppet-strings/yard/templates/default/puppet_class/html/source.erb
142
151
  - lib/puppet-strings/yard/templates/default/puppet_class/html/summary.erb
143
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
144
171
  - lib/puppet-strings/yard/templates/default/puppet_defined_type/html/box_info.erb
145
172
  - lib/puppet-strings/yard/templates/default/puppet_defined_type/html/header.erb
146
173
  - lib/puppet-strings/yard/templates/default/puppet_defined_type/html/note.erb
@@ -188,6 +215,7 @@ files:
188
215
  - lib/puppet-strings/yard/templates/default/puppet_type/html/setup.rb
189
216
  - lib/puppet-strings/yard/templates/default/puppet_type/html/summary.erb
190
217
  - lib/puppet-strings/yard/templates/default/puppet_type/html/todo.erb
218
+ - lib/puppet-strings/yard/templates/default/tags/html/enum.erb
191
219
  - lib/puppet-strings/yard/templates/default/tags/html/puppet_overload.erb
192
220
  - lib/puppet-strings/yard/templates/default/tags/setup.rb
193
221
  - lib/puppet-strings/yard/util.rb
@@ -195,42 +223,6 @@ files:
195
223
  - lib/puppet/face/strings.rb
196
224
  - lib/puppet/feature/rgen.rb
197
225
  - lib/puppet/feature/yard.rb
198
- - misc/ANNOUNCEMENT_TEMPLATE.md
199
- - spec/acceptance/emit_json_options.rb
200
- - spec/acceptance/generate_markdown_spec.rb
201
- - spec/acceptance/lib/util.rb
202
- - spec/acceptance/running_strings_generate.rb
203
- - spec/fixtures/acceptance/modules/test/functions/add.pp
204
- - spec/fixtures/acceptance/modules/test/lib/puppet/functions/4x_function.rb
205
- - spec/fixtures/acceptance/modules/test/lib/puppet/parser/functions/function3x.rb
206
- - spec/fixtures/acceptance/modules/test/lib/puppet/provider/server/linux.rb
207
- - spec/fixtures/acceptance/modules/test/lib/puppet/type/database.rb
208
- - spec/fixtures/acceptance/modules/test/manifests/init.pp
209
- - spec/fixtures/acceptance/modules/test/manifests/triple_nested_classes.pp
210
- - spec/fixtures/acceptance/modules/test/metadata.json
211
- - spec/fixtures/unit/json/output.json
212
- - spec/fixtures/unit/json/output_with_plan.json
213
- - spec/fixtures/unit/json/output_without_puppet_function.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/json_spec.rb
219
- - spec/unit/puppet-strings/markdown/base_spec.rb
220
- - spec/unit/puppet-strings/markdown_spec.rb
221
- - spec/unit/puppet-strings/yard/code_objects/task_spec.rb
222
- - spec/unit/puppet-strings/yard/handlers/json/task_handler_spec.rb
223
- - spec/unit/puppet-strings/yard/handlers/puppet/class_handler_spec.rb
224
- - spec/unit/puppet-strings/yard/handlers/puppet/defined_type_handler_spec.rb
225
- - spec/unit/puppet-strings/yard/handlers/puppet/function_handler_spec.rb
226
- - spec/unit/puppet-strings/yard/handlers/ruby/function_handler_spec.rb
227
- - spec/unit/puppet-strings/yard/handlers/ruby/provider_handler_spec.rb
228
- - spec/unit/puppet-strings/yard/handlers/ruby/rsapi_handler_spec.rb
229
- - spec/unit/puppet-strings/yard/handlers/ruby/type_handler_spec.rb
230
- - spec/unit/puppet-strings/yard/parsers/json/parser_spec.rb
231
- - spec/unit/puppet-strings/yard/parsers/json/task_statement_spec.rb
232
- - spec/unit/puppet-strings/yard/parsers/puppet/parser_spec.rb
233
- - spec/unit/puppet-strings/yard/util_spec.rb
234
226
  homepage: https://github.com/puppetlabs/puppet-strings
235
227
  licenses:
236
228
  - Apache-2.0
@@ -251,8 +243,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
251
243
  version: '0'
252
244
  requirements:
253
245
  - puppet, >= 4.0.0
254
- rubyforge_project:
255
- rubygems_version: 2.7.6
246
+ rubygems_version: 3.0.4
256
247
  signing_key:
257
248
  specification_version: 4
258
249
  summary: Puppet documentation via YARD
data/Gemfile DELETED
@@ -1,37 +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
- end
23
-
24
- group :acceptance do
25
- gem 'beaker', '< 3.0'
26
- gem 'beaker-rspec'
27
- gem 'beaker-hostgenerator'
28
- gem 'beaker-abs'
29
- end
30
-
31
- group :development do
32
- 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')
33
- gem 'pry'
34
- gem 'pry-byebug'
35
- end
36
-
37
- gem 'rubocop', '<= 0.47.0'
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)**