Skip to content

Commit

Permalink
Merge pull request #56 from Scalingo/chore/misc
Browse files Browse the repository at this point in the history
  • Loading branch information
ksol authored Dec 28, 2023
2 parents d9afca1 + d68f530 commit c7779a6
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 14 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
## Unreleased

## 3.5.0 - 2023-12-28

* Change: update Faraday to 2.x, released about two years ago. The public API of this gem doesn't change, therefore this is not a major release. However, if you manipulate directly faraday's objects, you may encounter breaking changes. Refer to [Faraday's website](https://lostisland.github.io/faraday/) for how to migrate.
* Compat: drop support for Ruby < 3. The lib is still expected to work for the time being.
* Compat: include Ruby 3.3 in the test matrix

## 3.4.0 - 2023-01-26

Expand Down
2 changes: 1 addition & 1 deletion lib/scalingo/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module Scalingo
VERSION = "3.4.0"
VERSION = "3.5.0"
end
4 changes: 2 additions & 2 deletions spec/scalingo/auth/tokens_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
let(:arguments) { meta[:exchange][:valid] }
let(:stub_pattern) { "exchange-200" }

it "should be successful" do
it "is successful" do
expect(response).to be_successful
expect(response.data[:token]).to be_present
end
Expand All @@ -18,7 +18,7 @@
let(:arguments) { meta[:exchange][:invalid] }
let(:stub_pattern) { "exchange-401" }

it "should be rejected with an valid token" do
it "is rejected with an valid token" do
expect(response.status).to eq 401
end
end
Expand Down
19 changes: 8 additions & 11 deletions spec/support/shared.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
let(:expected_code) { code }
let(:custom_headers) { {"X-Custom-Header" => "custom"} }

it "should be successful" do
it "is successful" do
expect(response).to be_successful
expect(response.status).to eq code
end
Expand Down Expand Up @@ -66,7 +66,7 @@
let(:expected_type) { Object } unless method_defined?(:expected_type)
let(:expected_keys) { %i[id] } unless method_defined?(:expected_keys)

it "should be an object of the expected type (and if applicable, the expected keys)" do
it "is an object of the expected type (and if applicable, the expected keys)" do
expect(response.data).to be_a_kind_of(expected_type)

if response.data.respond_to?(:key?)
Expand All @@ -80,7 +80,7 @@
RSpec.shared_examples "an empty response" do |code = 204|
it_behaves_like "a successful response", code

it "should be empty" do
it "is empty" do
expect(response.data).to eq("")
end
end
Expand All @@ -92,15 +92,15 @@
let(:expected_type) { Object } unless method_defined?(:expected_type)
let(:expected_keys) { %i[id] } unless method_defined?(:expected_keys)

it "should be an array" do
it "is an array" do
expect(response.data).to be_a_kind_of(Array)
end

it "should have the number of expected elements" do
it "contains the number of expected elements" do
expect(response.data.size).to eq(expected_count)
end

it "items should be of the expected type (and if applicable, the expected keys)" do
it "items are of the expected type (and if applicable, the expected keys)" do
response.data.each do |item|
expect(item).to be_a_kind_of(expected_type)

Expand All @@ -114,16 +114,13 @@
end

RSpec.shared_examples "a paginated collection" do |code = 200|
it "should be paginated" do
it "is paginated" do
expect(response).to be_paginated
end
end

RSpec.shared_examples "a non-paginated collection" do |code = 200|
it "should not be paginated" do
it "is not paginated" do
expect(response).not_to be_paginated
end
end

RSpec.shared_examples "a method with a configurable request" do
end

0 comments on commit c7779a6

Please sign in to comment.