Skip to content

Commit 0fe63e4

Browse files
authored
Refactor for v9.0.0 (#18)
Most significant breaking change is dropping Ruby 2.7 support. - **breaking:** set minimum supported Ruby to v3.0 - **breaking:** bump dependency version constraints - set project Ruby to v3.3.0 - switch from CHANGELOG.md to GitHub Releases - reconfigure Dev Container / Codespaces config files - add a publish workflow for automated build and push to RubyGems.org and GitHub Packages
2 parents 8722dc7 + f2953c1 commit 0fe63e4

File tree

13 files changed

+112
-51
lines changed

13 files changed

+112
-51
lines changed

.devcontainer/Dockerfile

Lines changed: 0 additions & 19 deletions
This file was deleted.

.devcontainer/devcontainer.json

Lines changed: 45 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,48 @@
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
2+
// README at: https://github.com/devcontainers/templates/tree/main/src/ruby
13
{
24
"name": "indieweb-endpoints-ruby",
3-
"features": {},
4-
"customizations": {},
5-
"workspaceFolder": "/workspace",
6-
"dockerComposeFile": "docker-compose.yml",
7-
"service": "default",
8-
"postCreateCommand": "bundle install"
5+
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
6+
"image": "mcr.microsoft.com/devcontainers/ruby:1-3.3-bookworm",
7+
8+
// Features to add to the dev container. More info: https://containers.dev/features.
9+
"features": {
10+
"ghcr.io/devcontainers-contrib/features/apt-packages:1": {
11+
"packages": "less,nano"
12+
}
13+
},
14+
15+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
16+
// "forwardPorts": [],
17+
18+
// Use 'postCreateCommand' to run commands after the container is created.
19+
"postCreateCommand": "bundle install",
20+
21+
// Configure tool-specific properties.
22+
"customizations": {
23+
// Configure properties specific to VS Code.
24+
"vscode": {
25+
// Set *default* container specific settings.json values on container create.
26+
"settings": {
27+
"rubyLsp.rubyVersionManager": "none"
28+
},
29+
"extensions": [
30+
"EditorConfig.EditorConfig",
31+
"Shopify.ruby-lsp"
32+
]
33+
}
34+
},
35+
36+
// Set or override environment variables for the container.
37+
"containerEnv": {
38+
"EDITOR": "nano",
39+
"LESS": "-FMR",
40+
"PAGER": "less",
41+
"RUBY_DEBUG_HISTORY_FILE": "${containerWorkspaceFolder}/.rdbg_history",
42+
"RUBY_DEBUG_SAVE_HISTORY": "1000",
43+
"VISUAL": "code --wait"
44+
}
45+
46+
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
47+
// "remoteUser": "root"
948
}

.devcontainer/docker-compose.yml

Lines changed: 0 additions & 9 deletions
This file was deleted.

.editorconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# EditorConfig is awesome: https://EditorConfig.org
21
root = true
32

43
[*]

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
fail-fast: false
2828
matrix:
2929
os: [macos-latest, ubuntu-latest]
30-
ruby: ["2.7", "3.0", "3.1", "3.2", "3.3"]
30+
ruby: ["3.0", "3.1", "3.2", "3.3"]
3131
steps:
3232
- uses: actions/checkout@v4
3333
- uses: ruby/setup-ruby@v1

.github/workflows/publish.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Publish
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
ci:
9+
name: CI
10+
uses: ./.github/workflows/ci.yml
11+
publish-to-rubygems:
12+
name: Publish to RubyGems
13+
permissions:
14+
contents: write
15+
id-token: write
16+
needs: ci
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@v4
20+
- uses: ruby/setup-ruby@v1
21+
with:
22+
bundler-cache: true
23+
- uses: rubygems/release-gem@v1
24+
with:
25+
await-release: false
26+
publish-to-github-packages:
27+
name: Publish to GitHub Packages
28+
permissions:
29+
contents: read
30+
packages: write
31+
needs: ci
32+
runs-on: ubuntu-latest
33+
steps:
34+
- uses: actions/checkout@v4
35+
- uses: ruby/setup-ruby@v1
36+
with:
37+
bundler-cache: true
38+
- run: |
39+
mkdir -p $HOME/.gem
40+
touch $HOME/.gem/credentials
41+
chmod 0600 $HOME/.gem/credentials
42+
printf -- "---\n:github: Bearer ${{ secrets.GITHUB_TOKEN }}\n" > $HOME/.gem/credentials
43+
- run: bundle exec rake release
44+
env:
45+
BUNDLE_GEM__PUSH_KEY: github
46+
RUBYGEMS_HOST: "https://rubygems.pkg.github.com/${{ github.repository_owner }}"

.ruby-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.7.8
1+
3.3.0

.standard.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1-
format: progress
1+
format: "progress"
22
parallel: true
3+
ruby_version: "3.0"

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Changelog
22

3+
> [!NOTE]
4+
> From v9.0.0, changes are documented using [GitHub Releases](https://github.com/indieweb/indieweb-endpoints-ruby/releases). For a given release, metadata on RubyGems.org will link to that version's Release page.
5+
36
## 8.0.0 / 2022-11-09
47

58
- Refactor `ResponseHeadersParser#results_for` to use `Enumerable#filter_map` (946ff3d)

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ There are a couple ways you can help improve indieweb-endpoints-ruby:
88

99
## Getting Started
1010

11-
indieweb-endpoints-ruby is developed using Ruby 2.7.8 and is tested against additional Ruby versions using [GitHub Actions](https://github.com/indieweb/indieweb-endpoints-ruby/actions).
11+
indieweb-endpoints-ruby is developed using Ruby 3.3.0 and is tested against additional Ruby versions using [GitHub Actions](https://github.com/indieweb/indieweb-endpoints-ruby/actions).
1212

13-
Before making changes to indieweb-endpoints-ruby, you'll want to install Ruby 2.7.8. Using a Ruby version managment tool like [rbenv](https://github.com/rbenv/rbenv), [chruby](https://github.com/postmodern/chruby), or [rvm](https://github.com/rvm/rvm) is recommended. Once you've installed Ruby 2.7.8 using your method of choice, install the project's gems by running:
13+
Before making changes to indieweb-endpoints-ruby, you'll want to install Ruby 3.3.0. Using a Ruby version managment tool like [rbenv](https://github.com/rbenv/rbenv), [chruby](https://github.com/postmodern/chruby), or [rvm](https://github.com/rvm/rvm) is recommended. Once you've installed Ruby 3.3.0 using your method of choice, install the project's gems by running:
1414

1515
```sh
1616
bundle install

0 commit comments

Comments
 (0)