grape-swagger-rails 2.0.2 → 2.0.3

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5cb46b7350b64528ed58b5d526785708e7606f6d82e12e4aaaedc1f35394059f
4
- data.tar.gz: 57570a7353a75e39e309506cceb64be6db2ea0768805f7dc1321223ea1cd5a09
3
+ metadata.gz: 2b270749bdb6de1a32b2dcedf17889b7c86568c191c455f8ac435f181f2a4079
4
+ data.tar.gz: 4f8a76c95938fd5e629b700007643a56cf9a3005f0ad75cad9a9863e0ce58aa6
5
5
  SHA512:
6
- metadata.gz: 40e18634071585dc74fb3bf2debfedf5282b66b2fc1774ca2e4bb009c6f316da7e4052256f00982da134b849ecaac6716bb2114ce99ded50121fade97c49939d
7
- data.tar.gz: 4bbb18f6e0f0928d1e5dba9a07d3c2a64729d938aaf3f50fb5a33a8eff6f50920883040511f2db4c346fd8deb2ed1411e9bdb7ce78ee45f201cc74222bd72797
6
+ metadata.gz: 8c70abb532e972a622be3f653d3f0ff8c3bb7417fcee046348a2ef7fa56758ccd697b464be920e607f301c1832803661574efb2005a1339f209835fb2f3691f1
7
+ data.tar.gz: 4c946f35334ed771a3019dcf9aa696345158fc2e65a6490556c8eb40c93adc94c4d937691ac905f20e0bbf6941c056f4d0a05cac97566cca0911dc76278c27c5
@@ -3,7 +3,13 @@ on:
3
3
  workflow_run:
4
4
  workflows: ['Danger']
5
5
  types: [completed]
6
+
7
+ permissions:
8
+ actions: read
9
+ issues: write
10
+ pull-requests: write
11
+
6
12
  jobs:
7
13
  comment:
8
- uses: numbata/danger-pr-comment/.github/workflows/danger-comment.yml@v0.1.0
9
- secrets: inherit
14
+ if: github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion != 'cancelled'
15
+ uses: numbata/danger-pr-comment/.github/workflows/danger-comment.yml@v0.2.0
@@ -4,21 +4,25 @@ on:
4
4
  types: [opened, reopened, synchronize, edited]
5
5
 
6
6
  permissions:
7
- contents: write
7
+ contents: read
8
8
  pull-requests: read
9
9
 
10
10
  jobs:
11
11
  changelog:
12
+ name: Update Changelog
12
13
  # A pull_request token cannot write to a branch in somebody else's fork.
13
14
  if: github.event.pull_request.head.repo.full_name == github.repository
14
15
  runs-on: ubuntu-latest
16
+ permissions:
17
+ contents: write
15
18
  steps:
16
- - uses: actions/checkout@v4
19
+ - name: Check Out PR Branch
20
+ uses: actions/checkout@v7
17
21
  with:
18
22
  ref: ${{ github.event.pull_request.head.ref }}
19
23
  repository: ${{ github.event.pull_request.head.repo.full_name }}
20
24
  token: ${{ secrets.GITHUB_TOKEN }}
21
- - name: Add the pull request to the next release
25
+ - name: Add Pull Request To Next Release
22
26
  env:
23
27
  PR_AUTHOR: ${{ github.event.pull_request.user.login }}
24
28
  PR_AUTHOR_URL: ${{ github.event.pull_request.user.html_url }}
@@ -26,7 +30,7 @@ jobs:
26
30
  PR_TITLE: ${{ github.event.pull_request.title }}
27
31
  PR_URL: ${{ github.event.pull_request.html_url }}
28
32
  run: ruby script/update_changelog
29
- - name: Commit the changelog
33
+ - name: Commit Changelog
30
34
  env:
31
35
  PR_NUMBER: ${{ github.event.pull_request.number }}
32
36
  run: |
@@ -42,8 +46,7 @@ jobs:
42
46
  danger:
43
47
  needs: changelog
