Skip to content

Commit cd75e36

Browse files
authored
Merge pull request #368 from Earlopain/rack-3
Make Rack 3 work OOTB
2 parents 7de756f + 208f475 commit cd75e36

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

Gemfile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ source "https://rubygems.org"
22

33
gemspec
44

5-
gem "rack"
5+
gem "rack", "~> 3.0"
66
gem "rake"
77
gem "hoe"
88
gem "minitest"
@@ -13,5 +13,4 @@ if ENV["rdoc"] == "master"
1313
end
1414

1515
gem "importmap-rails"
16-
gem "railties", '>= 7.1'
17-
16+
gem "railties"

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,20 +70,20 @@ Please feel free to still report issues here for both projects, especially if yo
7070
If you'd like to contribute you can generate the Rails main branch documentation by running:
7171

7272
```bash
73-
rake test:rails
73+
bundle exec rake test:rails
7474
```
7575

7676
You can generate the Ruby default branch documentation by running:
7777

7878
```bash
79-
rake test:ruby
79+
bundle exec rake test:ruby
8080
```
8181

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

8585
```bash
86-
rackup config.ru
86+
bundle exec rackup config.ru
8787
```
8888

8989
Then open http://localhost:9292 in the browser to view the documentation.

config.ru

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,16 @@ unless Dir.exist?(root)
1515
exit
1616
end
1717

18+
require "rack/static"
1819
use Rack::Static,
1920
:urls => ["/files", "/images", "/js", "/css", "/panel", "/i", "/fonts", "/classes", "/ruby", "/rails"],
2021
:root => root
2122
run lambda { |env|
2223
[
2324
200,
2425
{
25-
'Content-Type' => 'text/html',
26-
'Cache-Control' => 'public, max-age=86400'
26+
'content-type' => 'text/html',
27+
'cache-control' => 'public, max-age=86400'
2728
},
2829
File.open("#{root}/index.html", File::RDONLY)
2930
]

0 commit comments

Comments
 (0)