yard 0.9.28 → 0.9.37

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (90) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +71 -0
  3. data/LEGAL +29 -1
  4. data/README.md +8 -1
  5. data/docs/Tags.md +1 -1
  6. data/docs/WhatsNew.md +2 -2
  7. data/lib/yard/autoload.rb +3 -1
  8. data/lib/yard/cli/command.rb +1 -1
  9. data/lib/yard/cli/yardoc.rb +1 -1
  10. data/lib/yard/code_objects/base.rb +5 -1
  11. data/lib/yard/code_objects/macro_object.rb +0 -1
  12. data/lib/yard/docstring_parser.rb +1 -2
  13. data/lib/yard/handlers/processor.rb +0 -1
  14. data/lib/yard/handlers/ruby/attribute_handler.rb +1 -1
  15. data/lib/yard/handlers/ruby/legacy/attribute_handler.rb +1 -1
  16. data/lib/yard/handlers/ruby/mixin_handler.rb +13 -6
  17. data/lib/yard/handlers/ruby/visibility_handler.rb +13 -1
  18. data/lib/yard/i18n/locale.rb +1 -1
  19. data/lib/yard/i18n/message.rb +2 -2
  20. data/lib/yard/i18n/messages.rb +1 -1
  21. data/lib/yard/i18n/pot_generator.rb +1 -1
  22. data/lib/yard/logging.rb +116 -61
  23. data/lib/yard/open_struct.rb +67 -0
  24. data/lib/yard/options.rb +1 -1
  25. data/lib/yard/parser/ruby/legacy/ruby_lex.rb +19 -4
  26. data/lib/yard/parser/ruby/ruby_parser.rb +8 -2
  27. data/lib/yard/parser/source_parser.rb +4 -5
  28. data/lib/yard/registry_resolver.rb +2 -1
  29. data/lib/yard/server/commands/base.rb +1 -1
  30. data/lib/yard/server/commands/library_command.rb +8 -8
  31. data/lib/yard/server/commands/static_file_helpers.rb +1 -2
  32. data/lib/yard/server/http_utils.rb +512 -0
  33. data/lib/yard/server/rack_adapter.rb +13 -5
  34. data/lib/yard/tags/default_factory.rb +1 -0
  35. data/lib/yard/tags/directives.rb +0 -1
  36. data/lib/yard/tags/tag.rb +3 -2
  37. data/lib/yard/tags/types_explainer.rb +1 -1
  38. data/lib/yard/templates/engine.rb +0 -1
  39. data/lib/yard/templates/helpers/html_helper.rb +1 -1
  40. data/lib/yard/templates/template_options.rb +0 -1
  41. data/lib/yard/version.rb +1 -1
  42. data/po/ja.po +19 -19
  43. data/templates/default/fulldoc/html/css/full_list.css +3 -3
  44. data/templates/default/fulldoc/html/css/style.css +6 -0
  45. data/templates/default/fulldoc/html/frames.erb +9 -4
  46. data/templates/default/fulldoc/html/full_list.erb +5 -2
  47. data/templates/default/fulldoc/html/js/app.js +294 -264
  48. data/templates/default/fulldoc/html/js/full_list.js +30 -4
  49. data/templates/default/fulldoc/html/setup.rb +10 -2
  50. data/templates/default/onefile/html/headers.erb +2 -0
  51. data/templates/default/tags/html/example.erb +2 -2
  52. data/templates/default/tags/html/option.erb +1 -1
  53. metadata +6 -55
  54. data/.dockerignore +0 -2
  55. data/.gitattributes +0 -4
  56. data/.github/FUNDING.yml +0 -3
  57. data/.github/ISSUE_TEMPLATE.md +0 -33
  58. data/.github/PULL_REQUEST_TEMPLATE.md +0 -12
  59. data/.github/workflows/ci.yml +0 -30
  60. data/.github/workflows/gem.yml +0 -19
  61. data/.gitignore +0 -14
  62. data/.rspec +0 -2
  63. data/.rubocop.yml +0 -112
  64. data/CODE_OF_CONDUCT.md +0 -15
  65. data/CONTRIBUTING.md +0 -140
  66. data/Dockerfile.samus +0 -28
  67. data/Gemfile +0 -34
  68. data/Rakefile +0 -36
  69. data/SECURITY.md +0 -26
  70. data/benchmarks/builtins_vs_eval.rb +0 -24
  71. data/benchmarks/concat_vs_join.rb +0 -13
  72. data/benchmarks/erb_vs_erubis.rb +0 -54
  73. data/benchmarks/format_args.rb +0 -47
  74. data/benchmarks/generation.rb +0 -38
  75. data/benchmarks/marshal_vs_dbm.rb +0 -64
  76. data/benchmarks/parsing.rb +0 -46
  77. data/benchmarks/pathname_vs_string.rb +0 -51
  78. data/benchmarks/rdoc_vs_yardoc.rb +0 -11
  79. data/benchmarks/registry_store_types.rb +0 -49
  80. data/benchmarks/ri_vs_yri.rb +0 -19
  81. data/benchmarks/ripper_parser.rb +0 -13
  82. data/benchmarks/splat_vs_flatten.rb +0 -13
  83. data/benchmarks/template_erb.rb +0 -23
  84. data/benchmarks/template_format.rb +0 -7
  85. data/benchmarks/template_profile.rb +0 -18
  86. data/benchmarks/yri_cache.rb +0 -20
  87. data/samus.json +0 -49
  88. data/tasks/prepare_tag.rake +0 -45
  89. data/tasks/update_error_map.rake +0 -53
  90. data/yard.gemspec +0 -25
