Skip to content

Commit

Permalink
feat: Support Ruby 3.3
Browse files Browse the repository at this point in the history
  • Loading branch information
ykitamura-mdsol committed Apr 25, 2024
1 parent df06905 commit 5142730
Show file tree
Hide file tree
Showing 13 changed files with 167 additions and 50 deletions.
8 changes: 8 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@



## Checklist

- [ ] rebased onto latest `master`
- [ ] followed the [Conventional Commits](https://www.conventionalcommits.org) convention
- [ ] appraisal files updated (`bundle exec appraisal update`)
24 changes: 24 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2

updates:
- package-ecosystem: bundler
directory: /
insecure-external-code-execution: allow
schedule:
interval: weekly
allow:
- dependency-type: all
groups:
dependencies:
patterns:
- "*"

- package-ecosystem: github-actions
directory: /
schedule:
interval: weekly
53 changes: 53 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
# For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby

name: CI

on:
push:
# branches:
# - master
pull_request:

permissions:
contents: read

jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 10

concurrency:
# Cancel intermediate builds
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.ruby-version }}-${{ matrix.appraisal }}
cancel-in-progress: true

strategy:
matrix:
ruby-version: ['2.7', '3.0', '3.1', '3.2', '3.3']
appraisal: ['faraday_1.x', 'faraday_2.x']

env:
BUNDLE_JOBS: 4
BUNDLE_GEMFILE: gemfiles/${{ matrix.appraisal }}.gemfile

steps:
- uses: actions/checkout@v4
with:
submodules: true

- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true # runs 'bundle install' and caches installed gems automatically

- name: Run tests
run: |
bundle exec rspec
bundle exec rubocop
bundle exec rake benchmark
16 changes: 16 additions & 0 deletions .github/workflows/fossa.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: FOSSA License Check

on:
pull_request:
push:
branches:
- master

jobs:
fossa-scan:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: fossas/fossa-action@main
with:
api-key: ${{ secrets.FOSSA_API_KEY }}
34 changes: 34 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Publish

on:
release:
types:
- published
workflow_dispatch:

permissions:
contents: read

jobs:
build:
name: Build + Publish
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.3

- name: Publish to RubyGems
run: |
mkdir -p $HOME/.gem
touch $HOME/.gem/credentials
chmod 0600 $HOME/.gem/credentials
printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
gem build *.gemspec
gem push *.gem
env:
GEM_HOST_API_KEY: "${{ secrets.RUBYGEMS_AUTH_TOKEN }}"
16 changes: 16 additions & 0 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: release-please

on:
push:
branches:
- master

permissions:
contents: write
pull-requests: write

jobs:
release-please:
runs-on: ubuntu-latest
steps:
- uses: google-github-actions/release-please-action@v4
3 changes: 3 additions & 0 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
".": "7.1.0"
}
46 changes: 0 additions & 46 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion Appraisals
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

appraise 'faraday_1.x' do
gem 'faraday', '~> 1.9'
gem 'faraday', '~> 1.10'
end

appraise 'faraday_2.x' do
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# MAuth-Client
[![Build Status](https://travis-ci.org/mdsol/mauth-client-ruby.svg?branch=master)](https://travis-ci.org/mdsol/mauth-client-ruby)

This gem consists of MAuth::Client, a class to manage the information needed to both sign and authenticate requests
and responses, and middlewares for Rack and Faraday which leverage the client's capabilities.
Expand Down
2 changes: 1 addition & 1 deletion gemfiles/faraday_1.x.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

source "https://rubygems.org"

gem "faraday", "~> 1.9"
gem "faraday", "~> 1.10"

group :development do
gem "appraisal", "~> 2.4"
Expand Down
10 changes: 10 additions & 0 deletions release-please-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"release-type": "ruby",
"include-component-in-tag": false,
"include-v-in-tag": true,
"packages": {
".": {
"package-name": "mauth-client"
}
}
}
2 changes: 1 addition & 1 deletion spec/client_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
require 'faraday'
require 'mauth/client'
require 'securerandom'
require_relative './support/shared_contexts/client'
require_relative 'support/shared_contexts/client'

describe MAuth::Client do
include_context 'client'
Expand Down

0 comments on commit 5142730

Please sign in to comment.