44
48
  if: always() && (needs.changelog.result == 'success' || needs.changelog.result == 'skipped')
45
- uses: numbata/danger-pr-comment/.github/workflows/danger-run.yml@v0.1.0
49
+ uses: numbata/danger-pr-comment/.github/workflows/danger-run.yml@v0.2.0
46
50
  with:
47
- ruby-version: '3.4'
51
+ ruby-version: '4.0'
48
52
  bundler-cache: true
49
- secrets: inherit
@@ -0,0 +1,79 @@
1
+ name: Lint
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - master
7
+ pull_request:
8
+
9
+ permissions:
10
+ contents: read
11
+
12
+ concurrency:
13
+ group: ${{ github.workflow }}-${{ github.ref }}
14
+ cancel-in-progress: ${{ github.event_name == 'pull_request' }}
15
+
16
+ jobs:
17
+ ruby:
18
+ name: Ruby
19
+ runs-on: ubuntu-latest
20
+ timeout-minutes: 10
21
+ steps:
22
+ - name: Check Out Code
23
+ uses: actions/checkout@v7
24
+ with:
25
+ persist-credentials: false
26
+ - name: Set Up Ruby
27
+ uses: ruby/setup-ruby@v1
28
+ with:
29
+ ruby-version: '4.0'
30
+ bundler-cache: true
31
+ - name: Lint Ruby
32
+ run: bundle exec rake rubocop
33
+
34
+ frontend:
35
+ name: Frontend
36
+ runs-on: ubuntu-latest
37
+ timeout-minutes: 10
38
+ steps:
39
+ - name: Check Out Code
40
+ uses: actions/checkout@v7
41
+ with:
42
+ persist-credentials: false
43
+ - name: Set Up Node.js
44
+ uses: actions/setup-node@v7
45
+ with:
46
+ node-version: '26'
47
+ - name: Set Up Corepack
48
+ run: |
49
+ npm install --global corepack@0.36.0
50
+ corepack enable
51
+ - name: Cache Yarn Dependencies
52
+ uses: actions/cache@v6
53
+ with:
54
+ path: .yarn/cache
55
+ key: yarn-${{ runner.os }}-node26-${{ hashFiles('yarn.lock') }}
56
+ - name: Install Dependencies
57
+ run: yarn install --immutable
58
+ - name: Check Types
59
+ run: yarn typecheck
60
+ - name: Build Frontend
61
+ run: yarn build:frontend
62
+ - name: Check Committed Frontend Assets
63
+ run: |
64
+ git diff --exit-code -- \
65
+ app/assets/javascripts/grape_swagger_rails/index.js \
66
+ app/assets/javascripts/grape_swagger_rails/index.min.js \
67
+ app/assets/javascripts/grape_swagger_rails/index.min.js.map
68
+
69
+ workflows:
70
+ name: GitHub Actions
71
+ runs-on: ubuntu-latest
72
+ timeout-minutes: 5
73
+ steps:
74
+ - name: Check Out Code
75
+ uses: actions/checkout@v7
76
+ with:
77
+ persist-credentials: false
78
+ - name: Lint Workflows
79
+ uses: docker://rhysd/actionlint:1.7.12
@@ -11,17 +11,19 @@ permissions:
11
11
 
12
12
  jobs:
13
13
  update:
14
+ name: Update Swagger UI
14
15
  runs-on: ubuntu-latest
15
16
  steps:
16
- - uses: actions/checkout@v6
17
+ - name: Check Out Code
18
+ uses: actions/checkout@v7
17
19
 
18
- - name: Set up Ruby
20
+ - name: Set Up Ruby
19
21
  uses: ruby/setup-ruby@v1
20
22
  with:
21
- ruby-version: "3.4"
23
+ ruby-version: '4.0'
22
24
  bundler-cache: true
23
25
 
24
- - name: Check latest Swagger UI release
26
+ - name: Check Latest Swagger UI Release
25
27
  id: swagger-ui
26
28
  env:
27
29
  GH_TOKEN: ${{ github.token }}
@@ -30,23 +32,24 @@ jobs:
30
32
  latest_tag="$(gh api repos/swagger-api/swagger-ui/releases/latest --jq .tag_name)"
31
33
  latest_version="${latest_tag#v}"
32
34
 
33
- echo "current-version=${current_version}" >> "$GITHUB_OUTPUT"
34
- echo "latest-tag=${latest_tag}" >> "$GITHUB_OUTPUT"
35
- echo "latest-version=${latest_version}" >> "$GITHUB_OUTPUT"
35
+ {
36
+ echo "current-version=${current_version}"
37
+ echo "latest-tag=${latest_tag}"
38
+ echo "latest-version=${latest_version}"
39
+ if [ "$current_version" != "$latest_version" ]; then
40
+ echo "update-needed=true"
41
+ else
42
+ echo "update-needed=false"
43
+ fi
44
+ } >> "$GITHUB_OUTPUT"
36
45
 
37
- if [ "$current_version" != "$latest_version" ]; then
38
- echo "update-needed=true" >> "$GITHUB_OUTPUT"
39
- else
40
- echo "update-needed=false" >> "$GITHUB_OUTPUT"
41
- fi
42
-
43
- - name: Update Swagger UI assets
46
+ - name: Update Swagger UI Assets
44
47
  if: steps.swagger-ui.outputs.update-needed == 'true'
45
48
  env:
46
49
  SWAGGER_UI_VERSION: ${{ steps.swagger-ui.outputs.latest-tag }}
47
50
  run: bundle exec rake swagger_ui:dist:update
48
51
 
49
- - name: Collect Swagger UI release notes
52
+ - name: Collect Swagger UI Release Notes
50
53
  if: steps.swagger-ui.outputs.update-needed == 'true'
51
54
  env:
52
55
  GH_TOKEN: ${{ github.token }}
@@ -54,10 +57,10 @@ jobs:
54
57
  TO_VERSION: ${{ steps.swagger-ui.outputs.latest-version }}
55
58
  run: ruby script/swagger_ui_release_notes > "${RUNNER_TEMP}/pull-request-body.md"
56
59
 
57
- - name: Create pull request
60
+ - name: Create Pull Request
58
61
  id: pull-request
59
62
  if: steps.swagger-ui.outputs.update-needed == 'true'
60
- uses: peter-evans/create-pull-request@v7
63
+ uses: peter-evans/create-pull-request@v8
61
64
  with:
62
65
  token: ${{ github.token }}
63
66
  branch: update-swagger-ui-${{ steps.swagger-ui.outputs.latest-version }}
@@ -67,7 +70,7 @@ jobs:
67
70
  body-path: ${{ runner.temp }}/pull-request-body.md
68
71
 
69
72
  # PRs created with GITHUB_TOKEN do not trigger the Danger PR workflow.
70
- - name: Add the pull request to the changelog
73
+ - name: Add Pull Request To Changelog
71
74
  if: steps.pull-request.outputs.pull-request-number != ''
72
75
  env:
73
76
  GH_TOKEN: ${{ github.token }}
@@ -1,48 +1,58 @@
1
- name: Tests
1
+ name: Test
2
2
  on:
3
3
  push:
4
4
  branches:
5
5
  - master
6
6
  pull_request:
7
+
8
+ permissions:
9
+ contents: read
10
+
11
+ concurrency:
12
+ group: ${{ github.workflow }}-${{ github.ref }}
13
+ cancel-in-progress: ${{ github.event_name == 'pull_request' }}
14
+
7
15
  jobs:
8
16
  test:
9
- runs-on: ubuntu-latest
17
+ name: Ruby ${{ matrix.entry.ruby }} / JSON ${{ matrix.entry.json }} / ${{ matrix.entry.os }}
18
+ runs-on: ${{ matrix.entry.os }}
19
+ timeout-minutes: 20
10
20
  strategy:
11
21
  fail-fast: false
12
22
  matrix:
13
- ruby: ['3.2', '3.3', '3.4']
14
- rails: ['~> 8.1.4']
15
- json: ['~> 2.0', '~> 3.0']
23
+ entry:
24
+ - { os: ubuntu-latest, ruby: '3.2', json: '~> 2.0' }
25
+ - { os: ubuntu-latest, ruby: '3.3', json: '~> 3.0' }
26
+ - { os: ubuntu-latest, ruby: '3.4', json: '~> 2.0' }
27
+ - { os: ubuntu-latest, ruby: '4.0', json: '~> 3.0' }
28
+ - { os: macos-latest, ruby: '4.0', json: '~> 3.0' }
16
29
  env:
17
30
  GRAPE_VERSION: '~> 3.1.0'
18
31
  GRAPE_SWAGGER_VERSION: '2.1.4'
19
- RAILS_VERSION: ${{ matrix.rails }}
20
- JSON_VERSION: ${{ matrix.json }}
32
+ RAILS_VERSION: '~> 8.1.4'
33
+ JSON_VERSION: ${{ matrix.entry.json }}
34
+ HEADLESS: 'true'
35
+ SE_SKIP_DRIVER_IN_PATH: 'true'
21
36
  steps:
22
- - uses: actions/checkout@v6
23
- - name: Set up Ruby
37
+ - name: Check Out Code
38
+ uses: actions/checkout@v7
39
+ with:
40
+ persist-credentials: false
41
+ - name: Set Up Ruby
24
42
  uses: ruby/setup-ruby@v1
25
43
  with:
26
- ruby-version: ${{ matrix.ruby }}
44
+ ruby-version: ${{ matrix.entry.ruby }}
27
45
  bundler-cache: true
28
- - name: Print Bundler Versions
29
- run: bundle show
30
- - name: Setup Firefox
31
- uses: browser-actions/setup-firefox@v1
32
- with:
33
- firefox-version: "130.0"
34
- - uses: browser-actions/setup-geckodriver@latest
46
+ - name: Set Up Firefox
47
+ uses: browser-actions/setup-firefox@v1.7.2
35
48
  with:
36
- geckodriver-version: "0.35.0"
37
- - name: Run tests with Sprockets
38
- uses: coactions/setup-xvfb@v1
49
+ firefox-version: latest
50
+ - name: Test With Sprockets
39
51
  env:
40
52
  ASSET_PIPELINE: sprockets
41
- with:
42
- run: bundle exec rake spec
43
- - name: Run tests with Propshaft
44
- uses: coactions/setup-xvfb@v1
53
+ run: bundle exec rake spec
54
+ - name: Test With Propshaft
55
+ if: ${{ !cancelled() }}
45
56
  env:
46
57
  ASSET_PIPELINE: propshaft
47
- with:
48
- run: bundle exec rake spec
58
+ run: bundle exec rake spec
data/CHANGELOG.md CHANGED
@@ -2,6 +2,13 @@
2
2
 
3
3
  * Your contribution here.
4
4
 
5
+ ### 2.0.3 (2026/11/18)
6
+
7
+ * [#188](https://github.com/ruby-grape/grape-swagger-rails/pull/188): Bump Swagger UI to 5.35.0 - [@github-actions[bot]](https://github.com/apps/github-actions).
8
+ * [#187](https://github.com/ruby-grape/grape-swagger-rails/pull/187): Fix `Incompatible units` errors when a Sprockets app compresses Swagger UI CSS with sassc - [@moskvin](https://github.com/moskvin).
9
+ * [#189](https://github.com/ruby-grape/grape-swagger-rails/pull/189): Test SassC compression of the bundled Swagger UI stylesheet instead of CSS function spelling - [@dblock](https://github.com/dblock).
10
+ * [#190](https://github.com/ruby-grape/grape-swagger-rails/pull/190): Modernize CI with current runtimes and actions, headless browser tests, and workflow linting - [@dblock](https://github.com/dblock).
11
+
5
12
  ### 2.0.2 (2026/11/03)
6
13
 
7
14
  * [#183](https://github.com/ruby-grape/grape-swagger-rails/pull/183): Upgrade danger-changelog to 0.9.0 and preserve bot author attribution without the workaround from #182 - [@dblock](https://github.com/dblock).
data/CLAUDE.md CHANGED
@@ -9,10 +9,12 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
9
9
  ## Commands
10
10
 
11
11
  ```bash
12
- bundle exec rake # Run full suite: RuboCop + RSpec (default)
12
+ bundle exec rake # Run lint + RSpec (default)
13
+ bundle exec rake lint # Ruby and workflow checks
13
14
  bundle exec rake spec # Run all RSpec tests only
14
15
  bundle exec rake rubocop # Run RuboCop linting only
15
16
  bundle exec rspec spec/features/swagger_spec.rb # Run a single spec file
17
+ HEADLESS=true bundle exec rake spec # Run browser specs headlessly
16
18
 
17
19
  yarn build:frontend # tsc → index.js, then esbuild → index.min.js (+ .map)
18
20
  yarn build:frontend:js # Just tsc (readable bundle)
@@ -23,7 +25,11 @@ bundle exec rake swagger_ui:dist:update # Update bundled Swagger UI ass
23
25
  SWAGGER_UI_VERSION=v5.32.5 bundle exec rake swagger_ui:dist:update # Pin to a version
24
26
  ```
25
27
 
26
- Tests use Capybara + Selenium with Firefox. Firefox and geckodriver must be installed locally. On macOS, `xvfb` is not needed (unlike CI). Tests launch a real browser to validate UI behavior.
28
+ Tests use Capybara + Selenium with Firefox. Install Firefox locally; Selenium Manager resolves geckodriver automatically. Set `HEADLESS=true` to run without a display, as CI does; Xvfb is not needed. Tests launch a real browser to validate UI behavior.
29
+
30
+ Use Node.js 26 LTS and the Corepack/Yarn versions documented in CONTRIBUTING. Install dependencies with `yarn install --immutable` and install actionlint before `bundle exec rake lint`.
31
+
32
+ Danger is checked in PR CI rather than as a routine local command.
27
33
 
28
34
  **After editing TypeScript**, run `yarn build:frontend` before running specs — the specs exercise `app/assets/javascripts/grape_swagger_rails/index.js`, which is the compiled output. Never edit the compiled JS directly. The build also emits `index.min.js` (+ sourcemap); the view picks the minified bundle in production (`Rails.env.production?`) via `grape_swagger_rails_runtime_asset` and the readable one everywhere else.
29
35
 
@@ -55,7 +61,7 @@ The gem has minimal moving parts:
55
61
 
56
62
  ## Testing Structure
57
63
 
58
- ```
64
+ ```text
59
65
  spec/
60
66
  features/
61
67
  swagger_spec.rb # Main integration tests (auth types, theme, headers)
@@ -73,7 +79,6 @@ Config in `.rubocop.yml` targets Ruby 3.4. Plugins: rubocop-capybara, rubocop-rs
73
79
 
74
80
  ## Compatibility Matrix
75
81
 
76
- - Rails 8.1.4–8.1.x × Ruby 3.2–3.4 × JSON 2/3 × grape-swagger 2.1.4 (grape ~> 3.1)
77
- - Ruby 3.1 is excluded from Rails 8 (requires 3.2+)
78
- - grape ~> 1.8 is not tested on Ruby 3.4: Ruby 3.4 tightened `Forwardable` to raise on private-method delegation, which breaks Mustermann's `named_captures` forwarding used by grape-swagger 1.6.1 to introspect routes
79
- - Both Sprockets and Propshaft asset pipelines are tested in CI
82
+ - Rails 8.1.4–8.1.x × Ruby 3.2/3.3/3.4/4.0 × JSON 2/3 × grape-swagger 2.1.4 (grape ~> 3.1), using explicit `matrix.entry` combinations.
83
+ - Both Sprockets and Propshaft are tested on Linux and macOS with headless Firefox.
84
+ - Keep consumer requirements separate from current development/lint runtimes. Ruby 3.2 is still tested despite being end-of-life.
data/CONTRIBUTING.md CHANGED
@@ -1,16 +1,14 @@
1
1
  # Contributing to Grape-Swagger-Rails
2
2
 
3
- This project is work of [many contributors](https://github.com/ruby-grape/grape-swagger-rails/graphs/contributors).
4
- You're encouraged to submit [pull requests](https://github.com/ruby-grape/grape-swagger-rails/pulls),
5
- [propose features and discuss issues](https://github.com/ruby-grape/grape-swagger-rails/issues).
3
+ This project is work of [many contributors](https://github.com/ruby-grape/grape-swagger-rails/graphs/contributors). You're encouraged to submit [pull requests](https://github.com/ruby-grape/grape-swagger-rails/pulls), [propose features and discuss issues](https://github.com/ruby-grape/grape-swagger-rails/issues).
6
4
 
7
- In the examples below, substitute your Github username for `contributor` in URLs.
5
+ In the examples below, substitute your GitHub username for `contributor` in URLs.
8
6
 
9
7
  ## Fork the Project
10
8
 
11
- Fork the [project on Github](https://github.com/ruby-grape/grape-swagger-rails) and check out your copy.
9
+ Fork the [project on GitHub](https://github.com/ruby-grape/grape-swagger-rails) and check out your copy.
12
10
 
13
- ```
11
+ ```sh
14
12
  git clone https://github.com/contributor/grape-swagger-rails.git
15
13
  cd grape-swagger-rails
16
14
  git remote add upstream https://github.com/ruby-grape/grape-swagger-rails.git
@@ -20,7 +18,7 @@ git remote add upstream https://github.com/ruby-grape/grape-swagger-rails.git
20
18
 
21
19
  Make sure your fork is up-to-date and create a topic branch for your feature or bug fix.
22
20
 
23
- ```
21
+ ```sh
24
22
  git checkout master
25
23
  git pull upstream master
26
24
  git checkout -b my-feature-branch
@@ -28,13 +26,26 @@ git checkout -b my-feature-branch
28
26
 
29
27
  ## Bundle Install and Test
30
28
 
31
- Ensure that you can build the project and run tests.
29
+ Use Ruby 3.2 or newer and Node.js 26 LTS for development. Install [actionlint](https://github.com/rhysd/actionlint#installation) for workflow checks and Firefox for browser tests. Selenium Manager resolves the matching geckodriver automatically.
32
30
 
33
- ```
31
+ ```sh
34
32
  bundle install
33
+ npm install --global corepack@0.36.0
34
+ corepack enable
35
+ yarn install --immutable
35
36
  bundle exec rake
36
37
  ```
37
38
 
39
+ The default Rake task runs Ruby and workflow lint before the RSpec suite. `bundle exec rake lint` runs just these checks.
40
+
41
+ Run browser tests without a display with `HEADLESS=true bundle exec rake spec`. Set `ASSET_PIPELINE=propshaft` to exercise Propshaft instead of the default Sprockets pipeline. CI tests both pipelines on Ruby 3.2, 3.3, 3.4, and 4.0, with JSON 2/3 and Linux/macOS coverage. Ruby 3.2 remains the consumer compatibility floor even though it is end-of-life; lint and build jobs use current stable runtimes.
42
+
43
+ ### CI Workflows
44
+
45
+ `Test` and `Lint` run independently on pull requests and pushes to `master`. `Lint` also type-checks and rebuilds the frontend, then rejects uncommitted changes to generated assets. Dependency caches are keyed by the relevant lockfile and platform.
46
+
47
+ Danger runs in PR CI, not as routine local validation. Its read-only report job remains separate from the privileged comment workflow; the latter does not check out or execute PR code. The existing changelog automation only writes branches in the main repository.
48
+
38
49
  ## Write Tests
39
50
 
40
51
  Try to write a test that reproduces the problem you're trying to fix or describes a feature that you want to build.
@@ -53,7 +64,7 @@ Make sure that `bundle exec rake` completes without errors.
53
64
 
54
65
  You might find it useful to iterate on code by running the test project from spec/dummy.
55
66
 
56
- ```
67
+ ```text
57
68
  spec/dummy$ GRAPE_SWAGGER_VERSION=HEAD bundle install
58
69
 
59
70
  Updating git://github.com/ruby-grape/grape-swagger.git
@@ -70,7 +81,7 @@ spec/dummy$ GRAPE_SWAGGER_VERSION=HEAD rails s
70
81
  ...
71
82
  ```
72
83
 
73
- Navigate to http://localhost:3000/swagger.
84
+ Navigate to <http://localhost:3000/swagger>.
74
85
 
75
86
  ## Write Documentation
76
87
 
@@ -83,33 +94,35 @@ Make it look like every other line, including your name and link to your Github
83
94
 
84
95
  ## Push
85
96
 
86
- ```
97
+ ```sh
87
98
  git push origin my-feature-branch
88
99
  ```
89
100
 
90
101
  ## Make a Pull Request
91
102
 
92
- Go to https://github.com/contributor/grape-swagger-rails and select your feature branch.
103
+ Go to <https://github.com/contributor/grape-swagger-rails> and select your feature branch.
93
104
  Click the 'Pull Request' button and fill out the form. Pull requests are usually reviewed within a few days.
94
105
 
95
106
  ## Update CHANGELOG Again
96
107
 
97
108
  Update the [CHANGELOG](CHANGELOG.md) with the pull request number. A typical entry looks as follows.
98
109
 
99
- ```
110
+ ```markdown
100
111
  * [#123](https://github.com/ruby-grape/grape-swagger-rails/pull/123): Reticulated splines - [@contributor](https://github.com/contributor).
101
112
  ```
102
113
 
103
114
  Amend your previous commit and force push the changes.
104
115
 
105
- ```
116
+ ```sh
106
117
  git commit --amend
107
118
  git push origin my-feature-branch -f
119
+ ```
120
+
108
121
  ## Rebase
109
122
 
110
123
  If you've been working on a change for a while, rebase with upstream/master.
111
124
 
112
- ```
125
+ ```sh
113
126
  git fetch upstream
114
127
  git rebase upstream/master
115
128
  git push origin my-feature-branch -f
@@ -117,21 +130,17 @@ git push origin my-feature-branch -f
117
130
 
118
131
  ## Check on Your Pull Request
119
132
 
120
- Go back to your pull request after a few minutes and see whether it passed muster with Travis-CI. Everything should look green, otherwise fix issues and amend your commit as described above.
133
+ Check the `Test`, `Lint`, and Danger results on the pull request. Everything should look green; otherwise fix issues and update the PR.
121
134
 
122
135
  ## Be Patient
123
136
 
124
- It's likely that your change will not be merged and that the nitpicky maintainers will ask you to do more, or fix seemingly benign problems. Hang on there!
137
+ Maintainers may ask for changes before merging, including fixes for seemingly minor problems. Hang on there!
125
138
 
126
139
  ## Preparing a Release
127
140
 
128
- Run `bin/bump 1.0.11` with the desired new version. This updates the gem version
129
- and moves all entries under `Next Release` into a new section dated today,
130
- leaving `Your contribution here.` under `Next Release`. It refuses empty releases
131
- and versions that are not newer than the current version.
141
+ Run `bin/bump 1.0.11` with the desired new version. This updates the gem version and moves all entries under `Next Release` into a new section dated today, leaving `Your contribution here.` under `Next Release`. It refuses empty releases and versions that are not newer than the current version.
132
142
 
133
- Review the diff, commit it, and follow the usual gem release process. The script
134
- does not commit, tag, push, or publish the gem.
143
+ Review the diff, commit it, and follow the usual gem release process. The script does not commit, tag, push, or publish the gem.
135
144
 
136
145
  ## Thank You
137
146
 
data/Gemfile CHANGED
@@ -49,6 +49,7 @@ group :development, :test do
49
49
  gem 'rubocop-rake'
50
50
  gem 'rubocop-rspec'
51
51
  gem 'rubocop-rspec_rails', '~> 2.33'
52
+ gem 'sassc', '~> 2.4', require: false
52
53
  gem 'selenium-webdriver'
53
54
  gem 'sprockets', ENV.fetch('SPROCKETS_VERSION', '>= 4.0.0'), require: false
54
55
  gem 'sprockets-rails', require: false
data/README.md CHANGED
@@ -1,7 +1,8 @@
1
1
  # GrapeSwaggerRails
2
2
 
3
3
  [![Gem Version](https://badge.fury.io/rb/grape-swagger-rails.svg)](http://badge.fury.io/rb/grape-swagger-rails)
4
- [![Tests](https://github.com/ruby-grape/grape-swagger-rails/actions/workflows/test.yml/badge.svg)](https://github.com/ruby-grape/grape-swagger-rails/actions/workflows/test.yml)
4
+ [![Test](https://github.com/ruby-grape/grape-swagger-rails/actions/workflows/test.yml/badge.svg)](https://github.com/ruby-grape/grape-swagger-rails/actions/workflows/test.yml)
5
+ [![Lint](https://github.com/ruby-grape/grape-swagger-rails/actions/workflows/lint.yml/badge.svg)](https://github.com/ruby-grape/grape-swagger-rails/actions/workflows/lint.yml)
5
6
 
6
7
  Swagger UI as Rails Engine for grape-swagger gem.
7
8
 
@@ -44,9 +45,9 @@ Or install it yourself as:
44
45
 
45
46
  This gem is continuously tested against the following stack:
46
47
 
47
- | Ruby | Rails | JSON | Grape | grape-swagger | Swagger UI |
48
- |-----:|-------:|--------:|------:|--------------:|-----------:|
49
- | 3.2+ | 8.1.4–8.1.x | 2.x/3.x | 3.1.x | 2.1.4 | 5.33.0 |
48
+ | Ruby | Rails | JSON | Grape | grape-swagger | Swagger UI |
49
+ | ---: | ---: | ---: | ---: | ---: | ---: |
50
+ | 3.2/3.3/3.4/4.0 | 8.1.4–8.1.x | 2.x/3.x | 3.1.x | 2.1.4 | 5.35.0 |
50
51
 
51
52
  The dummy app and CI also exercise both supported Rails asset pipelines: Sprockets and Propshaft.
52
53
  Rails 8.1.4 is required for JSON 3 compatibility; older Rails versions remain supported by the 1.x gem releases.
data/RELEASING.md CHANGED
@@ -18,7 +18,7 @@ git diff --exit-code app/assets/javascripts/grape_swagger_rails/index.js
18
18
  bundle exec rake
19
19
  ```
20
20
 
21
- Check that the latest [GitHub Actions](https://github.com/ruby-grape/grape-swagger-rails/actions) runs succeeded for both `Tests` and `Frontend`.
21
+ Check that the latest [GitHub Actions](https://github.com/ruby-grape/grape-swagger-rails/actions) runs succeeded for `Test` and `Lint`.
22
22
 
23
23
  Increment the version, modify [lib/grape-swagger-rails/version.rb](lib/grape-swagger-rails/version.rb).
24
24
 
data/Rakefile CHANGED
@@ -19,4 +19,9 @@ RSpec::Core::RakeTask.new(:spec)
19
19
  require 'rubocop/rake_task'
20
20
  RuboCop::RakeTask.new(:rubocop)
21
21
 
22
- task default: %i[rubocop spec]
22
+ desc 'Lint Ruby and GitHub Actions workflows.'
23
+ task lint: :rubocop do
24
+ sh 'actionlint'
25
+ end
26
+
27
+ task default: %i[lint spec]