Skip to content

Commit

Permalink
Merge branch '2.7.x' into 2.8.x
Browse files Browse the repository at this point in the history
Update 2.7.x references to 2.8.x (fastmod '2\.7\.x' '2.8.x')

* 2.7.x:
  adds mergify config
  Fix shields & other links
  • Loading branch information
dwijnand committed Jun 3, 2019
2 parents 2654432 + f41c774 commit e407d35
Show file tree
Hide file tree
Showing 47 changed files with 71 additions and 113 deletions.
21 changes: 8 additions & 13 deletions .mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,16 @@ pull_request_rules:
method: merge
strict: smart

- name: Merge TemplateControl's PRs that are ready
conditions:
- status-success=Travis CI - Pull Request
- "#review-requested=0"
- "#changes-requested-reviews-by=0"
- label!=status:block-merge
- label=status:merge-when-green
- label!=status:block-merge
actions:
merge:
method: merge
strict: smart

- name: Delete the PR branch after merge
conditions:
- merged
actions:
delete_head_branch: {}

- name: auto add wip
conditions:
# match a few flavours of wip
- title~=^(\[wip\]( |:) |\[WIP\]( |:) |wip( |:) |WIP( |:)).*
actions:
label:
add: ["status:block-merge"]
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Play samples

[![Build Status](https://travis-ci.com/playframework/play-samples.svg?branch=2.8.x)](https://travis-ci.com/playframework/play-samples)
[![GitHub issues](https://img.shields.io/github/issues/playframework/play-samples.svg?style=flat)](https://github.com/playframework/play-samples/issues)
[![GitHub forks](https://img.shields.io/github/forks/playframework/play-samples.svg?style=flat)](https://github.com/playframework/play-samples/network)
[![GitHub stars](https://img.shields.io/github/stars/playframework/play-samples.svg?style=flat)](https://github.com/playframework/play-samples/stargazers)

#### License

<sup>
Expand Down
2 changes: 0 additions & 2 deletions play-java-chatroom-example/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# play-java-chatroom-example

[<img src="https://img.shields.io/travis/playframework/play-java-chatroom-example.svg"/>](https://travis-ci.org/playframework/play-java-chatroom-example)

This is a simple chatroom using Play and Websockets with the Java API.

This project makes use of [dynamic streams](http://doc.akka.io/docs/akka/current/java/stream/stream-dynamic.html) from Akka Streams, notably `BroadcastHub` and `MergeHub`. By [combining MergeHub and BroadcastHub](http://doc.akka.io/docs/akka/current/java/stream/stream-dynamic.html#Dynamic_fan-in_and_fan-out_with_MergeHub_and_BroadcastHub), you can get publish/subscribe functionality.
Expand Down
2 changes: 1 addition & 1 deletion play-java-chatroom-example/build.sbt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name := """play-java-chatroom-example"""

version := "2.6.x"
version := "2.8.x"

scalaVersion := "2.12.8"

Expand Down
4 changes: 2 additions & 2 deletions play-java-chatroom-example/conf/application.conf
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ akka {
logging-filter = "akka.event.slf4j.Slf4jLoggingFilter"
}

// https://www.playframework.com/documentation/2.6.x/SecurityHeaders
// https://www.playframework.com/documentation/2.8.x/SecurityHeaders
// Disable the out of the box content security policy in SecurityHeadersFilter
play.filters.headers.contentSecurityPolicy = null

// https://www.playframework.com/documentation/2.6.x/AllowedHostsFilter
// https://www.playframework.com/documentation/2.8.x/AllowedHostsFilter
play.filters.hosts.allowed = ["localhost:9000", "localhost:19001"]

// Add CSP header in explicitly in a custom filter.
Expand Down
5 changes: 2 additions & 3 deletions play-java-compile-di-example/README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
# play-java-compile-di-example

[<img src="https://img.shields.io/travis/playframework/play-java-compile-di-example.svg"/>](https://travis-ci.org/playframework/play-java-compile-di-example)

This is a Play project using the Java API and compile time dependency injection.

It is intentionally very simple and basic to show how compile time DI works in Play with the Java API.

There is also an [example](https://github.com/playframework/play-java-dagger2-example) using Java compile time DI with [Dagger 2](https://google.github.io/dagger/).
There is also an example using Java compile time DI with [Dagger 2](https://google.github.io/dagger/):
the "play-java-dagger2-example" in the [play-samples](https://github.com/playframework/play-samples) repo.

## Running

Expand Down
6 changes: 2 additions & 4 deletions play-java-dagger2-example/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
[<img src="https://img.shields.io/travis/playframework/play-java-dagger2-example.svg"/>](https://travis-ci.org/playframework/play-java-dagger2-example)

# play-java-dagger2-example

This project shows how to use Play Java with [Dagger 2](https://google.github.io/dagger/).
Expand All @@ -18,7 +16,7 @@ Go to http://localhost:9000/ws to see the WS client pull the time from a remote

[Dagger 2](https://google.github.io/dagger/) is a compile time dependency injection system. This means that [dependencies are still declared](https://google.github.io/dagger/users-guide.html#declaring-dependencies) with `@Inject`, but the compiler is responsible for resolving the graph.

Play Java supports [Compile Time Dependency Injection](https://www.playframework.com/documentation/2.6.x/JavaCompileTimeDependencyInjection) so the work here is to provide an application loader that hooks into Dagger, rather than using constructor based DI.
Play Java supports [Compile Time Dependency Injection](https://www.playframework.com/documentation/2.8.x/JavaCompileTimeDependencyInjection) so the work here is to provide an application loader that hooks into Dagger, rather than using constructor based DI.

The `dagger.MyApplicationLoader` class provides the core, by calling out to the `DaggerApplicationComponent`:

Expand Down Expand Up @@ -87,4 +85,4 @@ public class MyComponentsFromContext {
return simpleInjector;
}
}
```
```
6 changes: 2 additions & 4 deletions play-java-ebean-example/README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
[<img src="https://img.shields.io/travis/playframework/play-java-ebean-example.svg"/>](https://travis-ci.org/playframework/play-java-ebean-example)

# play-java-ebean-example

This is an example Play application that uses Java, and communicates with an in memory database using EBean.

The Github location for this project is:
The GitHub location for this project is inside:

[https://github.com/playframework/play-java-ebean-example](https://github.com/playframework/play-java-ebean-example)
<https://github.com/playframework/play-samples>

## Play

Expand Down
2 changes: 0 additions & 2 deletions play-java-fileupload-example/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# Play File Upload using a custom BodyParser

[![Build Status](https://travis-ci.org/playframework/play-java-fileupload-example.svg?branch=2.6.x)](https://travis-ci.org/playframework/play-java-fileupload-example)

This is a sample project that shows how to upload a file through Akka Streams using a custom BodyParser using Akka Streams using the Java API.

## Default MultipartFormData Body Parser
Expand Down
2 changes: 1 addition & 1 deletion play-java-fileupload-example/conf/application.conf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# https://www.playframework.com/documentation/latest/Configuration

# Sets the maximum file size that can be uploaded to 1024k.
# https://www.playframework.com/documentation/2.6.x/JavaBodyParsers#Content-length-limits
# https://www.playframework.com/documentation/2.8.x/JavaBodyParsers#Content-length-limits
play.http.parser.maxMemoryBuffer=1024k
4 changes: 1 addition & 3 deletions play-java-forms-example/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# play-java-forms-example

[<img src="https://img.shields.io/travis/playframework/play-java-forms-example.svg"/>](https://travis-ci.org/playframework/play-java-forms-example)

This example shows form processing and form helper handling in Play.

## How to run
Expand All @@ -16,4 +14,4 @@ And open <http://localhost:9000/>

## Documentation

Please see <https://playframework.com/documentation/latest/JavaForms>.
Please see <https://playframework.com/documentation/latest/JavaForms>.
2 changes: 1 addition & 1 deletion play-java-forms-example/build.sbt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name := """play-java-forms-example"""

version := "2.7.x"
version := "2.8.x"

lazy val root = (project in file(".")).enablePlugins(PlayJava)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ <h3 id="route">Define a route</h3>
<p>A <code>route</code> tells Play how to handle incoming requests and includes the request path, an HTTP
method, and the controller action to invoke. When you add a route to the <code>routes</code> file, Play's
routes compiler will automatically generate a router class that calls that action using an instance of that
controller. For more information see <a href="https://www.playframework.com/documentation/2.6.x/ScalaRouting#HTTP-routing"
controller. For more information see <a href="https://www.playframework.com/documentation/2.8.x/ScalaRouting#HTTP-routing"
target="blank">HTTP Routing</a>. By default, the controller instances are created using dependency
injection. See <a href="https://www.playframework.com/documentation/latest/ScalaDependencyInjection#Dependency-Injection"
target="blank">Dependency Injection</a> for more information.</p>
Expand Down
2 changes: 0 additions & 2 deletions play-java-jpa-example/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
[<img src="https://img.shields.io/travis/playframework/play-java-jpa-example.svg"/>](https://travis-ci.org/playframework/play-java-jpa-example)

# play-java-jpa-example

This project demonstrates how to create a simple database application with Play, using JPA.
Expand Down
4 changes: 1 addition & 3 deletions play-java-rest-api-example/README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
# play-java-rest-api-example

[<img src="https://img.shields.io/travis/playframework/play-java-rest-api-example.svg"/>](https://travis-ci.org/playframework/play-java-rest-api-example)

A REST API showing Play with a JPA backend. For the Scala version, please see <https://github.com/playframework/play-scala-rest-api-example>.

## Best Practices for Blocking API

If you look at the controller: <https://github.com/playframework/play-java-rest-api-example/blob/2.6.x/app/v1/post/PostController.java>
If you look at the controller: [PostController](app/v1/post/PostController.java)
then you can see that when calling out to a blocking API like JDBC, you should put it behind an asynchronous boundary -- in practice, this means using the CompletionStage API to make sure that you're not blocking the rendering thread while the database call is going on in the background.

```java
Expand Down
2 changes: 1 addition & 1 deletion play-java-rest-api-example/build.sbt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name := """play-java-rest-api-example"""

version := "2.7.x"
version := "2.8.x"

val gatlingVersion = "2.3.1"

Expand Down
2 changes: 0 additions & 2 deletions play-java-starter-example/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
[<img src="https://img.shields.io/travis/playframework/play-java-starter-example.svg"/>](https://travis-ci.org/playframework/play-java-starter-example)

# play-java-starter-example

This is a starter application that shows how Play works. Please see the documentation at https://www.playframework.com/documentation/latest/Home for more details.
Expand Down
2 changes: 0 additions & 2 deletions play-java-streaming-example/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# play-java-streaming-example

[<img src="https://img.shields.io/travis/playframework/play-java-streaming-example.svg"/>](https://travis-ci.org/playframework/play-java-streaming-example)

This is an example Play template that demonstrates Streaming with Server Sent Events or Comet, using Akka Streams.

Please see the documentation at:
Expand Down
2 changes: 0 additions & 2 deletions play-java-websocket-example/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# play-websocket-java-example

[![Build Status](https://travis-ci.org/playframework/play-java-websocket-example.svg?branch=2.6.x)](https://travis-ci.org/playframework/play-java-websocket-example) [![GitHub issues](https://img.shields.io/github/issues/playframework/play-websocket-java.svg?style=flat)](https://github.com/playframework/play-websocket-java/issues) [![GitHub forks](https://img.shields.io/github/forks/playframework/play-websocket-java.svg?style=flat)](https://github.com/playframework/play-websocket-java/network) [![GitHub stars](https://img.shields.io/github/stars/playframework/play-websocket-java.svg?style=flat)](https://github.com/playframework/play-websocket-java/stargazers)

This is an example Play application that shows how to use Play's Websocket API in Java, by showing a series of stock tickers updated using WebSocket.

The Websocket API is built on Akka Streams, and so is async, non-blocking, and backpressure aware. Using Akka Streams also means that interacting with Akka Actors is simple.
Expand Down
2 changes: 0 additions & 2 deletions play-scala-anorm-example/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# play-scala-anorm-example

[<img src="https://img.shields.io/travis/playframework/play-scala-anorm-example.svg"/>](https://travis-ci.org/playframework/play-scala-anorm-example)

This is an example Play application that uses Scala on the front end, and communicates with an in memory database using Anorm.

## Play
Expand Down
2 changes: 1 addition & 1 deletion play-scala-anorm-example/build.sbt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name := "play-scala-anorm-example"

version := "2.6.0-SNAPSHOT"
version := "2.8.x"

scalaVersion := "2.12.8"

Expand Down
2 changes: 0 additions & 2 deletions play-scala-chatroom-example/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# play-scala-chatroom-example

[<img src="https://img.shields.io/travis/playframework/play-scala-chatroom-example.svg"/>](https://travis-ci.org/playframework/play-scala-chatroom-example)

This is a simple chatroom using Play and Websockets with the Scala API.

This project makes use of [dynamic streams](http://doc.akka.io/docs/akka/current/scala/stream/stream-dynamic.html) from Akka Streams, notably `BroadcastHub` and `MergeHub`. By [combining MergeHub and BroadcastHub](http://doc.akka.io/docs/akka/current/scala/stream/stream-dynamic.html#Dynamic_fan-in_and_fan-out_with_MergeHub_and_BroadcastHub), you can get publish/subscribe functionality.
Expand Down
2 changes: 1 addition & 1 deletion play-scala-chatroom-example/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ lazy val root = (project in file(".")).enablePlugins(PlayScala)

name := """play-chatroom-scala-example"""

version := "2.7.x"
version := "2.8.x"

scalaVersion := "2.12.8"

Expand Down
4 changes: 2 additions & 2 deletions play-scala-chatroom-example/conf/application.conf
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ akka {
logging-filter = "akka.event.slf4j.Slf4jLoggingFilter"
}

// https://www.playframework.com/documentation/2.6.x/SecurityHeaders
// https://www.playframework.com/documentation/2.8.x/SecurityHeaders
// Disable the out of the box content security policy in SecurityHeadersFilter
play.filters.headers.contentSecurityPolicy = null

// https://www.playframework.com/documentation/2.6.x/AllowedHostsFilter
// https://www.playframework.com/documentation/2.8.x/AllowedHostsFilter
play.filters.hosts.allowed = ["localhost:9000", "localhost:19001"]

// Add CSP header in explicitly in a custom filter.
Expand Down
2 changes: 0 additions & 2 deletions play-scala-compile-di-example/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# play-scala-compile-di-example

[<img src="https://img.shields.io/travis/playframework/play-scala-compile-di-example.svg"/>](https://travis-ci.org/playframework/play-scala-compile-di-example)

This is an example of Play using the Scala API with manually wired compile time dependency injection.

The application loader here is `MyApplicationLoader` which uses `MyComponents` to wire together an injector.
Expand Down
4 changes: 2 additions & 2 deletions play-scala-fileupload-example/conf/application.conf
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# https://www.playframework.com/documentation/latest/Configuration

# Sets the maximum file size that can be uploaded to 1024k.
# https://www.playframework.com/documentation/2.6.x/ScalaBodyParsers#Max-content-length
# https://www.playframework.com/documentation/2.8.x/ScalaBodyParsers#Max-content-length
play.http.parser.maxMemoryBuffer=1024k

# For upload large file
# https://www.playframework.com/documentation/2.6.x/ScalaBodyParsers#Max-content-length
# https://www.playframework.com/documentation/2.8.x/ScalaBodyParsers#Max-content-length
play.http.parser.maxDiskBuffer=1g
4 changes: 1 addition & 3 deletions play-scala-forms-example/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# play-scala-forms-example

[![Build Status](https://travis-ci.org/playframework/play-scala-forms-example.svg?branch=2.6.x)](https://travis-ci.org/playframework/play-scala-forms-example)

This example shows form processing and form helper handling under Play 2.6.x.
This example shows form processing and form helper handling under Play 2.8.x.

## How to run

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import play.api.mvc._
* which provides implicits that create a Messages instance from a request
* using implicit conversion.
*
* See https://www.playframework.com/documentation/2.6.x/ScalaForms#passing-messagesprovider-to-form-helpers
* See https://www.playframework.com/documentation/2.8.x/ScalaForms#passing-messagesprovider-to-form-helpers
* for details.
*/
class WidgetController @Inject()(cc: MessagesControllerComponents) extends MessagesAbstractController(cc) {
Expand Down
2 changes: 1 addition & 1 deletion play-scala-forms-example/build.sbt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name := """play-scala-forms-example"""

version := "2.7.x"
version := "2.8.x"

scalaVersion := "2.12.8"

Expand Down
4 changes: 2 additions & 2 deletions play-scala-forms-example/test/functional/FunctionalSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ import scala.concurrent.Future
*
* This is good for testing filter functionality, such as CSRF token and template checks.
*
* See https://www.playframework.com/documentation/2.6.x/ScalaFunctionalTestingWithScalaTest for more details.
* See https://www.playframework.com/documentation/2.8.x/ScalaFunctionalTestingWithScalaTest for more details.
*/
class FunctionalSpec extends PlaySpec with GuiceOneAppPerSuite with Injecting with ScalaFutures {

// CSRF token helper adds "withCSRFToken" to FakeRequest:
// https://www.playframework.com/documentation/2.6.x/ScalaCsrf#Testing-CSRF
// https://www.playframework.com/documentation/2.8.x/ScalaCsrf#Testing-CSRF
import CSRFTokenHelper._

"WidgetController" must {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ <h3 id="route">Define a route</h3>
<p>A <code>route</code> tells Play how to handle incoming requests and includes the request path, an HTTP
method, and the controller action to invoke. When you add a route to the <code>routes</code> file, Play's
routes compiler will automatically generate a router class that calls that action using an instance of that
controller. For more information see <a href="https://www.playframework.com/documentation/2.6.x/ScalaRouting#HTTP-routing"
controller. For more information see <a href="https://www.playframework.com/documentation/2.8.x/ScalaRouting#HTTP-routing"
target="blank">HTTP Routing</a>. By default, the controller instances are created using dependency
injection. See <a href="https://www.playframework.com/documentation/latest/ScalaDependencyInjection#Dependency-Injection"
target="blank">Dependency Injection</a> for more information.</p>
Expand Down
2 changes: 0 additions & 2 deletions play-scala-isolated-slick-example/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# Play with Slick 3.1

[![Build Status](https://travis-ci.org/playframework/play-scala-isolated-slick-example.svg?branch=2.6.x)](https://travis-ci.org/playframework/play-scala-isolated-slick-example)

This project shows Play working with Slick.

This project is configured to keep all the modules self-contained.
Expand Down
2 changes: 0 additions & 2 deletions play-scala-log4j2-example/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# Play using Log4j 2

[![Build Status](https://travis-ci.org/playframework/play-scala-log4j2-example.svg?branch=2.7.x)](https://travis-ci.org/playframework/play-scala-log4j2-example)

This is an example project showing a sample Play application that use Log4J 2 instead of using Logback.

Please see [Using a custom logging framework](https://www.playframework.com/documentation/latest/SettingsLogger#Using-a-Custom-Logging-Framework) in the Play documentation for more details.
Expand Down
4 changes: 1 addition & 3 deletions play-scala-macwire-di-example/README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
# play-scala-macwire-di-example

[<img src="https://img.shields.io/travis/playframework/play-scala-macwire-di-example.svg"/>](https://travis-ci.org/playframework/play-scala-macwire-di-example)

This is an example project for setting up Play with Macwire compile time dependency injection.

For further details, please see:

* <https://www.playframework.com/documentation/latest/ScalaCompileTimeDependencyInjection>
* <https://github.com/adamw/macwire/blob/master/README.md>
* <https://di-in-scala.github.io/>
* <https://di-in-scala.github.io/>
2 changes: 1 addition & 1 deletion play-scala-macwire-di-example/build.sbt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name := """play-scala-macwire-di-example"""

version := "2.6.x"
version := "2.8.x"

lazy val root = (project in file(".")).enablePlugins(PlayScala)

Expand Down
2 changes: 0 additions & 2 deletions play-scala-rest-api-example/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# Play REST API

[![Build Status](https://travis-ci.org/playframework/play-scala-rest-api-example.svg?branch=2.6.x)](https://travis-ci.org/playframework/play-scala-rest-api-example)

This is the example project for [Making a REST API in Play](http://developer.lightbend.com/guides/play-rest-api/index.html).

## Appendix
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ You will need to have [git](https://git-scm.com/) installed.

## Downloading

You can clone the example project from Github:
You can clone the example project from GitHub:

```bash
git clone https://github.com/playframework/play-scala-rest-api-example.git
Expand Down
Loading

0 comments on commit e407d35

Please sign in to comment.