Skip to content

Commit

Permalink
Merge pull request #155 from progrium/josegonzalez-herokuish-3.1
Browse files Browse the repository at this point in the history
Update herokuish to 0.3.1 release
  • Loading branch information
josegonzalez committed Jul 13, 2015
2 parents 8582988 + 7875dc3 commit a6b7a64
Show file tree
Hide file tree
Showing 21 changed files with 172 additions and 251 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM progrium/cedarish:cedar14

RUN curl https://github.com/gliderlabs/herokuish/releases/download/v0.3.0/herokuish_0.3.0_linux_x86_64.tgz \
RUN curl https://github.com/gliderlabs/herokuish/releases/download/v0.3.1/herokuish_0.3.1_linux_x86_64.tgz \
--silent -L | tar -xzC /bin

# install herokuish supported buildpacks and entrypoints
Expand Down
2 changes: 1 addition & 1 deletion test/features/apps/play/Procfile
Original file line number Diff line number Diff line change
@@ -1 +1 @@
web: play run --http.port=$PORT $PLAY_OPTS
web: target/universal/stage/bin/exampleapp -Dhttp.port=$PORT
10 changes: 4 additions & 6 deletions test/features/apps/play/app/controllers/Application.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,12 @@
import play.*;
import play.mvc.*;

import java.util.*;

import models.*;
import views.html.*;

public class Application extends Controller {

public static void index() {
render();
public static Result index() {
return ok("play\n");
}

}
}
1 change: 0 additions & 1 deletion test/features/apps/play/app/views/Application/index.html

This file was deleted.

19 changes: 0 additions & 19 deletions test/features/apps/play/app/views/errors/404.html

This file was deleted.

21 changes: 0 additions & 21 deletions test/features/apps/play/app/views/errors/500.html

This file was deleted.

7 changes: 7 additions & 0 deletions test/features/apps/play/app/views/index.scala.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
@(message: String)

@main("Welcome to Play") {

@play20.welcome(message, style = "Java")

}
15 changes: 15 additions & 0 deletions test/features/apps/play/app/views/main.scala.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
@(title: String)(content: Html)

<!DOCTYPE html>

<html>
<head>
<title>@title</title>
<link rel="stylesheet" media="screen" href="@routes.Assets.at("stylesheets/main.css")">
<link rel="shortcut icon" type="image/png" href="@routes.Assets.at("images/favicon.png")">
<script src="@routes.Assets.at("javascripts/jquery-1.9.0.min.js")" type="text/javascript"></script>
</head>
<body>
@content
</body>
</html>
11 changes: 11 additions & 0 deletions test/features/apps/play/build.sbt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name := "exampleApp"

version := "1.0-SNAPSHOT"

libraryDependencies ++= Seq(
javaJdbc,
javaEbean,
cache
)

play.Project.playJavaSettings
231 changes: 42 additions & 189 deletions test/features/apps/play/conf/application.conf
Original file line number Diff line number Diff line change
@@ -1,216 +1,69 @@
# This is the main configuration file for the application.
# ~~~~~
application.name=devcenter-play

# Application mode
# ~~~~~
# Set to dev to enable instant reloading and other development help.
# Otherwise set to prod.
application.mode=dev
%prod.application.mode=prod

# Secret key
# ~~~~~
# The secret key is used to secure cryptographics functions
# If you deploy your application to several instances be sure to use the same key !
application.secret=1Mim4xxSYWkPaKyQoei2d4GUUDCesJk0T1x7ggtsbQCMZZLsqsWutnmwPCbtjZ3G
# The secret key is used to secure cryptographics functions.
# If you deploy your application to several instances be sure to use the same key!
application.secret="UdmA?IWB:I<h5@05G4E@r^Zr6RJik6KvONay2T4XrdaxXnRHs>TcH4tSSXs03SMd"

# i18n
# The application languages
# ~~~~~
# Define locales used by your application.
# You can then place localized messages in conf/messages.{locale} files
# application.langs=fr,en,ja

# Date format
# ~~~~~
date.format=yyyy-MM-dd
# date.format.fr=dd/MM/yyyy

