app-engine-python 1.9.70
This commit is contained in:
parent
a8f9ba80e7
commit
34af3fe411
1 changed files with 35 additions and 3 deletions
|
@ -1,8 +1,8 @@
|
|||
class AppEnginePython < Formula
|
||||
desc "Google App Engine"
|
||||
homepage "https://cloud.google.com/appengine/docs"
|
||||
url "https://storage.googleapis.com/appengine-sdks/featured/google_appengine_1.9.67.zip"
|
||||
sha256 "f9f45150643424cb164185d9134b86511c2bec3001499247ef9027f1605ef8a3"
|
||||
url "https://storage.googleapis.com/appengine-sdks/featured/google_appengine_1.9.70.zip"
|
||||
sha256 "3675197df810f104bbbee0e97b1ab776ba2ebff8b99f241bd4c2c125c8ebdaa1"
|
||||
|
||||
bottle :unneeded
|
||||
|
||||
|
@ -20,7 +20,6 @@ class AppEnginePython < Formula
|
|||
download_appstats.py
|
||||
endpointscfg.py
|
||||
gen_protorpc.py
|
||||
google_sql.py
|
||||
php_cli.py
|
||||
remote_api_shell.py
|
||||
run_tests.py
|
||||
|
@ -29,4 +28,37 @@ class AppEnginePython < Formula
|
|||
bin.install_symlink share/name/fn
|
||||
end
|
||||
end
|
||||
|
||||
test do
|
||||
(testpath/"app.yaml").write <<~EOS
|
||||
runtime: python27
|
||||
api_version: 1
|
||||
threadsafe: true
|
||||
|
||||
handlers:
|
||||
- url: /.*
|
||||
script: main.app
|
||||
|
||||
EOS
|
||||
(testpath/"main.py").write <<~EOS
|
||||
import webapp2
|
||||
class MainPage(webapp2.RequestHandler):
|
||||
def get(self):
|
||||
self.response.headers['Content-Type'] = 'text/plain'
|
||||
self.response.write('Hello, World!')
|
||||
app = webapp2.WSGIApplication([
|
||||
('/', MainPage),
|
||||
], debug=True)
|
||||
EOS
|
||||
begin
|
||||
pid = fork do
|
||||
exec "#{pkgshare}/dev_appserver.py app.yaml --skip_sdk_update_check"
|
||||
end
|
||||
sleep 5
|
||||
output = shell_output("curl -s http://localhost:8080/")
|
||||
assert_equal "Hello, World!", output.chomp
|
||||
ensure
|
||||
Process.kill("HUP", pid)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue