diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..81eb570 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -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`) diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..ba2bcd6 --- /dev/null +++ b/.github/dependabot.yml @@ -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 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..3ea96a6 --- /dev/null +++ b/.github/workflows/ci.yml @@ -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 diff --git a/.github/workflows/fossa.yml b/.github/workflows/fossa.yml new file mode 100644 index 0000000..db16cb7 --- /dev/null +++ b/.github/workflows/fossa.yml @@ -0,0 +1,17 @@ +name: FOSSA License Check + +on: + push: + # branches: + # - master + pull_request: + +jobs: + fossa-scan: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: mdsol/fossa_ci_scripts@main + env: + FOSSA_API_KEY: ${{ secrets.FOSSA_API_KEY }} + FOSSA_FAIL_BUILD: false diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..b1bc89c --- /dev/null +++ b/.github/workflows/publish.yml @@ -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 }}" diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml new file mode 100644 index 0000000..7393069 --- /dev/null +++ b/.github/workflows/release-please.yml @@ -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 diff --git a/.release-please-manifest.json b/.release-please-manifest.json new file mode 100644 index 0000000..58ef57e --- /dev/null +++ b/.release-please-manifest.json @@ -0,0 +1,3 @@ +{ + ".": "7.1.0" +} diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 9c2fed5..0000000 --- a/.travis.yml +++ /dev/null @@ -1,46 +0,0 @@ -dist: focal -language: ruby -cache: bundler - -rvm: - - 2.7 - - 3.0 - - 3.1 - - 3.2 - -env: - global: - - BUNDLE_JOBS=4 - -gemfile: - - gemfiles/faraday_1.x.gemfile - - gemfiles/faraday_2.x.gemfile - -before_install: - - gem update --system -N > /dev/null && echo "Rubygems version $(gem --version)" && bundle --version - -install: - - bundle install - - >- - curl -H 'Cache-Control: no-cache' - https://raw.githubusercontent.com/mdsol/fossa_ci_scripts/main/travis_ci/fossa_install.sh | - bash -s -- -b $TRAVIS_BUILD_DIR - -script: - - bundle exec rspec - - bundle exec rubocop - - bundle exec rake benchmark - - >- - curl -H 'Cache-Control: no-cache' - https://raw.githubusercontent.com/mdsol/fossa_ci_scripts/main/travis_ci/fossa_run.sh | - bash -s -- -b $TRAVIS_BUILD_DIR - -deploy: - provider: rubygems - gem: mauth-client - api_key: - secure: QDp0P/lMGLYc4+A3M6VD9y551X6GrGwOSBE6xSG4lE6mPXoSISK5Yj18vNWQRQuQ4BsE6CdfZ/xsPjSRDda6b+yUQbgisjJ+Ry6jUVE1v9UKTZ0VHgHyXcsaJFC29tBKBeuGCj0AD5qhbTO1+ybeZSUfdSeVVoidD4W/bSnvzlT1Lht7IE8jbHbR57LsJKoEaDxKu33dg4CYV96xrlYGxHAS2UgEgi5Ve3ohzBWkX9RWF/wWoGCzIYhJBzXgCEEFw8iWkspjTePgv9yjD2HIMtF44aiSTHM5iqBBsYJ7A8+kUwoq7+srsashHZ1wZz1YulsCSkjwM9AXZ4E0f9AnERw/RQ5gG7bCuHZtSG9g/0SWBQeNfkAF3An6eTSS24KVfnarGdH2bk0G28k2oP26MWiDKz8nlQxNAY4rH+dITael18bgf45H4KccQqiooBEGnuYpUAuIPB+1l+BsIcRQnrU3LDtmtZn0KrCHHJ7EHOdogOG+/Pxof8ht1xF7V+HYhhzSRJs2JkvmZsp4q2T7W6b6kfi59Cz3LpqA1HHYcL5/OFZeLA/TlCNke0CRMxG8k3udDKj50jqFATXEa8lNyGLjmWh7tL9Bb/uy+CU47qUdx+V4K+kheAvNFtHfpxmyUGJSY0FH02H1VBPWm10DZ7kH+6jgCKyXuql+yWDw62s= - on: - tags: true - repo: mdsol/mauth-client-ruby - condition: $TRAVIS_RUBY_VERSION == 3.2 && $BUNDLE_GEMFILE == $TRAVIS_BUILD_DIR/gemfiles/faraday_2.x.gemfile diff --git a/Appraisals b/Appraisals index 4f94f48..cebbb59 100644 --- a/Appraisals +++ b/Appraisals @@ -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 diff --git a/README.md b/README.md index e91c2a1..d01c796 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/gemfiles/faraday_1.x.gemfile b/gemfiles/faraday_1.x.gemfile index 6cfbcf0..19559ee 100644 --- a/gemfiles/faraday_1.x.gemfile +++ b/gemfiles/faraday_1.x.gemfile @@ -2,7 +2,7 @@ source "https://rubygems.org" -gem "faraday", "~> 1.9" +gem "faraday", "~> 1.10" group :development do gem "appraisal", "~> 2.4" diff --git a/release-please-config.json b/release-please-config.json new file mode 100644 index 0000000..1f4efed --- /dev/null +++ b/release-please-config.json @@ -0,0 +1,10 @@ +{ + "release-type": "ruby", + "include-component-in-tag": false, + "include-v-in-tag": true, + "packages": { + ".": { + "package-name": "mauth-client" + } + } +} diff --git a/spec/client_spec.rb b/spec/client_spec.rb index 64e5d63..8f1ece2 100644 --- a/spec/client_spec.rb +++ b/spec/client_spec.rb @@ -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'