# Server configuration
# ~~~~~
# If you need to change the HTTP port, uncomment this (default is set to 9000)
# http.port=9000
#
# By default the server listen for HTTP on the wilcard address.
# You can restrict this.
# http.address=127.0.0.1
#
# Use this if you don't host your Play application at the root of the domain
# you're serving it from. This parameter has no effect when deployed as a
# war, because the path will be handled by the application server.
# http.path=/

# Session configuration
# ~~~~~~~~~~~~~~~~~~~~~~
# By default, session will be written to the transient PLAY_SESSION cookie.
# The cookies are not secured by default, only set it to true
# if you're serving your pages through https.
# application.session.cookie=PLAY
# application.session.maxAge=1h
# application.session.secure=false
application.langs="en"

# Session/Cookie sharing between subdomain
# ~~~~~~~~~~~~~~~~~~~~~~
# By default a cookie is only valid for a specific domain. By setting
# application.defaultCookieDomain to '.example.com', the cookies
# will be valid for all domains ending with '.example.com', ie:
# foo.example.com and bar.example.com
# application.defaultCookieDomain=.example.com

# JVM configuration
# Global object class
# ~~~~~
# Define which port is used by JPDA when application is in debug mode (default is set to 8000)
# jpda.port=8000
#
# Java source level => 1.5, 1.6 or 1.7 (experimental)
# java.source=1.5
# Define the Global object class for this application.
# Default to Global in the root package.
# application.global=Global

# Log level
# Router
# ~~~~~
# Specify log level for your application.
# If you want a very customized log, create a log4j.properties file in the conf directory
# application.log=INFO
#
# More logging configuration
# application.log.path=/log4j.properties
# application.log.system.out=off
# Define the Router object to use for this application.
# This router will be looked up first when the application is starting up,
# so make sure this is the entry point.
# Furthermore, it's assumed your route file is named properly.
# So for an application router like `conf/my.application.Router`,
# you may need to define a router file `my.application.routes`.
# Default to Routes in the root package (and `conf/routes`)
# application.router=my.application.Routes

# Database configuration
# ~~~~~
# Enable a database engine if needed.
#
# To quickly set up a development database, use either:
# - mem : for a transient in memory database (H2 in memory)
# - fs : for a simple file written database (H2 file stored)
# db=mem
#
# To connect to a local MySQL5 database, use:
# db=mysql://user:pwd@host/database
# You can declare as many datasources as you want.
# By convention, the default datasource is named `default`
#
# To connect to a local PostgreSQL9 database, use:
# db=postgres://user:pwd@host/database
# db.default.driver=org.h2.Driver
# db.default.url="jdbc:h2:mem:play"
# db.default.user=sa
# db.default.password=""
#
# If you need a full JDBC configuration use the following :
# db.url=jdbc:postgresql:database_name
# db.driver=org.postgresql.Driver
# db.user=root
# db.pass=secret
#
# Connections pool configuration :
# db.pool.timeout=1000
# db.pool.maxSize=30
# db.pool.minSize=10
#
# If you want to reuse an existing Datasource from your application server, use:
# db=java:/comp/env/jdbc/myDatasource
#
# When using an existing Datasource, it's sometimes needed to destroy it when
# the application is stopped. Depending on the datasource, you can define a
# generic "destroy" method :
# db.destroyMethod=close
# You can expose this datasource via JNDI if needed (Useful for JPA)
# db.default.jndiName=DefaultDS

# JPA Configuration (Hibernate)
# Evolutions
# ~~~~~
#
# Specify the custom JPA dialect to use here (default to guess):
# jpa.dialect=org.hibernate.dialect.PostgreSQLDialect
#
# Specify the ddl generation pattern to use. Set to none to disable it
# (default to update in DEV mode, and none in PROD mode):
# jpa.ddl=update
#
# Debug SQL statements (logged using DEBUG level):
# jpa.debugSQL=true
#
# You can even specify additional hibernate properties here:
# hibernate.use_sql_comments=true
# ...
#
# Store path for Blob content
attachments.path=data/attachments
# You can disable evolutions if needed
# evolutionplugin=disabled

