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
fa21183e
Commit
fa21183e
authored
Jun 30, 2015
by
Damien Mathieu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
json_file is undefined. Use USER_CONFIG
parent
6004416e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
1 deletion
+12
-1
headers.rb
scripts/config/lib/ngx_mruby/headers.rb
+1
-1
index.html
spec/fixtures/no_config/public_html/index.html
+1
-0
simple_spec.rb
spec/simple_spec.rb
+10
-0
No files found.
scripts/config/lib/ngx_mruby/headers.rb
View file @
fa21183e
...
@@ -4,7 +4,7 @@ eval(File.read('/app/bin/config/lib/nginx_config_util.rb'))
...
@@ -4,7 +4,7 @@ eval(File.read('/app/bin/config/lib/nginx_config_util.rb'))
USER_CONFIG
=
"/app/static.json"
USER_CONFIG
=
"/app/static.json"
config
=
{}
config
=
{}
config
=
JSON
.
parse
(
File
.
read
(
USER_CONFIG
))
if
File
.
exist?
(
json_file
)
config
=
JSON
.
parse
(
File
.
read
(
USER_CONFIG
))
if
File
.
exist?
(
USER_CONFIG
)
req
=
Nginx
::
Request
.
new
req
=
Nginx
::
Request
.
new
uri
=
req
.
var
.
uri
uri
=
req
.
var
.
uri
...
...
spec/fixtures/no_config/public_html/index.html
0 → 100644
View file @
fa21183e
Hello World
spec/simple_spec.rb
View file @
fa21183e
...
@@ -24,6 +24,16 @@ RSpec.describe "Simple" do
...
@@ -24,6 +24,16 @@ RSpec.describe "Simple" do
expect
(
response
.
body
.
chomp
).
to
eq
(
"Hello World"
)
expect
(
response
.
body
.
chomp
).
to
eq
(
"Hello World"
)
end
end
describe
"no config"
do
let
(
:name
)
{
"no_config"
}
it
"should serve out of public_html by default"
do
response
=
app
.
get
(
"/"
)
expect
(
response
.
code
).
to
eq
(
"200"
)
expect
(
response
.
body
.
chomp
).
to
eq
(
"Hello World"
)
end
end
describe
"root"
do
describe
"root"
do
let
(
:name
)
{
"different_root"
}
let
(
:name
)
{
"different_root"
}
...
...
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