Skip to content
This repository was archived by the owner on Oct 31, 2023. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: CI

on: [push,pull_request]

jobs:
build:
strategy:
fail-fast: false
matrix:
ruby: ['1.9.3', 2.0, 2.1, 2.2, 2.3, 2.4, 2.5, 2.6, 2.7, 3.0, head, jruby, truffleruby]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Run the default task
run: |
bundle exec rake
9 changes: 4 additions & 5 deletions middleware.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,10 @@ Gem::Specification.new do |gem|
gem.license = "MIT"

gem.add_development_dependency "rake"
gem.add_development_dependency "redcarpet", "~> 2.1.0"
gem.add_development_dependency "rspec-core", "~> 2.8.0"
gem.add_development_dependency "rspec-expectations", "~> 2.8.0"
gem.add_development_dependency "rspec-mocks", "~> 2.8.0"
gem.add_development_dependency "yard", "~> 0.7.5"
gem.add_development_dependency "rspec-core", "~> 3.10.0"
gem.add_development_dependency "rspec-expectations", "~> 3.10.0"
gem.add_development_dependency "rspec-mocks", "~> 3.10.0"
gem.add_development_dependency "yard", "~> 0.9"

gem.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
gem.files = `git ls-files`.split("\n")
Expand Down
2 changes: 1 addition & 1 deletion spec/middleware/runner_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ def initialize(app); @app = app; end

env = {}
instance = described_class.new([a, b, c])
expect { instance.call(env) }.to raise_error
expect { instance.call(env) }.to raise_error(RuntimeError)

data.should == ["a", "b", "e"]
end
Expand Down
4 changes: 3 additions & 1 deletion spec/setup.rb
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
require "rubygems"
require "rspec/autorun"

# Do not buffer output
$stdout.sync = true
$stderr.sync = true

# Configure RSpec
RSpec.configure do |c|
c.expect_with :rspec do |expectations|
expectations.syntax = [:should, :expect] # Both syntax are used so we need to explicitly set this to suppress warnings
end
end