Skip to content

Commit

Permalink
chore(rack3): Get remaing specs passing
Browse files Browse the repository at this point in the history
  • Loading branch information
rholshausen committed Jan 23, 2025
1 parent 07e99db commit 42a3d8a
Show file tree
Hide file tree
Showing 43 changed files with 59 additions and 45 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ gem "conventional-changelog", "~>1.3"
gem "bump", "~> 0.5"
gem "padrino-core", ">= 0.16.0.pre3", require: false
gem 'rackup', '~> 2.2'
# gem "sinatra", "~> 3.0", require: false

group :development do
gem "pry-byebug"
Expand All @@ -36,6 +35,7 @@ group :test do
gem "tzinfo", "~>2.0"
gem "faraday-retry", "~>2.0"
gem "openapi_first", "~>2.2"
gem "webrick"
end

group :pg, optional: true do
Expand Down
1 change: 0 additions & 1 deletion pact_broker.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ Gem::Specification.new do |gem|
gem.add_runtime_dependency "reform", "~> 2.6"
gem.add_runtime_dependency "sequel", "~> 5.28"
gem.add_runtime_dependency "webmachine", ">= 2.0.0.beta", "< 3.0"
# gem.add_runtime_dependency "webrick", "~> 1.8" # webmachine requires webrick, but doesn't declare it as a dependency :shrug:
gem.add_runtime_dependency "semver2", "~> 3.4.2"
gem.add_runtime_dependency "rack", "~> 3.1"
gem.add_runtime_dependency "redcarpet", ">= 3.5.1", "~>3.5"
Expand Down
2 changes: 1 addition & 1 deletion spec/features/create_webhook_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
method: "POST",
url: "https://example.org",
headers: {
:"Content-Type" => "application/json"
:"content-type" => "application/json"
},
body: {
a: "body"
Expand Down
8 changes: 8 additions & 0 deletions spec/features/get_provider_pacts_for_verification_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@
}
end

before do
Approvals.configure do |config|
config.excluded_json_keys = {
:date => /date/
}
end
end

subject { get(path, query) }

context "when the provider exists" do
Expand Down
8 changes: 8 additions & 0 deletions spec/features/publish_pact_all_in_one_approval_spec.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
RSpec.describe "publishing a pact using the all in one endpoint" do
before do
Approvals.configure do |config|
config.excluded_json_keys = {
:date => /date/
}
end
end

# TODO merge branches
let(:request_body_hash) do
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"headers": {
"content-type": "application/hal+json;charset=utf-8",
"content-length": "2071",
"date": "Wed, 01 Sep 2021 00:07:21 GMT",
"date": "<date>",
"server": "Webmachine-Ruby/2.0.1 Rack/3.1.8"
},
"body": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"headers": {
"access-control-allow-methods": "GET, PUT, PATCH, DELETE, OPTIONS",
"content-length": "0",
"date": "Wed, 01 Sep 2021 00:07:21 GMT",
"date": "<date>",
"server": "Webmachine-Ruby/2.0.1 Rack/3.1.8"
},
"body": ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"headers": {
"content-type": "application/hal+json;charset=utf-8",
"content-length": "2133",
"date": "Wed, 01 Sep 2021 00:07:21 GMT",
"date": "<date>",
"server": "Webmachine-Ruby/2.0.1 Rack/3.1.8"
},
"body": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"headers": {
"content-type": "application/hal+json;charset=utf-8",
"content-length": "2133",
"date": "Wed, 01 Sep 2021 00:07:21 GMT",
"date": "<date>",
"server": "Webmachine-Ruby/2.0.1 Rack/3.1.8"
},
"body": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"headers": {
"access-control-allow-methods": "POST, OPTIONS",
"content-length": "0",
"date": "Wed, 01 Sep 2021 00:07:21 GMT",
"date": "<date>",
"server": "Webmachine-Ruby/2.0.1 Rack/3.1.8"
},
"body": ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"headers": {
"content-type": "application/hal+json;charset=utf-8",
"content-length": "1217",
"date": "Wed, 01 Sep 2021 00:07:21 GMT",
"date": "<date>",
"server": "Webmachine-Ruby/2.0.1 Rack/3.1.8"
},
"body": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"headers": {
"access-control-allow-methods": "POST, OPTIONS",
"content-length": "0",
"date": "Wed, 01 Sep 2021 00:07:21 GMT",
"date": "<date>",
"server": "Webmachine-Ruby/2.0.1 Rack/3.1.8"
},
"body": ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"headers": {
"content-type": "application/hal+json;charset=utf-8",
"content-length": "1109",
"date": "Wed, 01 Sep 2021 00:07:21 GMT",
"date": "<date>",
"server": "Webmachine-Ruby/2.0.1 Rack/3.1.8"
},
"body": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"content-type": "text/plain;charset=utf-8",
"vary": "Accept",
"content-length": "4",
"date": "Wed, 01 Sep 2021 00:07:21 GMT",
"date": "<date>",
"server": "Webmachine-Ruby/2.0.1 Rack/3.1.8"
},
"body": "logs"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"headers": {
"access-control-allow-methods": "GET, OPTIONS",
"content-length": "0",
"date": "Wed, 01 Sep 2021 00:07:21 GMT",
"date": "<date>",
"server": "Webmachine-Ruby/2.0.1 Rack/3.1.8"
},
"body": ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"headers": {
"content-type": "application/hal+json;charset=utf-8",
"content-length": "496",
"date": "Wed, 01 Sep 2021 00:07:21 GMT",
"date": "<date>",
"server": "Webmachine-Ruby/2.0.1 Rack/3.1.8"
},
"body": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"headers": {
"access-control-allow-methods": "POST, GET, OPTIONS",
"content-length": "0",
"date": "Wed, 01 Sep 2021 00:07:21 GMT",
"date": "<date>",
"server": "Webmachine-Ruby/2.0.1 Rack/3.1.8"
},
"body": ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"headers": {
"content-type": "application/hal+json;charset=utf-8",
"content-length": "913",
"date": "Wed, 01 Sep 2021 00:07:21 GMT",
"date": "<date>",
"server": "Webmachine-Ruby/2.0.1 Rack/3.1.8"
},
"body": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"headers": {
"access-control-allow-methods": "GET, OPTIONS",
"content-length": "0",
"date": "Wed, 01 Sep 2021 00:07:21 GMT",
"date": "<date>",
"server": "Webmachine-Ruby/2.0.1 Rack/3.1.8"
},
"body": ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"headers": {
"content-type": "application/hal+json;charset=utf-8",
"content-length": "287",
"date": "Wed, 01 Sep 2021 00:07:21 GMT",
"date": "<date>",
"server": "Webmachine-Ruby/2.0.1 Rack/3.1.8"
},
"body": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"headers": {
"access-control-allow-methods": "GET, OPTIONS",
"content-length": "0",
"date": "Wed, 01 Sep 2021 00:07:21 GMT",
"date": "<date>",
"server": "Webmachine-Ruby/2.0.1 Rack/3.1.8"
},
"body": ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"headers": {
"content-type": "application/hal+json;charset=utf-8",
"content-length": "1146",
"date": "Wed, 01 Sep 2021 00:07:21 GMT",
"date": "<date>",
"server": "Webmachine-Ruby/2.0.1 Rack/3.1.8"
},
"body": {
Expand All @@ -32,7 +32,7 @@
"method": "POST",
"url": "https://example.org/webhook",
"headers": {
"Content-Type": "application/json"
"content-type": "application/json"
},
"body": {
"pactUrl": "${pactbroker.pactUrl}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"headers": {
"access-control-allow-methods": "GET, PUT, DELETE, OPTIONS",
"content-length": "0",
"date": "Wed, 01 Sep 2021 00:07:21 GMT",
"date": "<date>",
"server": "Webmachine-Ruby/2.0.1 Rack/3.1.8"
},
"body": ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"headers": {
"content-type": "application/hal+json;charset=utf-8",
"content-length": "804",
"date": "Wed, 01 Sep 2021 00:07:21 GMT",
"date": "<date>",
"server": "Webmachine-Ruby/2.0.1 Rack/3.1.8"
},
"body": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"headers": {
"content-type": "application/hal+json;charset=utf-8",
"content-length": "296",
"date": "Wed, 01 Sep 2021 00:07:21 GMT",
"date": "<date>",
"server": "Webmachine-Ruby/2.0.1 Rack/3.1.8"
},
"body": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"headers": {
"access-control-allow-methods": "POST, GET, OPTIONS",
"content-length": "0",
"date": "Wed, 01 Sep 2021 00:07:21 GMT",
"date": "<date>",
"server": "Webmachine-Ruby/2.0.1 Rack/3.1.8"
},
"body": ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"headers": {
"content-type": "application/hal+json;charset=utf-8",
"content-length": "479",
"date": "Wed, 01 Sep 2021 00:07:21 GMT",
"date": "<date>",
"server": "Webmachine-Ruby/2.0.1 Rack/3.1.8"
},
"body": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"headers": {
"access-control-allow-methods": "POST, GET, OPTIONS",
"content-length": "0",
"date": "Wed, 01 Sep 2021 00:07:21 GMT",
"date": "<date>",
"server": "Webmachine-Ruby/2.0.1 Rack/3.1.8"
},
"body": ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"headers": {
"content-type": "application/hal+json;charset=utf-8",
"content-length": "296",
"date": "Wed, 01 Sep 2021 00:07:21 GMT",
"date": "<date>",
"server": "Webmachine-Ruby/2.0.1 Rack/3.1.8"
},
"body": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"headers": {
"access-control-allow-methods": "POST, GET, OPTIONS",
"content-length": "0",
"date": "Wed, 01 Sep 2021 00:07:21 GMT",
"date": "<date>",
"server": "Webmachine-Ruby/2.0.1 Rack/3.1.8"
},
"body": ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"headers": {
"content-type": "application/hal+json;charset=utf-8",
"content-length": "427",
"date": "Wed, 01 Sep 2021 00:07:21 GMT",
"date": "<date>",
"server": "Webmachine-Ruby/2.0.1 Rack/3.1.8"
},
"body": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"headers": {
"access-control-allow-methods": "GET, POST, OPTIONS",
"content-length": "0",
"date": "Wed, 01 Sep 2021 00:07:21 GMT",
"date": "<date>",
"server": "Webmachine-Ruby/2.0.1 Rack/3.1.8"
},
"body": ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"content-type": "application/hal+json;charset=utf-8",
"location": "https://pact-broker/webhooks/dCGCl-Ba3PqEFJ_iE9mJkQ",
"content-length": "762",
"date": "Wed, 01 Sep 2021 00:07:21 GMT",
"date": "<date>",
"server": "Webmachine-Ruby/2.0.1 Rack/3.1.8"
},
"body": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"headers": {
"content-type": "application/hal+json;charset=utf-8",
"content-length": "1385",
"date": "Wed, 01 Sep 2021 00:07:21 GMT",
"date": "<date>",
"server": "Webmachine-Ruby/2.0.1 Rack/3.1.8"
},
"body": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"headers": {
"access-control-allow-methods": "GET, OPTIONS",
"content-length": "0",
"date": "Wed, 01 Sep 2021 00:07:21 GMT",
"date": "<date>",
"server": "Webmachine-Ruby/2.0.1 Rack/3.1.8"
},
"body": ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"headers": {
"content-type": "application/hal+json;charset=utf-8",
"content-length": "840",
"date": "Thu, 23 Jan 2025 01:18:37 GMT",
"date": "<date>",
"server": "Webmachine-Ruby/2.0.1 Rack/3.1.8"
},
"body": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"headers": {
"content-type": "application/hal+json;charset=utf-8",
"content-length": "3192",
"date": "Thu, 23 Jan 2025 01:18:39 GMT",
"date": "<date>",
"server": "Webmachine-Ruby/2.0.1 Rack/3.1.8"
},
"body": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"headers": {
"content-type": "application/hal+json;charset=utf-8",
"content-length": "2941",
"date": "Thu, 23 Jan 2025 01:18:39 GMT",
"date": "<date>",
"server": "Webmachine-Ruby/2.0.1 Rack/3.1.8"
},
"body": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"headers": {
"content-type": "application/hal+json;charset=utf-8",
"content-length": "2921",
"date": "Thu, 23 Jan 2025 01:18:39 GMT",
"date": "<date>",
"server": "Webmachine-Ruby/2.0.1 Rack/3.1.8"
},
"body": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"headers": {
"content-type": "application/hal+json;charset=utf-8",
"content-length": "2880",
"date": "Thu, 23 Jan 2025 01:18:39 GMT",
"date": "<date>",
"server": "Webmachine-Ruby/2.0.1 Rack/3.1.8"
},
"body": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"headers": {
"content-type": "application/hal+json;charset=utf-8",
"content-length": "54",
"date": "Thu, 23 Jan 2025 01:18:39 GMT",
"date": "<date>",
"server": "Webmachine-Ruby/2.0.1 Rack/3.1.8"
},
"body": {
Expand Down
Loading

0 comments on commit 42a3d8a

Please sign in to comment.