Skip to content

Commit

Permalink
Merge pull request #59 from substancelab/github-actions
Browse files Browse the repository at this point in the history
Replace Travis with GitHub Actions
  • Loading branch information
koppen authored Jun 2, 2023
2 parents d11905f + c260260 commit c482781
Show file tree
Hide file tree
Showing 5 changed files with 59 additions and 43 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# 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: Ruby

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

permissions:
contents: read

jobs:
test:

runs-on: ubuntu-latest
strategy:
matrix:
rails-version: ['5.2.5', '6.0.3.6', '6.1.3.1', 'main']
ruby-version: ['2.5', '2.6', '2.7', '3.0']
exclude:
- rails-version: 'main'
ruby-version: '2.5'
- rails-version: 'main'
ruby-version: '2.6'
- rails-version: '5.2.5'
ruby-version: '3.0'

env:
RAILS_VERSION: ${{ matrix.rails-version }}

steps:
- uses: actions/checkout@v3
- name: Set up Ruby
# To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
# change this to (see https://github.com/ruby/setup-ruby#versioning):
# uses: ruby/setup-ruby@v1
uses: ruby/setup-ruby@55283cc23133118229fd3f97f9336ee23a179fcf # v1.146.0
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- name: Run tests
run: bundle exec rake build
- name: Lint
run: bundle exec standardrb
32 changes: 0 additions & 32 deletions .travis.yml

This file was deleted.

12 changes: 6 additions & 6 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ gemspec
# Enable testing of multiple rails versions
rails_version = ENV["RAILS_VERSION"] || "default"
rails = case rails_version
when "main"
{github: "rails/rails", branch: "main"}
when "default"
">= 6.1.0"
else
"~> #{rails_version}"
when "main"
{github: "rails/rails", branch: "main"}
when "default"
">= 6.1.0"
else
"~> #{rails_version}"
end
gem "rails", rails
###############################################
Expand Down
2 changes: 0 additions & 2 deletions README.rdoc
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
= RouteDowncaser

{<img src="https://travis-ci.org/substancelab/route_downcaser.svg?branch=master" alt="Build Status" />}[https://travis-ci.org/substancelab/route_downcaser] {<img src="https://codeclimate.com/github/substancelab/route_downcaser/badges/gpa.svg" />}[https://codeclimate.com/github/substancelab/route_downcaser]

Makes routing in Rails case-insensitive (and other Rack-servers like Sinatra)

This gem hooks into the Rack middleware of Rails. This way all paths are downcased before dispatching to Rails' routing mechanism. Querystring parameters and asset paths are not changed in any way.
Expand Down
5 changes: 2 additions & 3 deletions route_downcaser.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,11 @@ Gem::Specification.new do |s|
s.homepage = "https://github.com/carstengehling/route_downcaser"
s.summary = "Makes routing in Rails case-insensitive"
s.description =
"This gem hooks into the Rack middleware of Rails. This way all paths are "\
"downcased before dispatching to Rails' routing mechanism. Querystring "\
"This gem hooks into the Rack middleware of Rails. This way all paths are " \
"downcased before dispatching to Rails' routing mechanism. Querystring " \
"parameters are not changed in any way."

s.files = Dir["{lib}/**/*"] + ["MIT-LICENSE", "Rakefile", "README.rdoc"]
s.test_files = Dir["test/**/*"]
s.add_runtime_dependency "activesupport", ">= 3.2"
s.add_development_dependency "standard"
end

0 comments on commit c482781

Please sign in to comment.