@@ -62,8 +62,25 @@ function enableToggles() {
62
62
  evt.stopPropagation();
63
63
  evt.preventDefault();
64
64
  $(this).parent().parent().toggleClass('collapsed');
65
+ $(this).attr('aria-expanded', function (i, attr) {
66
+ return attr == 'true' ? 'false' : 'true'
67
+ });
65
68
  highlight();
66
69
  });
70
+
71
+ // navigation of nested classes using keyboard
72
+ $('#full_list a.toggle').on('keypress',function(evt) {
73
+ // enter key is pressed
74
+ if (evt.which == 13) {
75
+ evt.stopPropagation();
76
+ evt.preventDefault();
77
+ $(this).parent().parent().toggleClass('collapsed');
78
+ $(this).attr('aria-expanded', function (i, attr) {
79
+ return attr == 'true' ? 'false' : 'true'
80
+ });
81
+ highlight();
82
+ }
83
+ });
67
84
  }
68
85
 
69
86
  function populateSearchCache() {
@@ -91,7 +108,7 @@ function enableSearch() {
91
108
  }
92
109
  });
93
110
 
94
- $('#full_list').after("<div id='noresults' style='display:none'></div>");
111
+ $('#full_list').after("<div id='noresults' role='status' style='display: none'></div>");
95
112
  }
96
113
 
