Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
H
heroku-buildpack-static
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Python-Dev
heroku-buildpack-static
Commits
995b07c1
Commit
995b07c1
authored
Jun 14, 2017
by
Terence Lee
Committed by
GitHub
Jun 14, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #78 from heroku/json_mime_type
add json mime type
parents
2a49e823
1d5a6ad3
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
0 deletions
+19
-0
mime.types
scripts/config/templates/mime.types
+1
-0
static.json
spec/fixtures/mime_types_json/static.json
+3
-0
foo.json
spec/fixtures/mime_types_json/www/foo.json
+3
-0
simple_spec.rb
spec/simple_spec.rb
+12
-0
No files found.
scripts/config/templates/mime.types
View file @
995b07c1
...
...
@@ -24,6 +24,7 @@ types {
image/svg+xml svg;
application/java-archive jar war ear;
application/json json;
application/mac-binhex40 hqx;
application/msword doc;
application/pdf pdf;
...
...
spec/fixtures/mime_types_json/static.json
0 → 100644
View file @
995b07c1
{
"root"
:
"www"
}
spec/fixtures/mime_types_json/www/foo.json
0 → 100644
View file @
995b07c1
{
"foo"
:
"bar"
}
spec/simple_spec.rb
View file @
995b07c1
...
...
@@ -32,6 +32,18 @@ RSpec.describe "Simple" do
expect
(
response
.
body
.
chomp
).
to
eq
(
"Hello World"
)
end
describe
"mime/types"
do
let
(
:name
)
{
"mime_types_json"
}
context
"json"
do
it
"should serve json as application/json content type"
do
response
=
app
.
get
(
"/foo.json"
)
expect
(
response
.
code
).
to
eq
(
"200"
)
expect
(
response
[
"Content-Type"
]).
to
eq
(
"application/json"
)
end
end
end
describe
"no config"
do
let
(
:name
)
{
"no_config"
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment