Skip to content

Commit 09275b9

Browse files
authored
Merge branch 'master' into module_lookup_bugfix
2 parents 47a40af + 75d1511 commit 09275b9

File tree

96 files changed

+5326
-1338
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

96 files changed

+5326
-1338
lines changed

.document

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
History.txt
2-
LICENSE.txt
3-
README.txt
4-
RI.txt
5-
RI.md
1+
*.md
2+
*.rdoc
63
lib
74
doc

.generated_files_rubocop.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# This rubocop configuration is ONLY for the generated files (listed in Rakefile). It is not meant to be used for RDoc's
2+
# source code.
3+
# The purpose of this file is to ensure the generated files don't have trailing whitespace or empty lines, which could
4+
# be a problem for ruby/ruby's CI
5+
AllCops:
6+
TargetRubyVersion: 3.3
7+
DisabledByDefault: true
8+
9+
Layout/TrailingWhitespace:
10+
Enabled: true
11+
Layout/TrailingEmptyLines:
12+
Enabled: true

.github/release.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# release.yml
2+
3+
changelog:
4+
categories:
5+
- title: ✨ Enhancements
6+
labels:
7+
- enhancement
8+
- title: 🐛 Bug Fixes
9+
labels:
10+
- bug
11+
- title: 📚 Documentation
12+
labels:
13+
- documentation
14+
- title: 🛠 Other Changes
15+
labels:
16+
- "*"

.github/workflows/gh-pages.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
- name: Checkout
2323
uses: actions/checkout@v4
2424
- name: Setup Ruby
25-
uses: ruby/setup-ruby@1d0e911f615a112e322369596f10ee0b95b010ae # v1.183.0
25+
uses: ruby/setup-ruby@1287d2b408066abada82d5ad1c63652e758428d9 # v1.214.0
2626
with:
2727
ruby-version: '3.2'
2828
bundler-cache: true

.github/workflows/lint.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Lint
2+
3+
on: [push, pull_request]
4+
5+
permissions: # added using https://github.com/step-security/secure-workflows
6+
contents: read
7+
8+
jobs:
9+
lint:
10+
strategy:
11+
fail-fast: false
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4 # v3.3.0
15+
# libyaml-dev is needed for psych, see https://github.com/ruby/setup-ruby/issues/409
16+
- if: ${{ matrix.os == 'ubuntu-latest' }}
17+
run: sudo apt install libyaml-dev
18+
- name: Set up Ruby
19+
uses: ruby/setup-ruby@master
20+
with:
21+
ruby-version: 3.3
22+
bundler-cache: true
23+
- name: Run rubocop
24+
run: bundle exec rubocop
25+
- name: Sanity check for the format_generated_files task
26+
run: bundle exec rake generate format_generated_files
27+

.github/workflows/push_gem.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Publish gem to rubygems.org
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
permissions:
9+
contents: read
10+
11+
jobs:
12+
push:
13+
if: github.repository == 'ruby/rdoc'
14+
runs-on: ubuntu-latest
15+
16+
environment:
17+
name: rubygems.org
18+
url: https://rubygems.org/gems/rdoc
19+
20+
permissions:
21+
contents: write
22+
id-token: write
23+
24+
steps:
25+
- name: Harden Runner
26+
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4
27+
with:
28+
egress-policy: audit
29+
30+
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
31+
32+
- name: Set up Ruby
33+
uses: ruby/setup-ruby@1287d2b408066abada82d5ad1c63652e758428d9 # v1.214.0
34+
with:
35+
bundler-cache: true
36+
ruby-version: ruby
37+
38+
- name: Publish to RubyGems
39+
uses: rubygems/release-gem@a25424ba2ba8b387abc8ef40807c2c85b96cbe32 # v1.1.1
40+
41+
- name: Create GitHub release
42+
run: |
43+
tag_name="$(git describe --tags --abbrev=0)"
44+
gh release create "${tag_name}" --verify-tag --generate-notes
45+
env:
46+
GITHUB_TOKEN: ${{ secrets.MATZBOT_GITHUB_WORKFLOW_TOKEN }}

.github/workflows/ruby-core.yml

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@ permissions: # added using https://github.com/step-security/secure-workflows
1515

1616
jobs:
1717
ruby_core:
18-
name: RDoc under a ruby-core setup
18+
name: Generate ruby/ruby documentation with the current RDoc commit
1919
runs-on: ubuntu-20.04
2020
strategy:
2121
fail-fast: false
2222
timeout-minutes: 30
2323
steps:
2424
- name: Set up latest ruby head
25-
uses: ruby/setup-ruby@1d0e911f615a112e322369596f10ee0b95b010ae # v1.183.0
25+
uses: ruby/setup-ruby@1287d2b408066abada82d5ad1c63652e758428d9 # v1.214.0
2626
with:
2727
ruby-version: head
2828
bundler: none
@@ -45,15 +45,26 @@ jobs:
4545
run: |
4646
autoconf
4747
./configure -C --disable-install-doc
48-
make -j2
4948
working-directory: ruby/ruby
5049
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v3.1.0
5150
with:
5251
path: ruby/rdoc
53-
- name: Sync tools
52+
- name: Build RDoc locally
5453
run: |
55-
ruby tool/sync_default_gems.rb rdoc
54+
bundle install
55+
bundle exec rake build:local_ruby
56+
working-directory: ruby/rdoc
57+
- name: Generate Documentation with RDoc
58+
run: make html
5659
working-directory: ruby/ruby
57-
- name: Test RDoc
58-
run: make -j2 -s test-all TESTS="rdoc --no-retry"
60+
# We need to clear the generated documentation to generate them again
61+
# with the Prism parser.
62+
- name: Clear Generated Documentation
63+
run: rm -r .ext/html
5964
working-directory: ruby/ruby
65+
- name: Generate Documentation with RDoc (Prism parser)
66+
run: make html
67+
working-directory: ruby/ruby
68+
env:
69+
RDOC_USE_PRISM_PARSER: true
70+

.github/workflows/test.yml

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ permissions: # added using https://github.com/step-security/secure-workflows
88
jobs:
99
ruby-versions:
1010
uses: ruby/actions/.github/workflows/ruby_versions.yml@master
11+
with:
12+
# 2.7 breaks `test_parse_statements_nodoc_identifier_alias_method`
13+
min_version: 3.0
14+
versions: '["mswin"]'
15+
engine: cruby-truffleruby
1116

1217
test:
1318
needs: ruby-versions
@@ -21,10 +26,11 @@ jobs:
2126
ruby: truffleruby
2227
- os: windows-latest
2328
ruby: truffleruby-head
24-
- os: windows-latest
25-
ruby: jruby
26-
- os: windows-latest
27-
ruby: jruby-head
29+
- os: macos-latest
30+
ruby: mswin
31+
- os: ubuntu-latest
32+
ruby: mswin
33+
2834
runs-on: ${{ matrix.os }}
2935
steps:
3036
- uses: actions/checkout@v4 # v3.3.0
@@ -36,14 +42,16 @@ jobs:
3642
with:
3743
ruby-version: ${{ matrix.ruby }}
3844
bundler-cache: true # 'bundle install' and cache
39-
# Avoid issues on these platforms
40-
- if: ${{ matrix.ruby == '2.6' }}
41-
run: gem update --system
4245
- name: Run test
4346
run: bundle exec rake
4447
env:
4548
RUBYOPT: --enable-frozen_string_literal
49+
- name: Run test with Prism parser
50+
run: bundle exec rake
51+
env:
52+
RUBYOPT: --enable-frozen_string_literal
53+
RDOC_USE_PRISM_PARSER: true
4654
- if: ${{ matrix.ruby == 'head' && startsWith(matrix.os, 'ubuntu') }}
4755
run: bundle exec rake rdoc
4856
- if: ${{ matrix.ruby == 'head' && startsWith(matrix.os, 'ubuntu') }}
49-
run: bundle exec rake rubocop
57+
run: bundle exec rake install

.rdoc_options

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
op_dir: _site # for GitHub Pages and should match the config of RDoc task in Rakefile
2+
title: rdoc Documentation
3+
main_page: README.rdoc
4+
warn_missing_rdoc_ref: true
5+
autolink_excluded_words:
6+
- RDoc

.rubocop.yml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,22 @@
11
AllCops:
2-
TargetRubyVersion: 2.6
2+
TargetRubyVersion: 3.0
33
DisabledByDefault: true
4-
Exclude:
5-
- rdoc.gemspec
4+
SuggestExtensions: false
65

76
Layout/TrailingWhitespace:
87
Enabled: true
8+
99
Layout/TrailingEmptyLines:
1010
Enabled: true
11+
12+
Layout/SpaceAroundKeyword:
13+
Enabled: true
14+
15+
Layout/SpaceBeforeComma:
16+
Enabled: true
17+
18+
Layout/SpaceAfterComma:
19+
Enabled: true
20+
21+
Lint/UnreachableCode:
22+
Enabled: true

0 commit comments

Comments
 (0)