Skip to content

Commit

Permalink
Fix failing specs and replace TravisCI with GitHub Actions (#357)
Browse files Browse the repository at this point in the history
* Fix failing specs
* Add GitHub Actions CI workflow
* Remove TravisCI
* Replace TravisCI badge with GitHub Actions
* An older Ubuntu is needed for Ruby 2.2
* Adopt fix proposed by #356
  • Loading branch information
mattbrictson committed Jan 4, 2024
1 parent 34919d7 commit a94d6ed
Show file tree
Hide file tree
Showing 6 changed files with 46 additions and 11 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: CI
on:
pull_request:
push:
branches:
- master
jobs:
spec:
name: "RSpec / Ruby ${{ matrix.ruby }}"
runs-on: ubuntu-latest
strategy:
matrix:
ruby:
[
"2.3",
"2.4",
"2.5",
"2.6",
"2.7",
"3.0",
"3.1",
"3.2"
]
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- run: bundle exec rake spec
spec-legacy:
name: "RSpec / Ruby 2.2"
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.2
bundler-cache: true
- name: rake spec
run: bundle exec rake spec
7 changes: 0 additions & 7 deletions .travis.yml

This file was deleted.

3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# EM-HTTP-Request

[![Gem Version](https://badge.fury.io/rb/em-http-request.svg)](http://rubygems.org/gems/em-http-request) [![Build Status](https://travis-ci.org/igrigorik/em-http-request.svg)](https://travis-ci.org/igrigorik/em-http-request)
[![Gem Version](https://badge.fury.io/rb/em-http-request.svg)](http://rubygems.org/gems/em-http-request)
[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/igrigorik/em-http-request/ci.yml)](https://github.com/igrigorik/em-http-request/actions/workflows/ci.yml)

Async (EventMachine) HTTP client, with support for:

Expand Down
1 change: 1 addition & 0 deletions lib/em-http/http_connection.rb
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ def post_init
# the connection because we're processing invalid HTTP
@p.reset!
unbind
:stop
end
end

Expand Down
3 changes: 1 addition & 2 deletions spec/external_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,10 @@
end

it "should detect deflate encoding" do
# pending "need an endpoint which supports deflate.. MSN is no longer"
EventMachine.run {

options = {:head => {"accept-encoding" => "deflate"}, :redirects => 5}
http = EventMachine::HttpRequest.new('http://www.libpng.org/').get options
http = EventMachine::HttpRequest.new('https://www.bing.com/').get options

http.errback { failed(http) }
http.callback {
Expand Down
2 changes: 1 addition & 1 deletion spec/ssl_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

http.errback { failed(http) }
http.callback {
http.response_header.status.should == 302
http.response_header.status.should == 301
EventMachine.stop
}
}
Expand Down

0 comments on commit a94d6ed

Please sign in to comment.