yard 0.9.20 → 0.9.21

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of yard might be problematic. Click here for more details.

Files changed (69) hide show
  1. checksums.yaml +4 -4
  2. data/.dockerignore +2 -0
  3. data/.github/ISSUE_TEMPLATE.md +33 -0
  4. data/.github/PULL_REQUEST_TEMPLATE.md +12 -0
  5. data/.gitignore +14 -0
  6. data/.rspec +2 -0
  7. data/.rubocop.yml +99 -0
  8. data/.travis.yml +52 -0
  9. data/.yardopts_guide +19 -0
  10. data/.yardopts_i18n +23 -0
  11. data/CHANGELOG.md +16 -0
  12. data/CODE_OF_CONDUCT.md +15 -0
  13. data/CONTRIBUTING.md +140 -0
  14. data/Dockerfile.samus +28 -0
  15. data/Gemfile +32 -0
  16. data/README.md +2 -0
  17. data/SECURITY.md +26 -0
  18. data/lib/yard/code_objects/base.rb +8 -1
  19. data/lib/yard/code_objects/proxy.rb +4 -0
  20. data/lib/yard/handlers/ruby/attribute_handler.rb +1 -1
  21. data/lib/yard/handlers/ruby/dsl_handler_methods.rb +3 -3
  22. data/lib/yard/handlers/ruby/method_handler.rb +0 -10
  23. data/lib/yard/handlers/ruby/mixin_handler.rb +13 -1
  24. data/lib/yard/parser/c/statement.rb +2 -0
  25. data/lib/yard/parser/ruby/ast_node.rb +11 -0
  26. data/lib/yard/parser/ruby/legacy/irb/slex.rb +276 -0
  27. data/lib/yard/parser/ruby/legacy/ruby_lex.rb +3 -12
  28. data/lib/yard/parser/ruby/legacy/statement.rb +2 -0
  29. data/lib/yard/parser/ruby/ruby_parser.rb +1 -1
  30. data/lib/yard/registry_resolver.rb +47 -5
  31. data/lib/yard/registry_store.rb +6 -1
  32. data/lib/yard/templates/helpers/html_helper.rb +20 -3
  33. data/lib/yard/version.rb +1 -1
  34. data/po/ja.po +31108 -0
  35. data/samus.json +80 -0
  36. data/spec/code_objects/base_spec.rb +15 -0
  37. data/spec/code_objects/extra_file_object_spec.rb +4 -3
  38. data/spec/code_objects/proxy_spec.rb +6 -0
  39. data/spec/handlers/dsl_handler_spec.rb +7 -0
  40. data/spec/handlers/examples/dsl_handler_001.rb.txt +2 -0
  41. data/spec/handlers/examples/extend_handler_001.rb.txt +4 -1
  42. data/spec/handlers/examples/mixin_handler_001.rb.txt +3 -0
  43. data/spec/handlers/extend_handler_spec.rb +4 -0
  44. data/spec/handlers/method_handler_spec.rb +24 -0
  45. data/spec/handlers/mixin_handler_spec.rb +4 -0
  46. data/spec/registry_store_spec.rb +11 -0
  47. data/spec/templates/examples/module001.html +3 -3
  48. data/spec/templates/examples/module002.html +1 -1
  49. data/spec/templates/examples/module003.html +1 -1
  50. data/spec/templates/markup_processor_integrations/asciidoctor_spec.rb +60 -0
  51. data/spec/templates/markup_processor_integrations/integration_spec_helper.rb +46 -0
  52. data/spec/templates/markup_processor_integrations/rdoc_markdown_spec.rb +59 -0
  53. data/spec/templates/markup_processor_integrations/rdoc_spec.rb +39 -0
  54. data/spec/templates/markup_processor_integrations/redcarpet_spec.rb +59 -0
  55. data/spec/templates/markup_processor_integrations/redcloth_spec.rb +48 -0
  56. data/templates/default/docstring/setup.rb +1 -1
  57. data/templates/default/fulldoc/html/css/style.css +2 -2
  58. data/templates/default/fulldoc/html/frames.erb +1 -1
  59. data/templates/default/fulldoc/html/full_list.erb +1 -1
  60. data/templates/default/fulldoc/html/js/app.js +14 -3
  61. data/templates/default/fulldoc/html/js/jquery.js +2 -4
  62. data/templates/default/layout/html/headers.erb +1 -1
  63. data/templates/default/layout/html/script_setup.erb +1 -1
  64. data/templates/default/onefile/html/headers.erb +1 -1
  65. data/templates/default/tags/html/tag.erb +1 -1
  66. data/templates/guide/layout/html/layout.erb +1 -1
  67. data/yard.gemspec +1 -20
  68. metadata +27 -21
  69. data/spec/examples.txt +0 -1883
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 64d5d4b800e55f21d33923c128a6cfb273d0e2fc8f19f7fea0fbb529923550f1
4
- data.tar.gz: 02d01840ede373b87077eb66799a9f0eea11a4162c88bf076f3515af4b349301
3
+ metadata.gz: 3ce18eac2e64c2f48f33278cf01032c7e36b2ec78cf15eed67a90b126a675ca1
4
+ data.tar.gz: e4eb11a4995a2a14207acb50421b16b0d5b760c71141135bf519c402ae182c3c
5
5
  SHA512:
