Skip to content

Commit

Permalink
Support Rack 3 (#607)
Browse files Browse the repository at this point in the history
* Replace `Rack::File` with `Rack::Files`

`Rack::Files` exists since Rack 2.1. Depend on rack explicitly
  • Loading branch information
tricknotes authored Feb 1, 2024
1 parent bd12323 commit 17339b1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions ember-cli-rails.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Gem::Specification.new do |spec|

spec.add_dependency "ember-cli-rails-assets", ">= 0.6.2", "< 1.0"
spec.add_dependency "railties", ">= 4.2"
spec.add_dependency "rack", ">= 2.1", "< 4.0"
spec.add_dependency "terrapin", "~> 0.6.0"
spec.add_dependency "html_page", "~> 0.1.0"

Expand Down
2 changes: 1 addition & 1 deletion lib/ember_cli/deploy/file.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def mountable?
end

def to_rack
Rack::File.new(app.dist_path.to_s, rack_headers)
Rack::Files.new(app.dist_path.to_s, rack_headers)
end

def index_html
Expand Down
2 changes: 1 addition & 1 deletion spec/lib/ember_cli/deploy/file_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
end

describe "#to_rack" do
it "creates a Rack::File instance" do
it "creates a Rack::Files instance" do
deploy = EmberCli::Deploy::File.new(build_app)

rack_app = deploy.to_rack
Expand Down

0 comments on commit 17339b1

Please sign in to comment.