Skip to content

Commit

Permalink
Merge pull request #653 from Max-AR/remove-examples
Browse files Browse the repository at this point in the history
Migrate samples from play-slick repo to play-samples repo
  • Loading branch information
mkurz authored Jan 30, 2022
2 parents 587a5d5 + 7e5a861 commit ee06309
Show file tree
Hide file tree
Showing 59 changed files with 3 additions and 3,048 deletions.
19 changes: 0 additions & 19 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,22 +22,3 @@ bin

# IntelliJ IDEA specific
.idea

# samples
samples/*/logs
samples/*/project/project
samples/*/project/target
samples/*/target
samples/*/bin
samples/*/tmp
samples/*/.history
samples/*/dist
samples/*/.idea
samples/*/*.iml
samples/*/out
samples/*/.idea_modules
samples/*/.classpath
samples/*/.project
samples/*/RUNNING_PID
samples/*/.settings
/bin/
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ install: jabba install "adopt@~1.$TRAVIS_JDK.0-0" && jabba use "$_" && java -Xmx
script:
- sbt ++$TRAVIS_SCALA_VERSION scalafmtCheckAll scalafmtSbtCheck mimaReportBinaryIssues
- sbt ++$TRAVIS_SCALA_VERSION docs/scalafmtCheckAll docs/scalafmtSbtCheck docs/test docs/validateDocs
- sbt ++$TRAVIS_SCALA_VERSION test samples/test

cache:
directories:
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ Because Slick creates and manages both a connection pool and a thread pool, inte

The plugin has its own release cycle and therefore is not integrated into either core Play or Slick.

Examples of `play-slick`s usage can be found [here](https://github.com/playframework/play-samples).

## Current Version

To use play-slick, you need to add the following dependencies:
Expand Down
31 changes: 0 additions & 31 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,6 @@ lazy val docs = project
.settings(commonSettings)

playBuildRepoName in ThisBuild := "play-slick"
playBuildExtraTests := {
(test in (samples, Test)).value
}

// Binary compatibility is tested against this version
val previousVersion: Option[String] = Some("5.0.0")
Expand All @@ -86,31 +83,3 @@ ThisBuild / mimaFailOnNoPrevious := false
def mimaSettings = mimaDefaultSettings ++ Seq(
mimaPreviousArtifacts := previousVersion.map(organization.value %% moduleName.value % _).toSet
)

lazy val samples = project
.in(file("samples"))
.aggregate(
basicSample,
computerDatabaseSample,
streamsSample
)

def sampleProject(name: String) =
Project(s"$name-sample", file("samples") / name)
.enablePlugins(PlayScala)
.disablePlugins(PlayFilters)
.dependsOn(`play-slick`)
.dependsOn(`play-slick-evolutions`)
.settings(
libraryDependencies += Library.playSpecs2 % "test",
concurrentRestrictions in Global += Tags.limit(Tags.Test, 1)
)
.settings(libraryDependencies += Library.h2)
.settings(javaOptions in Test += "-Dslick.dbs.default.connectionTimeout=30 seconds")
.settings(commonSettings)

lazy val computerDatabaseSample = sampleProject("computer-database")

lazy val streamsSample = sampleProject("streams")

lazy val basicSample = sampleProject("basic")
2 changes: 1 addition & 1 deletion docs/manual/working/scalaGuide/main/sql/slick/PlaySlick.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ Of course, you should replace the string `"<db-name>"` with the name of the data

> Note: To access the database object, you need only call the function `db` on the `HasDatabaseConfig` trait. You do not need to reference the dbConfigProvider constructor parameter.
For a full example, have a look at [this sample project](https://github.com/playframework/play-slick/tree/master/samples/basic).
For a full example, have a look at [this sample project](https://github.com/playframework/play-samples/tree/HEAD/play-scala-slick-example/samples/basic).

### Compile-time dependency injection

Expand Down
44 changes: 0 additions & 44 deletions samples/basic/app/controllers/Application.scala

This file was deleted.

27 changes: 0 additions & 27 deletions samples/basic/app/dao/CatDAO.scala

This file was deleted.

28 changes: 0 additions & 28 deletions samples/basic/app/dao/DogDAO.scala

This file was deleted.

5 changes: 0 additions & 5 deletions samples/basic/app/models/Models.scala

This file was deleted.

41 changes: 0 additions & 41 deletions samples/basic/app/views/index.scala.html

This file was deleted.

15 changes: 0 additions & 15 deletions samples/basic/app/views/main.scala.html

This file was deleted.

3 changes: 0 additions & 3 deletions samples/basic/build.sbt

This file was deleted.

40 changes: 0 additions & 40 deletions samples/basic/conf/application.conf

This file was deleted.

9 changes: 0 additions & 9 deletions samples/basic/conf/evolutions/default/1.sql

This file was deleted.

29 changes: 0 additions & 29 deletions samples/basic/conf/logback.xml

This file was deleted.

14 changes: 0 additions & 14 deletions samples/basic/conf/routes

This file was deleted.

Binary file removed samples/basic/public/images/favicon.png
Binary file not shown.
4 changes: 0 additions & 4 deletions samples/basic/public/javascripts/jquery-1.9.0.min.js

This file was deleted.

9 changes: 0 additions & 9 deletions samples/basic/public/stylesheets/main.css

This file was deleted.

Loading

0 comments on commit ee06309

Please sign in to comment.