-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b2dd70f
commit 1f05bf7
Showing
85 changed files
with
279 additions
and
0 deletions.
There are no files selected for viewing
24 changes: 24 additions & 0 deletions
24
zad2 - Scala/Products project/app/controllers/HomeController.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package controllers | ||
|
||
import javax.inject._ | ||
import play.api._ | ||
import play.api.mvc._ | ||
|
||
/** | ||
* This controller creates an `Action` to handle HTTP requests to the | ||
* application's home page. | ||
*/ | ||
@Singleton | ||
class HomeController @Inject()(val controllerComponents: ControllerComponents) extends BaseController { | ||
|
||
/** | ||
* Create an Action to render an HTML page. | ||
* | ||
* The configuration in the `routes` file means that this method | ||
* will be called when the application receives a `GET` request with | ||
* a path of `/`. | ||
*/ | ||
def index() = Action { implicit request: Request[AnyContent] => | ||
Ok(views.html.index()) | ||
} | ||
} |
30 changes: 30 additions & 0 deletions
30
zad2 - Scala/Products project/app/controllers/ProductController.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package controllers | ||
|
||
import javax.inject._ | ||
import play.api.mvc._ | ||
import play.api.libs.json._ | ||
|
||
@Singleton | ||
class ProductController @Inject()(val controllerComponents: ControllerComponents) extends BaseController { | ||
|
||
def getAllProducts: Action[AnyContent] = Action { | ||
Ok("List of all products") | ||
} | ||
|
||
def getProductById(id: Long): Action[AnyContent] = Action { | ||
Ok(s"Product with ID $id") | ||
} | ||
|
||
def createProduct: Action[JsValue] = Action(parse.json) { request => | ||
Ok("Product created") | ||
} | ||
|
||
def updateProduct(id: Long): Action[JsValue] = Action(parse.json) { request => | ||
Ok(s"Product with ID $id updated") | ||
} | ||
|
||
def deleteProduct(id: Long): Action[AnyContent] = Action { | ||
Ok(s"Product with ID $id deleted") | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
@() | ||
|
||
@main("Welcome to Play") { | ||
<h1>Welcome to Play!</h1> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
@* | ||
* This template is called from the `index` template. This template | ||
* handles the rendering of the page header and body tags. It takes | ||
* two arguments, a `String` for the title of the page and an `Html` | ||
* object to insert into the body of the page. | ||
*@ | ||
@(title: String)(content: Html) | ||
|
||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
@* Here's where we render the page title `String`. *@ | ||
<title>@title</title> | ||
<link rel="stylesheet" media="screen" href="@routes.Assets.versioned("stylesheets/main.css")"> | ||
<link rel="shortcut icon" type="image/png" href="@routes.Assets.versioned("images/favicon.png")"> | ||
|
||
</head> | ||
<body> | ||
@* And here's where we render the `Html` object containing | ||
* the page content. *@ | ||
@content | ||
|
||
<script src="@routes.Assets.versioned("javascripts/main.js")" type="text/javascript"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name := """hello""" | ||
organization := "kamil" | ||
|
||
version := "1.0-SNAPSHOT" | ||
|
||
lazy val root = (project in file(".")).enablePlugins(PlayScala) | ||
|
||
scalaVersion := "2.13.13" | ||
|
||
libraryDependencies += guice | ||
libraryDependencies += "org.scalatestplus.play" %% "scalatestplus-play" % "7.0.0" % Test | ||
|
||
// Adds additional packages into Twirl | ||
//TwirlKeys.templateImports += "kamil.controllers._" | ||
|
||
// Adds additional packages into conf/routes | ||
// play.sbt.routes.RoutesKeys.routesImport += "kamil.binders._" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import mill._ | ||
import $ivy.`com.lihaoyi::mill-contrib-playlib:`, mill.playlib._ | ||
|
||
object hello extends PlayModule with SingleModule { | ||
|
||
def scalaVersion = "2.13.13" | ||
def playVersion = "3.0.2" | ||
def twirlVersion = "2.0.1" | ||
|
||
object test extends PlayTests | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# https://www.playframework.com/documentation/latest/Configuration |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
|
||
<!-- https://www.playframework.com/documentation/latest/SettingsLogger --> | ||
|
||
<!DOCTYPE configuration> | ||
|
||
<configuration> | ||
<import class="ch.qos.logback.classic.encoder.PatternLayoutEncoder"/> | ||
<import class="ch.qos.logback.classic.AsyncAppender"/> | ||
<import class="ch.qos.logback.core.FileAppender"/> | ||
<import class="ch.qos.logback.core.ConsoleAppender"/> | ||
|
||
<appender name="FILE" class="FileAppender"> | ||
<file>${application.home:-.}/logs/application.log</file> | ||
<encoder class="PatternLayoutEncoder"> | ||
<charset>UTF-8</charset> | ||
<pattern>%d{yyyy-MM-dd HH:mm:ss} %highlight(%-5level) %cyan(%logger{36}) %magenta(%X{pekkoSource}) %msg%n</pattern> | ||
</encoder> | ||
</appender> | ||
|
||
<appender name="STDOUT" class="ConsoleAppender"> | ||
<!-- | ||
On Windows, enabling Jansi is recommended to benefit from color code interpretation on DOS command prompts, | ||
which otherwise risk being sent ANSI escape sequences that they cannot interpret. | ||
See https://logback.qos.ch/manual/layouts.html#coloring | ||
--> | ||
<!-- <withJansi>true</withJansi> --> | ||
<encoder class="PatternLayoutEncoder"> | ||
<charset>UTF-8</charset> | ||
<pattern>%d{yyyy-MM-dd HH:mm:ss} %highlight(%-5level) %cyan(%logger{36}) %magenta(%X{pekkoSource}) %msg%n</pattern> | ||
</encoder> | ||
</appender> | ||
|
||
<appender name="ASYNCFILE" class="AsyncAppender"> | ||
<appender-ref ref="FILE"/> | ||
</appender> | ||
|
||
<appender name="ASYNCSTDOUT" class="AsyncAppender"> | ||
<appender-ref ref="STDOUT"/> | ||
</appender> | ||
|
||
<logger name="play" level="INFO"/> | ||
<logger name="application" level="DEBUG"/> | ||
|
||
<root level="WARN"> | ||
<appender-ref ref="ASYNCFILE"/> | ||
<appender-ref ref="ASYNCSTDOUT"/> | ||
</root> | ||
|
||
</configuration> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# https://www.playframework.com/documentation/latest/ScalaI18N |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Routes | ||
# This file defines all application routes (Higher priority routes first) | ||
# https://www.playframework.com/documentation/latest/ScalaRouting | ||
# ~~~~ | ||
|
||
# An example controller showing a sample home page | ||
GET / controllers.HomeController.index() | ||
|
||
# Map static resources from the /public folder to the /assets URL path | ||
GET /assets/*file controllers.Assets.versioned(path="/public", file: Asset) | ||
|
||
GET /products controllers.ProductController.getAllProducts() | ||
GET /products/:id controllers.ProductController.getProductById(id: Int) | ||
POST /products controllers.ProductController.createProduct() | ||
PUT /products/:id controllers.ProductController.updateProduct(id: Int) | ||
DELETE /products/:id controllers.ProductController.deleteProduct(id: Int) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
sbt.version=1.9.8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
addSbtPlugin("org.playframework" % "sbt-plugin" % "3.0.2") | ||
addSbtPlugin("org.foundweekends.giter8" % "sbt-giter8-scaffold" % "0.16.2") |
Binary file added
BIN
+1.63 KB
...Scala/Products project/project/project/target/config-classes/$7c46b8cab9787bd6c9e5$.class
Binary file not shown.
1 change: 1 addition & 0 deletions
1
... Scala/Products project/project/project/target/config-classes/$7c46b8cab9787bd6c9e5.cache
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
sbt.internal.DslEntry |
Binary file added
BIN
+669 Bytes
... Scala/Products project/project/project/target/config-classes/$7c46b8cab9787bd6c9e5.class
Binary file not shown.
Binary file added
BIN
+1.61 KB
...Scala/Products project/project/project/target/config-classes/$e047aa3086211ad7c575$.class
Binary file not shown.
1 change: 1 addition & 0 deletions
1
... Scala/Products project/project/project/target/config-classes/$e047aa3086211ad7c575.cache
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
sbt.internal.DslEntry |
Binary file added
BIN
+669 Bytes
... Scala/Products project/project/project/target/config-classes/$e047aa3086211ad7c575.class
Binary file not shown.
Binary file added
BIN
+2.33 KB
zad2 - Scala/Products project/project/target/config-classes/$2f1ec595abea566f0f07$.class
Binary file not shown.
1 change: 1 addition & 0 deletions
1
zad2 - Scala/Products project/project/target/config-classes/$2f1ec595abea566f0f07.cache
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
sbt.internal.DslEntry |
Binary file added
BIN
+659 Bytes
zad2 - Scala/Products project/project/target/config-classes/$2f1ec595abea566f0f07.class
Binary file not shown.
Binary file added
BIN
+1.43 KB
zad2 - Scala/Products project/project/target/config-classes/$5e8dc05648cba4b0f8f7$.class
Binary file not shown.
1 change: 1 addition & 0 deletions
1
zad2 - Scala/Products project/project/target/config-classes/$5e8dc05648cba4b0f8f7.cache
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
root |
Binary file added
BIN
+573 Bytes
zad2 - Scala/Products project/project/target/config-classes/$5e8dc05648cba4b0f8f7.class
Binary file not shown.
Binary file added
BIN
+3.57 KB
zad2 - Scala/Products project/project/target/config-classes/$824f6e3442cc87b0ec7f$.class
Binary file not shown.
1 change: 1 addition & 0 deletions
1
zad2 - Scala/Products project/project/target/config-classes/$824f6e3442cc87b0ec7f.cache
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
sbt.internal.DslEntry |
Binary file added
BIN
+659 Bytes
zad2 - Scala/Products project/project/target/config-classes/$824f6e3442cc87b0ec7f.class
Binary file not shown.
Binary file added
BIN
+2.31 KB
zad2 - Scala/Products project/project/target/config-classes/$96c6804e7f0012fcb930$.class
Binary file not shown.
1 change: 1 addition & 0 deletions
1
zad2 - Scala/Products project/project/target/config-classes/$96c6804e7f0012fcb930.cache
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
sbt.internal.DslEntry |
Binary file added
BIN
+659 Bytes
zad2 - Scala/Products project/project/target/config-classes/$96c6804e7f0012fcb930.class
Binary file not shown.
Binary file added
BIN
+2.32 KB
zad2 - Scala/Products project/project/target/config-classes/$b2c360f31f79c6da09e7$.class
Binary file not shown.
1 change: 1 addition & 0 deletions
1
zad2 - Scala/Products project/project/target/config-classes/$b2c360f31f79c6da09e7.cache
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
sbt.internal.DslEntry |
Binary file added
BIN
+659 Bytes
zad2 - Scala/Products project/project/target/config-classes/$b2c360f31f79c6da09e7.class
Binary file not shown.
Binary file added
BIN
+2.71 KB
zad2 - Scala/Products project/project/target/config-classes/$d9249a931dbe9c7742b6$.class
Binary file not shown.
1 change: 1 addition & 0 deletions
1
zad2 - Scala/Products project/project/target/config-classes/$d9249a931dbe9c7742b6.cache
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
sbt.internal.DslEntry |
Binary file added
BIN
+659 Bytes
zad2 - Scala/Products project/project/target/config-classes/$d9249a931dbe9c7742b6.class
Binary file not shown.
Binary file added
BIN
+2.32 KB
zad2 - Scala/Products project/project/target/config-classes/$e4101b30da2a7d8abc04$.class
Binary file not shown.
1 change: 1 addition & 0 deletions
1
zad2 - Scala/Products project/project/target/config-classes/$e4101b30da2a7d8abc04.cache
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
sbt.internal.DslEntry |
Binary file added
BIN
+659 Bytes
zad2 - Scala/Products project/project/target/config-classes/$e4101b30da2a7d8abc04.class
Binary file not shown.
1 change: 1 addition & 0 deletions
1
zad2 - Scala/Products project/project/target/scala-2.12/sbt-1.0/sync/copy-resource
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[[{},{}],{}] |
1 change: 1 addition & 0 deletions
1
... Scala/Products project/project/target/scala-2.12/sbt-1.0/update/update_cache_2.12/inputs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
766366337 |
1 change: 1 addition & 0 deletions
1
... Scala/Products project/project/target/scala-2.12/sbt-1.0/update/update_cache_2.12/output
Large diffs are not rendered by default.
Oops, something went wrong.
Empty file.
Empty file.
Empty file.
1 change: 1 addition & 0 deletions
1
...ct/target/streams/_global/dependencyPositions/_global/streams/update_cache_2.12/input_dsp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
1196677430 |
1 change: 1 addition & 0 deletions
1
...t/target/streams/_global/dependencyPositions/_global/streams/update_cache_2.12/output_dsp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"{\"organization\":\"org.scala-lang\",\"name\":\"scala-library\",\"revision\":\"2.12.18\",\"configurations\":\"provided\",\"isChanging\":false,\"isTransitive\":true,\"isForce\":false,\"explicitArtifacts\":[],\"inclusions\":[],\"exclusions\":[],\"extraAttributes\":{},\"crossVersion\":{\"type\":\"Disabled\"}}":{"value":{"$fields":["path","range"],"path":"/Users/kamilpiskorz/Desktop/college/ebiznes/zad2/hello/project/plugins.sbt","range":{"$fields":["start","end"],"start":2,"end":3}},"type":"RangePosition"},"{\"organization\":\"org.playframework\",\"name\":\"sbt-plugin\",\"revision\":\"3.0.2\",\"isChanging\":false,\"isTransitive\":true,\"isForce\":false,\"explicitArtifacts\":[],\"inclusions\":[],\"exclusions\":[],\"extraAttributes\":{\"e:sbtVersion\":\"1.0\",\"e:scalaVersion\":\"2.12\"},\"crossVersion\":{\"type\":\"Disabled\"}}":{"value":{"$fields":["path","range"],"path":"/Users/kamilpiskorz/Desktop/college/ebiznes/zad2/hello/project/plugins.sbt","range":{"$fields":["start","end"],"start":2,"end":3}},"type":"RangePosition"},"{\"organization\":\"org.foundweekends.giter8\",\"name\":\"sbt-giter8-scaffold\",\"revision\":\"0.16.2\",\"isChanging\":false,\"isTransitive\":true,\"isForce\":false,\"explicitArtifacts\":[],\"inclusions\":[],\"exclusions\":[],\"extraAttributes\":{\"e:sbtVersion\":\"1.0\",\"e:scalaVersion\":\"2.12\"},\"crossVersion\":{\"type\":\"Disabled\"}}":{"value":{"$fields":["path","range"],"path":"/Users/kamilpiskorz/Desktop/college/ebiznes/zad2/hello/project/plugins.sbt","range":{"$fields":["start","end"],"start":2,"end":3}},"type":"RangePosition"}} |
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
7 changes: 7 additions & 0 deletions
7
zad2 - Scala/Products project/project/target/streams/_global/update/_global/streams/out
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[0m[[0m[0mdebug[0m] [0m[0mnot up to date. inChanged = true, force = false[0m | ||
[0m[[0m[0mdebug[0m] [0m[0mUpdating ProjectRef(uri("file:/Users/kamilpiskorz/Desktop/college/ebiznes/zad2/hello/project/"), "hello-build")...[0m | ||
[0m[[0m[0minfo[0m] [0m[0mUpdating [0m | ||
[0m[[0m[0minfo[0m] [0m[0mResolved dependencies[0m | ||
[0m[[0m[0minfo[0m] [0m[0mFetching artifacts of [0m | ||
[0m[[0m[0minfo[0m] [0m[0mFetched artifacts of [0m | ||
[0m[[0m[0mdebug[0m] [0m[0mDone updating ProjectRef(uri("file:/Users/kamilpiskorz/Desktop/college/ebiznes/zad2/hello/project/"), "hello-build")[0m |
1 change: 1 addition & 0 deletions
1
...a/Products project/project/target/streams/compile/_global/_global/compileOutputs/previous
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
["sbt.Task[scala.collection.Seq[java.nio.file.Path]]",["/Users/kamilpiskorz/Desktop/college/ebiznes/zad2/hello/project/target/scala-2.12/sbt-1.0/zinc/inc_compile_2.12.zip"]] |
1 change: 1 addition & 0 deletions
1
...roducts project/project/target/streams/compile/_global/_global/discoveredMainClasses/data
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[] |
Empty file.
Empty file.
Empty file.
6 changes: 6 additions & 0 deletions
6
...la/Products project/project/target/streams/compile/compileIncremental/_global/streams/out
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
[0m[[0m[0mdebug[0m] [0m[0m[zinc] IncrementalCompile -----------[0m | ||
[0m[[0m[0mdebug[0m] [0m[0mIncrementalCompile.incrementalCompile[0m | ||
[0m[[0m[0mdebug[0m] [0m[0mprevious = Stamps for: 0 products, 0 sources, 0 libraries[0m | ||
[0m[[0m[0mdebug[0m] [0m[0mcurrent source = Set()[0m | ||
[0m[[0m[0mdebug[0m] [0m[0m> initialChanges = InitialChanges(Changes(added = Set(), removed = Set(), changed = Set(), unmodified = ...),Set(),Set(),API Changes: Set())[0m | ||
[0m[[0m[0mdebug[0m] [0m[0mFull compilation, no sources in previous analysis.[0m |
2 changes: 2 additions & 0 deletions
2
...- Scala/Products project/project/target/streams/compile/copyResources/_global/streams/out
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[0m[[0m[0mdebug[0m] [0m[0mCopy resource mappings: [0m | ||
[0m[[0m[0mdebug[0m] [0m[0m [0m |
1 change: 1 addition & 0 deletions
1
...roducts project/project/target/streams/compile/dependencyClasspath/_global/streams/export
Large diffs are not rendered by default.
Oops, something went wrong.
1 change: 1 addition & 0 deletions
1
...a/Products project/project/target/streams/compile/exportedProducts/_global/streams/export
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/Users/kamilpiskorz/Desktop/college/ebiznes/zad2/hello/project/target/scala-2.12/sbt-1.0/classes |
1 change: 1 addition & 0 deletions
1
...project/project/target/streams/compile/externalDependencyClasspath/_global/streams/export
Large diffs are not rendered by default.
Oops, something went wrong.
5 changes: 5 additions & 0 deletions
5
zad2 - Scala/Products project/project/target/streams/compile/incOptions/_global/streams/out
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[0m[[0m[0mdebug[0m] [0m[0mCreated transactional ClassFileManager with tempDir = /Users/kamilpiskorz/Desktop/college/ebiznes/zad2/hello/project/target/scala-2.12/sbt-1.0/classes.bak[0m | ||
[0m[[0m[0mdebug[0m] [0m[0mAbout to delete class files:[0m | ||
[0m[[0m[0mdebug[0m] [0m[0mWe backup class files:[0m | ||
[0m[[0m[0mdebug[0m] [0m[0mCreated transactional ClassFileManager with tempDir = /Users/kamilpiskorz/Desktop/college/ebiznes/zad2/hello/project/target/scala-2.12/sbt-1.0/classes.bak[0m | ||
[0m[[0m[0mdebug[0m] [0m[0mRemoving the temporary directory used for backing up class files: /Users/kamilpiskorz/Desktop/college/ebiznes/zad2/hello/project/target/scala-2.12/sbt-1.0/classes.bak[0m |
1 change: 1 addition & 0 deletions
1
...project/project/target/streams/compile/internalDependencyClasspath/_global/streams/export
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
|
Empty file.
1 change: 1 addition & 0 deletions
1
...a/Products project/project/target/streams/compile/managedClasspath/_global/streams/export
Large diffs are not rendered by default.
Oops, something went wrong.
Empty file.
1 change: 1 addition & 0 deletions
1
...Products project/project/target/streams/compile/unmanagedClasspath/_global/streams/export
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
|
Empty file.
1 change: 1 addition & 0 deletions
1
...cala/Products project/project/target/streams/compile/unmanagedJars/_global/streams/export
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
|
1 change: 1 addition & 0 deletions
1
...roducts project/project/target/streams/runtime/dependencyClasspath/_global/streams/export
Large diffs are not rendered by default.
Oops, something went wrong.
1 change: 1 addition & 0 deletions
1
...a/Products project/project/target/streams/runtime/exportedProducts/_global/streams/export
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/Users/kamilpiskorz/Desktop/college/ebiznes/zad2/hello/project/target/scala-2.12/sbt-1.0/classes |
1 change: 1 addition & 0 deletions
1
...project/project/target/streams/runtime/externalDependencyClasspath/_global/streams/export
Large diffs are not rendered by default.
Oops, something went wrong.
1 change: 1 addition & 0 deletions
1
...cala/Products project/project/target/streams/runtime/fullClasspath/_global/streams/export
Large diffs are not rendered by default.
Oops, something went wrong.
1 change: 1 addition & 0 deletions
1
...project/project/target/streams/runtime/internalDependencyClasspath/_global/streams/export
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/Users/kamilpiskorz/Desktop/college/ebiznes/zad2/hello/project/target/scala-2.12/sbt-1.0/classes |
Empty file.
1 change: 1 addition & 0 deletions
1
...a/Products project/project/target/streams/runtime/managedClasspath/_global/streams/export
Large diffs are not rendered by default.
Oops, something went wrong.
1 change: 1 addition & 0 deletions
1
...Products project/project/target/streams/runtime/unmanagedClasspath/_global/streams/export
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
|
Empty file.
1 change: 1 addition & 0 deletions
1
...cala/Products project/project/target/streams/runtime/unmanagedJars/_global/streams/export
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file.
Empty file.
45 changes: 45 additions & 0 deletions
45
zad2 - Scala/Products project/test/controllers/HomeControllerSpec.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
package controllers | ||
|
||
import org.scalatestplus.play._ | ||
import org.scalatestplus.play.guice._ | ||
import play.api.test._ | ||
import play.api.test.Helpers._ | ||
|
||
/** | ||
* Add your spec here. | ||
* You can mock out a whole application including requests, plugins etc. | ||
* | ||
* For more information, see https://www.playframework.com/documentation/latest/ScalaTestingWithScalaTest | ||
*/ | ||
class HomeControllerSpec extends PlaySpec with GuiceOneAppPerTest with Injecting { | ||
|
||
"HomeController GET" should { | ||
|
||
"render the index page from a new instance of controller" in { | ||
val controller = new HomeController(stubControllerComponents()) | ||
val home = controller.index().apply(FakeRequest(GET, "/")) | ||
|
||
status(home) mustBe OK | ||
contentType(home) mustBe Some("text/html") | ||
contentAsString(home) must include ("Welcome to Play") | ||
} | ||
|
||
"render the index page from the application" in { | ||
val controller = inject[HomeController] | ||
val home = controller.index().apply(FakeRequest(GET, "/")) | ||
|
||
status(home) mustBe OK | ||
contentType(home) mustBe Some("text/html") | ||
contentAsString(home) must include ("Welcome to Play") | ||
} | ||
|
||
"render the index page from the router" in { | ||
val request = FakeRequest(GET, "/") | ||
val home = route(app, request).get | ||
|
||
status(home) mustBe OK | ||
contentType(home) mustBe Some("text/html") | ||
contentAsString(home) must include ("Welcome to Play") | ||
} | ||
} | ||
} |