Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Rack apps for 1.9.2 #63

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/sproutcore/rack/builder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ def not_found(reason)
return [404, {
"Content-Type" => "text/html",
"Content-Length" => reason.size.to_s
}, reason]
}, [reason]]
end

# Reloads the project if reloading is enabled. At maximum this will
Expand Down
8 changes: 4 additions & 4 deletions lib/sproutcore/rack/dev.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ def call(env)
url = env['PATH_INFO']
case url
when '/sc/targets.json' # returns description of targets
return [200, {}, get_targets_json]
return [200, {}, [get_targets_json]]

when '/sc/greenhouseconf.json' #returns json of all valid design objects
return [200, {}, get_greenhouse_configs(env)]
return [200, {}, [get_greenhouse_configs(env)]]
else
return [404, {}, "not found"]
return [404, {}, ["not found"]]
end

return [404, {}, "not found"]
return [404, {}, ["not found"]]
end

def get_targets_json
Expand Down
4 changes: 2 additions & 2 deletions lib/sproutcore/rack/filesystem.rb
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def call(env)
body = rqust.body.read()
path = env["PATH_INFO"]

return [404, {}, "not found"] unless path =~ regex
return [404, {}, ["not found"]] unless path =~ regex

path = path.sub regex, '' # remove path prefix
action = params['action']
Expand Down Expand Up @@ -292,7 +292,7 @@ def forbidden(body)
end

def success(msg)
[ 200, { 'Content-Type' => 'text/html' }, msg ]
[ 200, { 'Content-Type' => 'text/html' }, [msg] ]
end

def with_modifiable_path(path)
Expand Down
2 changes: 1 addition & 1 deletion lib/sproutcore/rack/proxy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def call(env)
end
end

return [404, {}, "not found"]
return [404, {}, ["not found"]]
end

def chunked?(headers)
Expand Down
2 changes: 1 addition & 1 deletion lib/sproutcore/rack/test_runner.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def initialize(project)
end

def call(env)
return [404, {}, "not found"]
return [404, {}, ["not found"]]
end
end
end
Expand Down