97
114
  function ignoredKeyPress(event) {
@@ -154,11 +171,14 @@ function partialSearch(searchString, offset) {
154
171
  function searchDone() {
155
172
  searchTimeout = null;
156
173
  highlight();
157
- if ($('#full_list li:visible').size() === 0) {
158
- $('#noresults').text('No results were found.').hide().fadeIn();
174
+ var found = $('#full_list li:visible').size();
175
+ if (found === 0) {
176
+ $('#noresults').text('No results were found.');
159
177
  } else {
160
- $('#noresults').text('').hide();
178
+ // This is read out to screen readers
179
+ $('#noresults').text('There are ' + found + ' results.');
161
180
  }
181
+ $('#noresults').show();
162
182
  $('#content').removeClass('insearch');
163
183
  }
164
184
 
@@ -188,6 +208,12 @@ function expandTo(path) {
188
208
  $target.addClass('clicked');
189
209
  $target.removeClass('collapsed');
190
210
  $target.parentsUntil('#full_list', 'li').removeClass('collapsed');
211
+
212
+ $target.find('a.toggle').attr('aria-expanded', 'true')
213
+ $target.parentsUntil('#full_list', 'li').each(function(i, el) {
214
+ $(el).find('> div > a.toggle').attr('aria-expanded', 'true');
215
+ });
216
+
191
217
  if($target[0]) {
192
218
  window.scrollTo(window.scrollX, $target.offset().top - 250);
193
219
  highlight();
@@ -104,6 +104,12 @@ def javascripts_full_list
104
104
  %w(js/jquery.js js/full_list.js)
105
105
  end
106
106
 
107
+ # Sets the HTML language lang="value" where value is the value returned from
108
+ # this method. Defaults to nil which does not set the lang attribute.
109
+ def html_lang
110
+ nil
111
+ end
112
+
107
113
  def menu_lists
108
114
  Object.new.extend(T('layout')).menu_lists
109
115
  end
@@ -225,7 +231,8 @@ def class_list(root = Registry.root, tree = TreeContext.new)
225
231
  has_children = run_verifier(child.children).any? {|o| o.is_a?(CodeObjects::NamespaceObject) }
226
232
  out << "<li id='object_#{child.path}' class='#{tree.classes.join(' ')}'>"
227
233
  out << "<div class='item' style='padding-left:#{tree.indent}'>"
228
- out << "<a class='toggle'></a> " if has_children
234
+ accessible_props = "aria-label='#{name} child nodes' aria-expanded='false' aria-controls='object_#{child.path}'"
235
+ out << "<a tabindex='0' class='toggle' role='button' #{accessible_props}></a> " if has_children
229
236
  out << linkify(child, name)
230
237
  out << " &lt; #{child.superclass.name}" if child.is_a?(CodeObjects::ClassObject) && child.superclass
231
238
  out << "<small class='search_info'>"
@@ -233,7 +240,8 @@ def class_list(root = Registry.root, tree = TreeContext.new)
233
240
  out << "</small>"
234
241
  out << "</div>"
235
242
  tree.nest do
236
- out << "<ul>#{class_list(child, tree)}</ul>" if has_children
243
+ labeled_by = "aria-labelledby='object_#{child.path}'"
244
+ out << "<div #{labeled_by}><ul>#{class_list(child, tree)}</ul></div>" if has_children
237
245
  end
238
246
  out << "</li>"
239
247
  end
@@ -1,5 +1,7 @@
1
1
  <style type="text/css">
2
2
  <%= @css_data %>
3
+ html { width: auto; height: auto; }
4
+ body { display: block; margin: 1rem; width: auto; }
3
5
  </style>
4
6
  <script type="text/javascript">
5
7
  <%= @js_data %>
@@ -1,9 +1,9 @@
1
1
  <% if object.has_tag?(:example) %>
2
2
  <div class="examples">
3
- <p class="tag_title">Examples:</p>
3
+ <h4 class="tag_title">Examples:</h4>
4
4
  <% object.tags(:example).each do |tag| %>
5
5
  <% unless tag.name.empty? %>
6
- <p class="example_title"><%= htmlify_line(tag.name) %></p>
6
+ <h5 class="example_title"><%= htmlify_line(tag.name) %></h5>
7
7
  <% end %>
8
8
  <pre class="example code"><code><%= html_syntax_highlight(tag.text) %></code></pre>
9
9
  <% end %>
@@ -1,4 +1,4 @@
1
- <% if object.has_tag?(:option) %>
1
+ <% if object.has_tag?(:option) && object.respond_to?(:parameters) %>
2
2
  <% object.parameters.each do |param, default| %>
3
3
  <% tags = object.tags(:option).select {|x| x.name.to_s == param.to_s.sub(/^\*+|:$/, '') } %>
4
4
  <% next if tags.empty? %>
metadata CHANGED
@@ -1,29 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yard
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.28
4
+ version: 0.9.37
5
5
  platform: ruby
6
6
  authors:
7
7
  - Loren Segal
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-06-01 00:00:00.000000000 Z
12
- dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: webrick
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - "~>"
18
- - !ruby/object:Gem::Version
19
- version: 1.7.0
20
- type: :runtime
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - "~>"
25
- - !ruby/object:Gem::Version
26
- version: 1.7.0
11
+ date: 2024-09-04 00:00:00.000000000 Z
12
+ dependencies: []
27
13
  description: |2
28
14
  YARD is a documentation generation tool for the Ruby programming language.
29
15
  It enables the user to generate consistent, usable documentation that can be
@@ -37,46 +23,13 @@ executables:
37
23
  extensions: []
38
24
  extra_rdoc_files: []
39
25
  files:
40
- - ".dockerignore"
41
- - ".gitattributes"
42
- - ".github/FUNDING.yml"
43
- - ".github/ISSUE_TEMPLATE.md"
44
- - ".github/PULL_REQUEST_TEMPLATE.md"
45
- - ".github/workflows/ci.yml"
46
- - ".github/workflows/gem.yml"
47
- - ".gitignore"
48
- - ".rspec"
49
- - ".rubocop.yml"
50
26
  - ".yardopts"
51
27
  - ".yardopts_guide"
52
28
  - ".yardopts_i18n"
53
29
  - CHANGELOG.md
54
- - CODE_OF_CONDUCT.md
55
- - CONTRIBUTING.md
56
- - Dockerfile.samus
57
- - Gemfile
58
30
  - LEGAL
59
31
  - LICENSE
60
32
  - README.md
61
- - Rakefile
62
- - SECURITY.md
63
- - benchmarks/builtins_vs_eval.rb
64
- - benchmarks/concat_vs_join.rb
65
- - benchmarks/erb_vs_erubis.rb
66
- - benchmarks/format_args.rb
67
- - benchmarks/generation.rb
68
- - benchmarks/marshal_vs_dbm.rb
69
- - benchmarks/parsing.rb
70
- - benchmarks/pathname_vs_string.rb
71
- - benchmarks/rdoc_vs_yardoc.rb
72
- - benchmarks/registry_store_types.rb
73
- - benchmarks/ri_vs_yri.rb
74
- - benchmarks/ripper_parser.rb
75
- - benchmarks/splat_vs_flatten.rb
76
- - benchmarks/template_erb.rb
77
- - benchmarks/template_format.rb
78
- - benchmarks/template_profile.rb
79
- - benchmarks/yri_cache.rb
80
33
  - bin/yard
81
34
  - bin/yardoc
82
35
  - bin/yri
@@ -212,6 +165,7 @@ files:
212
165
  - lib/yard/i18n/pot_generator.rb
213
166
  - lib/yard/i18n/text.rb
214
167
  - lib/yard/logging.rb
168
+ - lib/yard/open_struct.rb
215
169
  - lib/yard/options.rb
216
170
  - lib/yard/parser/base.rb
217
171
  - lib/yard/parser/c/c_parser.rb
@@ -259,6 +213,7 @@ files:
259
213
  - lib/yard/server/commands/static_file_helpers.rb
260
214
  - lib/yard/server/doc_server_helper.rb
261
215
  - lib/yard/server/doc_server_serializer.rb
216
+ - lib/yard/server/http_utils.rb
262
217
  - lib/yard/server/library_version.rb
263
218
  - lib/yard/server/rack_adapter.rb
264
219
  - lib/yard/server/router.rb
@@ -311,9 +266,6 @@ files:
311
266
  - lib/yard/verifier.rb
312
267
  - lib/yard/version.rb
313
268
  - po/ja.po
314
- - samus.json
315
- - tasks/prepare_tag.rake
316
- - tasks/update_error_map.rake
317
269
  - templates/default/class/dot/setup.rb
318
270
  - templates/default/class/dot/superklass.erb
319
271
  - templates/default/class/html/constructor_details.erb
@@ -441,7 +393,6 @@ files:
441
393
  - templates/guide/onefile/html/setup.rb
442
394
  - templates/guide/onefile/html/toc.erb
443
395
  - templates/guide/tags/html/setup.rb
444
- - yard.gemspec
445
396
  homepage: http://yardoc.org
446
397
  licenses:
447
398
  - MIT
@@ -462,7 +413,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
462
413
  - !ruby/object:Gem::Version
463
414
  version: '0'
464
415
  requirements: []
465
- rubygems_version: 3.1.2
416
+ rubygems_version: 3.3.5
466
417
  signing_key:
467
418
  specification_version: 4
468
419
  summary: Documentation tool for consistent and usable documentation in Ruby.
data/.dockerignore DELETED
@@ -1,2 +0,0 @@
1
- doc
2
- .yardoc
data/.gitattributes DELETED
@@ -1,4 +0,0 @@
1
- # Auto detect text files and perform LF normalization
2
- * text eol=lf
3
-
4
- *.png binary
data/.github/FUNDING.yml DELETED
@@ -1,3 +0,0 @@
1
- # These are supported funding model platforms
2
-
3
- github: lsegal
@@ -1,33 +0,0 @@
1
- [Describe your issue here. Try to be as specific as possible so we can find
2
- the root cause more quickly!]
3
-
4
- ## Steps to reproduce
5
-
6
- This is the minimal reproduction for the issue. I've done my best to remove
7
- all extraneous code and unique environment state on my machine before providing
8
- these steps:
9
-
10
- 1. Run the following command: `yard doc --no-private`
11
- 2. Open browser to (URL)...
12
- 3. Click on Method List link.
13
-
14
- ## Actual Output
15
-
16
- [Provide the full output (**please run yard with `--debug`**) or screenshots for
17
- visual issues.]
18
-
19
- ## Expected Output
20
-
21
- [Describe what you *expected* to happen.]
22
-
23
- ## Environment details:
24
-
25
- - OS: [Enter operating system / version here]
26
- - Ruby version (`ruby -v`): [Enter output of `ruby -v`]
27
- - YARD version (`yard -v`): [Enter output of `yard -v`]
28
- - Relevant software dependency/versions:
29
- - [Any 3rd party libs required to reproduce, omit if none]
30
-
31
- I have read the [Contributing Guide][contrib].
32
-
33
- [contrib]: https://github.com/lsegal/yard/blob/main/CONTRIBUTING.md
@@ -1,12 +0,0 @@
1
- # Description
2
-
3
- Describe your pull request and problem statement here.
4
-
5
- # Completed Tasks
6
-
7
- - [ ] I have read the [Contributing Guide][contrib].
8
- - [ ] The pull request is complete (implemented / written).
9
- - [ ] Git commits have been cleaned up (squash WIP / revert commits).
10
- - [ ] I wrote tests and ran `bundle exec rake` locally (if code is attached to PR).
11
-
12
- [contrib]: https://github.com/lsegal/yard/blob/main/CONTRIBUTING.md
@@ -1,30 +0,0 @@
1
- name: Unit Tests
2
-
3
- on: [push, pull_request, workflow_dispatch]
4
- jobs:
5
- build:
6
- name: "Ruby: ${{ matrix.ruby }} OS: ${{ matrix.os }}"
7
- runs-on: ${{ matrix.os }}
8
- strategy:
9
- fail-fast: false
10
- matrix:
11
- os: [ubuntu-20.04, macos-10.15, windows-2019]
12
- # 3.0 is interpreted as 3. also disable 2.5 due to bundler crashes
13
- ruby: [2.2, 2.3, 2.4, 2.6, 2.7, "3.0", 3.1]
14
- exclude:
15
- - { os: windows-2019, ruby: 2.2 }
16
- - { os: windows-2019, ruby: 2.3 }
17
- steps:
18
- - name: Checkout
19
- uses: actions/checkout@v2
20
- - name: Install Ruby & 'bundle install'
21
- uses: ruby/setup-ruby@v1
22
- with:
23
- ruby-version: ${{ matrix.ruby }}
24
- bundler-cache: true
25
- - name: Run Test
26
- run: |
27
- ruby -v
28
- bundle exec rake
29
- env:
30
- CI: true
@@ -1,19 +0,0 @@
1
- name: Release Version
2
-
3
- on:
4
- push:
5
- tags:
6
- - "v*"
7
-
8
- jobs:
9
- release_version:
10
- runs-on: ubuntu-latest
11
- steps:
12
- - uses: actions/checkout@v2
13
- - uses: lsegal/github-release-from-changelog-action@latest
14
- env:
15
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
16
- - name: Publish RubyGem
17
- uses: dawidd6/action-publish-gem@v1
18
- with:
19
- api_key: ${{secrets.RUBYGEMS_API_KEY}}
data/.gitignore DELETED
@@ -1,14 +0,0 @@
1
- _Yardoc
2
- .DS_Store
3
- *.rbc
4
- *.pdf
5
- .yardoc
6
- *.gem
7
- Gemfile.lock
8
- /pkg
9
- /doc
10
- /doc_guide
11
- /coverage
12
- /.bundle
13
- /vendor
14
- spec/examples.txt
data/.rspec DELETED
@@ -1,2 +0,0 @@
1
- --color
2
- --require spec_helper
data/.rubocop.yml DELETED
@@ -1,112 +0,0 @@
1
- #inherit_from:
2
- # - .rubocop_todo.yml
3
-
4
- Metrics:
5
- Enabled: false
6
- Layout/LineLength:
7
- AutoCorrect: true
8
- Max: 100
9
- Style/Semicolon:
10
- AllowAsExpressionSeparator: true
11
- Style/Documentation:
12
- Enabled: false
13
- Style/ClassVars:
14
- Enabled: false
15
- Style/HashSyntax:
16
- EnforcedStyle: hash_rockets
17
- Layout/SpaceInsideHashLiteralBraces:
18
- EnforcedStyle: no_space
19
- Layout/SpaceInsideBlockBraces:
20
- SpaceBeforeBlockParameters: false
21
- Style/NumericPredicate: # ruby 1.8/1.9 do not have positive?/negative?
22
- EnforcedStyle: comparison
23
- Layout/MultilineMethodCallIndentation:
24
- EnforcedStyle: indented
25
- Layout/DotPosition:
26
- EnforcedStyle: trailing
27
- Style/FormatString:
28
- EnforcedStyle: percent
29
- Layout/FirstArrayElementIndentation:
30
- EnforcedStyle: consistent
31
- Layout/FirstHashElementIndentation:
32
- EnforcedStyle: consistent
33
-
34
- # Disable these until we know what to do with them
35
- Style/SafeNavigation:
36
- Enabled: false # not supported in 1.8...2.1
37
- Style/GuardClause: # does not provide much value
38
- Enabled: false
39
- Naming/VariableNumber:
40
- Enabled: false
41
- Naming/AccessorMethodName: # this creates breaking changes in the API
42
- Enabled: false
43
- Naming/PredicateName: # this creates breaking changes in the API
44
- Enabled: false
45
- Style/MethodMissingSuper: # this doesn't exist in 1.8/1.9
46
- Enabled: false
47
- Style/MissingRespondToMissing: # this doesn't exist in 1.8/1.9
48
- Enabled: false
49
- Style/Lambda: # not supported in 1.8
50
- Enabled: false
51
- Style/EachWithObject: # not supported in 1.8
52
- Enabled: false
53
- Layout/ParameterAlignment: # does not work correctly with subsequent block
54
- Enabled: false
55
- Layout/ArrayAlignment: # does not support indentation
56
- Enabled: false
57
- Layout/HashAlignment: # does not support indentation
58
- Enabled: false
59
- Style/MultilineTernaryOperator:
60
- Enabled: false
61
- Style/ClassAndModuleChildren:
62
- Enabled: false
63
- Layout/EmptyLineBetweenDefs:
64
- AllowAdjacentOneLineDefs: true
65
- Style/SingleLineMethods:
66
- Enabled: false
67
- Style/SingleLineBlockParams:
68
- Enabled: false
69
- Style/NestedTernaryOperator:
70
- Enabled: false
71
- Style/MutableConstant:
72
- Enabled: false
73
- Style/WhenThen:
74
- Enabled: false
75
- Style/StringLiterals:
76
- Enabled: false
77
- Style/StringLiteralsInInterpolation:
78
- Enabled: false
79
- Style/PerlBackrefs:
80
- Enabled: false
81
- Style/BlockComments:
82
- Exclude:
83
- - benchmarks/*.rb
84
- Style/CaseEquality:
85
- Enabled: false
86
- Style/WordArray:
87
- Enabled: false
88
- Style/GlobalVars:
89
- Exclude:
90
- - benchmarks/**/*.rb
91
- - spec/**/*.rb
92
- Lint/RedundantSplatExpansion:
93
- Enabled: false
94
- Security/Eval:
95
- Exclude:
96
- - benchmarks/**/*.rb
97
- - spec/**/*.rb
98
-
99
- Layout/SpaceAroundMethodCallOperator:
100
- Enabled: false
101
- Lint/RaiseException:
102
- Enabled: false
103
- Lint/StructNewOverride:
104
- Enabled: false
105
- Style/ExponentialNotation:
106
- Enabled: false
107
- Style/HashEachMethods:
108
- Enabled: false
109
- Style/HashTransformKeys:
110
- Enabled: false
111
- Style/HashTransformValues:
112
- Enabled: false
data/CODE_OF_CONDUCT.md DELETED
@@ -1,15 +0,0 @@
1
- This document provides community guidelines for a safe, respectful, productive,
2
- and collaborative place for any person who is willing to contribute to the YARD
3
- project. It applies to all “collaborative space”, which is defined as community
4
- communications channels (such as mailing lists, submitted patches, commit
5
- comments, etc.).
6
-
7
- * Participants will be tolerant of opposing views.
8
-
9
- * Participants must ensure that their language and actions are free of personal
10
- attacks and disparaging personal remarks.
11
-
12
- * When interpreting the words and actions of others, participants should always
13
- assume good intentions.
14
-
15
- * Behaviour which can be reasonably considered harassment will not be tolerated.
data/CONTRIBUTING.md DELETED
@@ -1,140 +0,0 @@
1
- # Contributing Guide
2
-
3
- ## Help YARD Help You!
4
-
5
- **YARD thrives off of the contributions of its users**. This project will gladly
6
- review pull requests and issues. This document outlines how to maximize
7
- the chance of a reported issue being resolved or pull request being accepted.
8
-
9
- ## Code of Conduct
10
-
11
- **All reported issues, pull requests, communication, and code related to YARD**
12
- **must follow the [Code of Conduct][code] or they will be moderated immediately**.
13
- Please take time to familiarize yourself with the Code of Conduct before
14
- you get started. Fundamentally, **you are expected to behave with respect** to all
15
- other users.
16
-
17
- ## Filing a Bug Report
18
-
19
- **You can submit bug reports on our [GitHub issue tracker][issues]**.
20
-
21
- If you believe you have found a bug, please include a few things in your report:
22
-
23
- 1. **A minimal reproduction of the issue**. Providing a huge blob of code is
24
- better than nothing, but providing the shortest possible set of instructions
25
- is even better. Take out any instructions or code that, when removed, have
26
- no effect on the problematic behavior. The easier your bug is to triage and
27
- diagnose, the higher up in the priority list it will go. We can do this stuff,
28
- but limited time means this may not happen immediately. Make your bug report
29
- extremely accessible and you will almost guarantee a quick fix.
30
-
31
- 2. **Your environment and relevant versions**. Please include your Ruby,
32
- YARD, and system versions (including OS) when reporting a bug. This
33
- makes it easier to diagnose problems. If the issue or stack trace
34
- includes another library, consider also listing any dependencies
35
- that may be affecting the issue. This is where a minimal reproduction
36
- case helps a lot.
37
-
38
- 3. **Your expected result**. Tell us what you think should happen. This
39
- helps us to understand the context of your problem. Many complex features
40
- can contain ambiguous usage, and your use case may differ from the
41
- intended one. If we know your expectations, we can more easily determine
42
- if the behavior is intentional or not.
43
-
44
- Finally, please **DO NOT** submit a report that states a feature simply
45
- _"does not work"_ without any additional information in the report. Consider
46
- the issue from the maintainer's perspective: in order to fix your bug, we
47
- need to drill down to the broken line of code, and in order to do this,
48
- we must be able to reproduce the issue on our end to find that line of
49
- code. The easier we can do this, the quicker your bug gets fixed. Help
50
- us help you by providing as much information as you possibly can. We may
51
- not have the tools or environment to properly diagnose your issue, so
52
- your help may be required to debug the issue.
53
-
54
- Also **consider opening a pull request** to fix the issue yourself if you can.
55
- This will likely speed up the fix time significantly. See below for
56
- information on how to do this.
57
-
58
- ## Asking a Question
59
-
60
- **Questions are accepted on [GitHub issues][issues], but consider signing up**
61
- **for the [YARD mailing list][ml]** and asking it there so that we can organize
62
- issues appropriately. You can also hop onto IRC (irc.freenode.net / #yard)
63
- for quick questions.
64
-
65
- ## Asking for a Feature
66
-
67
- **YARD does not currently accept feature requests filed as GitHub issues**. If
68
- you are looking to have a feature implemented into YARD, consider doing this
69
- yourself and [submitting a pull request][pr] (PR) with your work. If the work
70
- required is involved, consider starting a discussion on the [mailing list][ml]
71
- or opening an issue to ask a question; we will be happy to have a conversation
72
- and let you know if the feature would be considered. They usually are, but
73
- it might be prudent to ask first!
74
-
75
- Please do not fret if your feature request gets closed immediately. We do this
76
- to keep our issue tracker clean. **Closing an issue does not mean it would not**
77
- **be accepted as a pull request**. If the feature would not be accepted as a
78
- PR, this will be communicated in the closed issue.
79
-
80
- ## Making a Change via Pull Request
81
-
82
- **You can also submit pull requests on our [GitHub issue tracker][issues]**.
83
-
84
- If you've been working on a patch or feature that you want in YARD, here are
85
- some tips to ensure the quickest turnaround time on getting it merged in:
86
-
87
- 1. **Keep your changes small**. If your feature is large, consider splitting
88
- it up into smaller portions and submit pull requests for each component
89
- individually. Feel free to describe this in your first PR or on the
90
- mailing list, but note that it will be much easier to review changes
91
- if they affect smaller portions of code at a time.
92
-
93
- 2. **Keep commits brief and clean**: YARD uses Git and tries to maintain a
94
- clean repository. Please ensure that you use [commit conventions][commit]
95
- to make things nice and neat both in the description and commit history.
96
- Specifically, consider squashing commits if you have partial or complete
97
- reverts of code. Each commit should provide an atomic change that moves
98
- the project forwards, not back. Any changes that only fix other parts of
99
- your PR should be hidden from the commit history.
100
-
101
- 3. **Follow our coding conventions**. YARD uses typical Ruby source formatting,
102
- though it occasionally has minor differences with other projects you may
103
- have seen. Please look through a few files (at least the file you are
104
- editing) to ensure that you are consistent in the formatting your PR is
105
- using.
106
-
107
- 4. **Make sure you have tests**. Not all changes require tests, but if your
108
- changes involve code, you should consider adding at least one new test
109
- case for your change (and ideally a couple of tests). This will add
110
- confidence when reviewing and will make accepting the change much easier.
111
-
112
- 5. **Make sure ALL the tests pass**. YARD has a fairly large suite of tests.
113
- Please make sure you can run all of the tests (`bundle exec rake`) prior
114
- to submitting your PR. Please also remember that YARD supports a number
115
- of environments, including OS X, Linux, Windows, and a number of older
116
- Ruby versions (1.8+), so if you can test under these environments, that
117
- helps (but is not required). At the very least, be aware of this fact
118
- when submitting code.
119
-
120
- If your change is large, consider starting a discussion on the [mailing list][ml]
121
- or opening an issue to ask a question; we will be happy to have a conversation
122
- and let you know if the feature would be considered. They usually are, but
123
- it might be prudent to ask first!
124
-
125
- ## Maintainers
126
-
127
- **Interested in helping to maintain YARD? Email [lsegal@soen.ca][mail]** for more
128
- information. Offering to be a project maintainer is an important contribution
129
- to open source software, and your work will be highly valued in the community.
130
- If you have been a contributor, consider being a member of the core team to
131
- help handle day-to-day operations, such as releases, bug fixes, and triage.
132
- You can do some of this as a non-maintainer too, but if you like this project,
133
- we can always use more hands on deck!
134
-
135
- [code]: https://github.com/lsegal/yard/blob/main/CODE_OF_CONDUCT.md
136
- [issues]: http://github.com/lsegal/yard/issues
137
- [commit]: http://chris.beams.io/posts/git-commit/
138
- [pr]: https://help.github.com/articles/using-pull-requests/
139
- [ml]: https://groups.google.com/forum/#!forum/yardoc
140
- [mail]: mailto:lsegal@soen.ca
data/Dockerfile.samus DELETED
@@ -1,28 +0,0 @@
1
- FROM lsegal/samus:latest as samus
2
-
3
- FROM ruby:2
4
- ARG VERSION
5
- ENV VERSION=${VERSION}
6
- WORKDIR /github/lsegal/yard
7
- ENTRYPOINT samus publish release-v${VERSION}.tar.gz
8
-
9
- # Prepare credential config
10
- RUN mkdir -p ~/.ssh
11
- RUN echo "Host *" > ~/.ssh/config
12
- RUN echo " StrictHostKeyChecking no" >> ~/.ssh/config
13
- RUN chmod 400 ~/.ssh/config
14
- COPY ./.samusprep/.samus /root/.samus
15
- COPY ./.samusprep/.gitconfig /root/.gitconfig
16
-
17
- # Setup Samus
18
- ENV PATH=$PATH:/samus/bin
19
- COPY --from=samus /samus /samus
20
-
21
- # Install gems
22
- ENV BUNDLE_PATH=/var/gems
23
- COPY Gemfile /github/lsegal/yard
24
- RUN bundle
25
-
26
- # Run build
27
- COPY . /github/lsegal/yard
28
- RUN samus build --skip-restore ${VERSION}