Skip to content

Commit

Permalink
Merge pull request #368 from Earlopain/rack-3
Browse files Browse the repository at this point in the history
Make Rack 3 work OOTB
  • Loading branch information
zzak authored Nov 1, 2024
2 parents 7de756f + 208f475 commit cd75e36
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
5 changes: 2 additions & 3 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ source "https://rubygems.org"

gemspec

gem "rack"
gem "rack", "~> 3.0"
gem "rake"
gem "hoe"
gem "minitest"
Expand All @@ -13,5 +13,4 @@ if ENV["rdoc"] == "master"
end

gem "importmap-rails"
gem "railties", '>= 7.1'

gem "railties"
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,20 +70,20 @@ Please feel free to still report issues here for both projects, especially if yo
If you'd like to contribute you can generate the Rails main branch documentation by running:

```bash
rake test:rails
bundle exec rake test:rails
```

You can generate the Ruby default branch documentation by running:

```bash
rake test:ruby
bundle exec rake test:ruby
```

The generated documentation will be put into `doc/public` directory.
To view the just generated documentation start up a rack application by running:

```bash
rackup config.ru
bundle exec rackup config.ru
```

Then open http://localhost:9292 in the browser to view the documentation.
Expand Down
5 changes: 3 additions & 2 deletions config.ru
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,16 @@ unless Dir.exist?(root)
exit
end

require "rack/static"
use Rack::Static,
:urls => ["/files", "/images", "/js", "/css", "/panel", "/i", "/fonts", "/classes", "/ruby", "/rails"],
:root => root
run lambda { |env|
[
200,
{
'Content-Type' => 'text/html',
'Cache-Control' => 'public, max-age=86400'
'content-type' => 'text/html',
'cache-control' => 'public, max-age=86400'
},
File.open("#{root}/index.html", File::RDONLY)
]
Expand Down

0 comments on commit cd75e36

Please sign in to comment.