6
- metadata.gz: ac043e5dc5c78418cf5c617981d15a93de0003492e5fac4217b3e21655f4e9a893541476e8887c005a089a8fef91e126112a26a67dab84803bd83820894e3678
7
- data.tar.gz: 7b7c45bce94ad9e4ba1ba0a34714d975edd70048447b9ef7c107c866e2c8079590667efddebd9e08d6c2f347b1b9b812f586669e3b53c0eaf472e78ced4a1132
6
+ metadata.gz: f795f923bea85e6de27fa5ddedd7b097c63811e274f90192cca65e0d3c748e1ebf4273fd202857dfd28047445e8a1edd30d270064016cb2d668e7f5e9d5d1eee
7
+ data.tar.gz: 1aa66474fd6f00a5d94e85272b223867763378593d093cfed1da7eaaef15954845c1728548e4bc4f868ce4f8f4c7a598be9e8f44fb73954c1577e607414de7fd
@@ -0,0 +1,2 @@
1
+ doc
2
+ .yardoc
@@ -0,0 +1,33 @@
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/master/CONTRIBUTING.md
@@ -0,0 +1,12 @@
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/master/CONTRIBUTING.md
@@ -0,0 +1,14 @@
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 ADDED
@@ -0,0 +1,2 @@
1
+ --color
2
+ --require spec_helper
@@ -0,0 +1,99 @@
1
+ #inherit_from:
2
+ # - .rubocop_todo.yml
3
+
4
+ AllCops:
5
+ TargetRubyVersion: 2.4
6
+ Exclude:
7
+ - 'vendor/**/*' # need to reset this apparently
8
+ - 'lib/yard/parser/ruby/legacy/ruby_lex.rb' # old file, don't touch
9
+ Metrics:
10
+ Enabled: false
11
+ Style/Semicolon:
12
+ AllowAsExpressionSeparator: true
13
+ Style/Documentation:
14
+ Enabled: false
15
+ Style/ClassVars:
16
+ Enabled: false
17
+ Style/HashSyntax:
18
+ EnforcedStyle: hash_rockets
19
+ Style/SpaceInsideHashLiteralBraces:
20
+ EnforcedStyle: no_space
21
+ Style/SpaceInsideBlockBraces:
22
+ SpaceBeforeBlockParameters: false
23
+ Style/MultilineMethodCallIndentation:
24
+ EnforcedStyle: indented
25
+ Style/NumericPredicate: # ruby 1.8/1.9 do not have positive?/negative?
26
+ EnforcedStyle: comparison
27
+ Style/MultilineMethodCallIndentation:
28
+ EnforcedStyle: indented
29
+ Style/DotPosition:
30
+ EnforcedStyle: trailing
31
+ Style/FormatString:
32
+ EnforcedStyle: percent
33
+ Style/IndentArray:
34
+ EnforcedStyle: consistent
35
+ Style/IndentHash:
36
+ EnforcedStyle: consistent
37
+
38
+ # Disable these until we know what to do with them
39
+ Style/SafeNavigation:
40
+ Enabled: false # not supported in 1.8...2.1
41
+ Style/GuardClause: # does not provide much value
42
+ Enabled: false
43
+ Style/VariableNumber:
44
+ Enabled: false
45
+ Style/AccessorMethodName: # this creates breaking changes in the API
46
+ Enabled: false
47
+ Style/PredicateName: # this creates breaking changes in the API
48
+ Enabled: false
49
+ Style/MethodMissing: # this doesn't exist in 1.8/1.9
50
+ Enabled: false
51
+ Style/Lambda: # not supported in 1.8
52
+ Enabled: false
53
+ Style/EachWithObject: # not supported in 1.8
54
+ Enabled: false
55
+ Style/AlignParameters: # does not work correctly with subsequent block
56
+ Enabled: false
57
+ Style/AlignArray: # does not support indentation
58
+ Enabled: false
59
+ Style/AlignHash: # does not support indentation
60
+ Enabled: false
61
+ Style/MultilineTernaryOperator:
62
+ Enabled: false
63
+ Style/ClassAndModuleChildren:
64
+ Enabled: false
65
+ Style/EmptyLineBetweenDefs:
66
+ AllowAdjacentOneLineDefs: true
67
+ Style/SingleLineMethods:
68
+ Enabled: false
69
+ Style/SingleLineBlockParams:
70
+ Enabled: false
71
+ Style/NestedTernaryOperator:
72
+ Enabled: false
73
+ Style/MutableConstant:
74
+ Enabled: false
75
+ Style/WhenThen:
76
+ Enabled: false
77
+ Style/StringLiterals:
78
+ Enabled: false
79
+ Style/StringLiteralsInInterpolation:
80
+ Enabled: false
81
+ Style/PerlBackrefs:
82
+ Enabled: false
83
+ Style/BlockComments:
84
+ Exclude:
85
+ - benchmarks/*.rb
86
+ Style/CaseEquality:
87
+ Enabled: false
88
+ Style/WordArray:
89
+ Enabled: false
90
+ Style/GlobalVars:
91
+ Exclude:
92
+ - benchmarks/**/*.rb
93
+ - spec/**/*.rb
94
+ Lint/UnneededSplatExpansion:
95
+ Enabled: false
96
+ Lint/Eval:
97
+ Exclude:
98
+ - benchmarks/**/*.rb
99
+ - spec/**/*.rb
@@ -0,0 +1,52 @@
1
+ # Enables Travis to use their new container-based infrastructure
2
+ sudo: false
3
+
4
+ # Build for Ruby
5
+ language: ruby
6
+
7
+ # Enables caching for bundler
8
+ cache: bundler
9
+
10
+ # Specify which ruby versions you wish to run your tests on, each version will be used
11
+ rvm:
12
+ - "2.0"
13
+ - "2.1"
14
+ - "2.2"
15
+ - "2.3"
16
+ - "2.4"
17
+ - "2.5"
18
+ - "2.6"
19
+ - "2.7"
20
+ # - ruby-head
21
+ # - jruby
22
+
23
+ # Define how to run your tests (defaults to `bundle exec rake` or `rake` depending on whether you have a `Gemfile`)
24
+ script: "bundle exec rake"
25
+
26
+ # Define tasks to be completed before and after tests run . Will allow folding of content on frontend
27
+ #before_script:
28
+ # - command_1
29
+ # - command_2
30
+ #
31
+ #after_script:
32
+ # - command_1
33
+ # - command_2
34
+
35
+ # Specify an ENV variable to run before: 'bundle install' and 'rake' (or your defined 'script')
36
+ env:
37
+ - CI=1
38
+
39
+ # Specify the recipients for email notification
40
+ #notifications:
41
+ # recipients:
42
+ # - email-address-1
43
+ # - email-address-2
44
+
45
+ # Disable email notifications
46
+ #notifications:
47
+ # disabled: true
48
+
49
+ # notifications:
50
+ # webhooks:
51
+ # urls:
52
+ # - https://webhooks.gitter.im/e/c6dbb9323007dfcf81df
@@ -0,0 +1,19 @@
1
+ -t guide
2
+ --title YARD
3
+ -o doc_guide
4
+ --exclude /server/templates/
5
+ --exclude /yard/rubygems/
6
+ --asset docs/images:images
7
+ -
8
+ CHANGELOG.md
9
+ docs/WhatsNew.md
10
+ docs/GettingStarted.md
11
+ docs/Tags.md
12
+ docs/Overview.md
13
+ docs/CodeObjects.md
14
+ docs/Parser.md
15
+ docs/Handlers.md
16
+ docs/TagsArch.md
17
+ docs/Templates.md
18
+ LICENSE
19
+ LEGAL
@@ -0,0 +1,23 @@
1
+ --protected
2
+ --no-private
3
+ --exclude /server/templates/
4
+ --exclude /yard/rubygems/
5
+ --asset docs/images:images
6
+ --tag yard.signature:"YARD Tag Signature"
7
+ --type-name-tag yard.tag:"YARD Tag"
8
+ --type-name-tag yard.directive:"YARD Directive"
9
+ --hide-tag yard.tag
10
+ --hide-tag yard.directive
11
+ --hide-tag yard.signature
12
+ --load ./docs/templates/plugin.rb
13
+ -
14
+ CHANGELOG.md
15
+ docs/WhatsNew.md
16
+ docs/GettingStarted.md
17
+ docs/Tags.md
18
+ docs/Overview.md
19
+ docs/CodeObjects.md
20
+ docs/Parser.md
21
+ docs/Handlers.md
22
+ docs/TagsArch.md
23
+ docs/Templates.md
@@ -1,5 +1,21 @@
1
1
  # master
2
2
 
3
+ # 0.9.21 - December 31st, 2019
4
+
5
+ [0.9.21]: https://github.com/lsegal/yard/compare/v0.9.20...v0.9.21
6
+
7
+ - Updates to add support for Ruby 2.7.0 (#1290, #1296)
8
+ - Fix parsing of multiline method signatures (#1220)
9
+ - Remove RubyGems post install message (#1269)
10
+ - Improve object deletion from RegistryStore (#1284)
11
+ - Improve memory usage performance (#1260)
12
+ - Handle include and extend calls with explicit receivers (#1274)
13
+ - Fix deep nesting of TOC items (#1288)
14
+ - Fix highlighting for Asciidoc markup code blocks (#1276)
15
+ - Fix HTML formatting of script tags (#1263)
16
+ - Update jquery to 3.4.1 (#1294)
17
+ - Test fixes (#1244)
18
+
3
19
  # 0.9.20 - June 27th, 2019
4
20
 
5
21
  [0.9.20]: https://github.com/lsegal/yard/compare/v0.9.19...v0.9.20
@@ -0,0 +1,15 @@
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.
@@ -0,0 +1,140 @@
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/master/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