Skip to content
Merged
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
4 changes: 3 additions & 1 deletion .github/workflows/check_changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Check that CHANGELOG is touched
run: |
cat $GITHUB_EVENT_PATH | jq .pull_request.title | grep -i '\[\(\(changelog skip\)\|\(ci skip\)\)\]' || git diff remotes/origin/${{ github.base_ref }} --name-only | grep CHANGELOG.md
24 changes: 24 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: CI

on:
push:

jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ruby-version: ['3.1', '3.2', '3.3', '3.4', '4.0']

steps:
- uses: actions/checkout@v6

- name: Set up Ruby ${{ matrix.ruby-version }}
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true

- name: Run tests
run: bundle exec rake
6 changes: 0 additions & 6 deletions .travis.yml

This file was deleted.

6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
## 0.1.3
## HEAD (unreleased)

- Migrate from TravisCI to GitHub Actions

- ## 0.1.3

- Fix `base64` deprecation warning for Ruby 3.4 (https://github.com/interagent/heroics/pull/107)

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![Build Status](https://travis-ci.org/interagent/heroics.png?branch=master)](https://travis-ci.org/interagent/heroics)
[![CI](https://github.com/interagent/heroics/actions/workflows/ci.yml/badge.svg)](https://github.com/interagent/heroics/actions/workflows/ci.yml)
# Heroics

Ruby HTTP client generator for APIs represented with JSON schema.
Expand Down
6 changes: 2 additions & 4 deletions test/client_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,7 @@ def test_invalid_resource
error = assert_raises NoMethodError do
client.unknown
end
assert_equal("undefined method `unknown' for " +
'#<Heroics::Client url="http://example.com">',
error.message)
assert_match(/undefined method `unknown' for #<Heroics::Client url="http:\/\/example\.com">/, error.message)
end

# Client.<resource>.<link> finds the appropriate link and invokes it.
Expand Down Expand Up @@ -55,7 +53,7 @@ def test_resource_with_query_param
client = Heroics::Client.new({'resource' => resource},
'http://example.com')
Excon.stub(method: :get) do |request|
assert_equal({:limit => '50', :page => '25'}, request[:query])
assert_equal("limit=50&page=25", request[:query])
Excon.stubs.pop
{status: 200, body: 'Hello, world!'}
end
Expand Down