# Memcached configuration
# Ebean configuration
# ~~~~~
# Enable memcached if needed. Otherwise a local cache is used.
# memcached=enabled
#
# Specify memcached host (default to 127.0.0.1:11211)
# memcached.host=127.0.0.1:11211
# You can declare as many Ebean servers as you want.
# By convention, the default server is named `default`
#
# Or you can specify multiple host to build a distributed cache
# memcached.1.host=127.0.0.1:11211
# memcached.2.host=127.0.0.1:11212
#
# Use plain SASL to authenticate for memcached
# memcached.user=
# memcached.password=

# HTTP Response headers control for static files
# ~~~~~
# Set the default max-age, telling the user's browser how long it should cache the page.
# Default is 3600 (one hour). Set it to 0 to send no-cache.
# This is only read in prod mode, in dev mode the cache is disabled.
# http.cacheControl=3600

# If enabled, Play will generate entity tags automatically and send a 304 when needed.
# Default is true, set it to false to deactivate use of entity tags.
# http.useETag=true
# ebean.default="models.*"

# Custom mime types
# mimetype.xpi=application/x-xpinstall

# WS configuration
# ~~~~~
# Default engine is Async Http Client, uncomment to use
# the JDK's internal implementation
# webservice = urlfetch
# If you need to set proxy params for WS requests
# http.proxyHost = localhost
# http.proxyPort = 3128
# http.proxyUser = jojo
# http.proxyPassword = jojo

# Mail configuration
# Logger
# ~~~~~
# Default is to use a mock Mailer
mail.smtp=mock
# You can also configure logback (http://logback.qos.ch/),
# by providing an application-logger.xml file in the conf directory.

# Or, specify mail host configuration
# mail.smtp.host=127.0.0.1
# mail.smtp.user=admin
# mail.smtp.pass=
# mail.smtp.channel=ssl
# Root logger:
logger.root=ERROR

# Url-resolving in Jobs
# ~~~~~~
# When rendering templates with reverse-url-resoling (@@{..}) in Jobs (which do not have an inbound Http.Request),
# ie if sending a HtmlMail, Play need to know which url your users use when accessing your app.
# %test.application.baseUrl=http://localhost:9000/
# %prod.application.baseUrl=http://www.yourdomain.com/
# Logger used by the framework:
logger.play=INFO

# Jobs executor
# ~~~~~~
# Size of the Jobs pool
# play.jobs.pool=10

# Execution pool
# ~~~~~
# Default to 1 thread in DEV mode or (nb processors + 1) threads in PROD mode.
# Try to keep a low as possible. 1 thread will serialize all requests (very useful for debugging purpose)
# play.pool=3
# Logger provided to your application:
logger.application=DEBUG

# Open file from errors pages
# ~~~~~
# If your text editor supports opening files by URL, Play! will
# dynamically link error pages to files
#
# Example, for textmate:
# play.editor=txmt://open?url=file://%s&line=%s

# Testing. Set up a custom configuration for test mode
# ~~~~~
#%test.module.cobertura=${play.path}/modules/cobertura
%test.application.mode=dev
%test.db.url=jdbc:h2:mem:play;MODE=MYSQL;LOCK_MODE=0
%test.jpa.ddl=create
%test.mail.smtp=mock
2 changes: 1 addition & 1 deletion test/features/apps/play/conf/dependencies.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Application dependencies

require:
- play
- play 2.2.0
3 changes: 0 additions & 3 deletions test/features/apps/play/conf/messages

This file was deleted.

12 changes: 3 additions & 9 deletions test/features/apps/play/conf/routes
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,7 @@
# ~~~~

# Home page
GET / Application.index
GET / controllers.Application.index()

# Ignore favicon requests
GET /favicon.ico 404

# Map static resources from the /app/public folder to the /public path
GET /public/ staticDir:public

# Catch all
* /{controller}/{action} {controller}.{action}
# Map static resources from the /public folder to the /assets URL path
GET /assets/*file controllers.Assets.at(path="/public", file)
1 change: 1 addition & 0 deletions test/features/apps/play/project/build.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
sbt.version=0.13.0
Loading

0 comments on commit a6b7a64

Please sign in to comment.