Skip to content

Commit

Permalink
Update Rack::Builder.parse_file syntax
Browse files Browse the repository at this point in the history
This now returns an instance of `PrometheusExporter::Middleware`
directly, instead of inside an array
  • Loading branch information
yndajas committed Jul 30, 2024
1 parent 538b0f9 commit 5616fb1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/benchmark/all.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def initialize(number_of_runs)
end

def app
@app ||= Rack::Builder.parse_file("config.ru")[0]
@app ||= Rack::Builder.parse_file("config.ru")
end

def run!
Expand Down
4 changes: 2 additions & 2 deletions spec/features/http_request_handling_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
subject { last_response }

def app
Rack::Builder.parse_file("config.ru")[0]
Rack::Builder.parse_file("config.ru")
end

let(:department_of_health) do
Expand Down Expand Up @@ -896,7 +896,7 @@ def app
# In dev (but not production), CommonLogger middleware is in use, which expects
# us not to violate the Rack spec. Part of this is not allowing nil query strings,
# which at time of writing optic14n does.
let(:app) { Rack::CommonLogger.new(Rack::Builder.parse_file("config.ru")[0]) }
let(:app) { Rack::CommonLogger.new(Rack::Builder.parse_file("config.ru")) }

describe "Nil querystrings do not faze us" do
before do
Expand Down
2 changes: 1 addition & 1 deletion spec/performance/benchmark_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
include Rack::Test::Methods

def app
Rack::Builder.parse_file("config.ru")[0]
Rack::Builder.parse_file("config.ru")
end

let(:number_of_runs) { ENV["NUMBER_OF_RUNS"] || 1000 }
Expand Down

0 comments on commit 5616fb1

Please sign in to comment.