From 45fd0e215066a3f17bf2da2cb82f87d3ce8aa00a Mon Sep 17 00:00:00 2001 From: Juan Pedro Moreno Date: Thu, 23 Apr 2020 09:55:48 +0200 Subject: [PATCH] Removes sbt-org-policies --- AUTHORS.md | 32 ++++++ CODE_OF_CONDUCT.md | 22 ++++ CONTRIBUTING.md | 31 ++++++ LICENSE => LICENSE.md | 6 +- NOTICE.md | 9 ++ README.md | 35 ++---- build.sbt | 12 +- keys.tar.gz.gpg | Bin 3393 -> 0 bytes project/ProjectPlugin.scala | 104 ++++++------------ project/plugins.sbt | 10 +- .../org/scalaexercises/evaluator/auth.scala | 13 ++- .../org/scalaexercises/evaluator/codecs.scala | 13 ++- .../scalaexercises/evaluator/evaluation.scala | 13 ++- .../scalaexercises/evaluator/services.scala | 13 ++- .../org/scalaexercises/evaluator/types.scala | 13 ++- .../evaluator/EvalEndpointSpec.scala | 13 ++- .../evaluator/EvaluatorSpec.scala | 13 ++- .../scalaexercises/evaluator/Implicits.scala | 13 ++- .../org/scalaexercises/evaluator/helper.scala | 13 ++- 19 files changed, 253 insertions(+), 125 deletions(-) create mode 100644 AUTHORS.md create mode 100644 CODE_OF_CONDUCT.md create mode 100644 CONTRIBUTING.md rename LICENSE => LICENSE.md (99%) create mode 100644 NOTICE.md delete mode 100644 keys.tar.gz.gpg diff --git a/AUTHORS.md b/AUTHORS.md new file mode 100644 index 00000000..8d6c12d9 --- /dev/null +++ b/AUTHORS.md @@ -0,0 +1,32 @@ +[comment]: <> (Don't edit this file!) +[comment]: <> (It is automatically updated after every release of https://github.com/47degrees/.github) +[comment]: <> (If you want to suggest a change, please open a PR or issue in that repository) + +# Authors + +## Maintainers + +The maintainers of the project are: + +- [![47erbot](https://avatars1.githubusercontent.com/u/24799081?v=4&s=20) **47erbot**](https://github.com/47erbot) +- [![angoglez](https://avatars0.githubusercontent.com/u/10107285?v=4&s=20) **Ana Gómez González (angoglez)**](https://github.com/angoglez) +- [![andyscott](https://avatars3.githubusercontent.com/u/310363?v=4&s=20) **Andy Scott (andyscott)**](https://github.com/andyscott) +- [![dominv](https://avatars1.githubusercontent.com/u/3943031?v=4&s=20) **Domingo Valera (dominv)**](https://github.com/dominv) +- [![kiroco12](https://avatars1.githubusercontent.com/u/48894338?v=4&s=20) **Enrique Nieto (kiroco12)**](https://github.com/kiroco12) +- [![jdesiloniz](https://avatars2.githubusercontent.com/u/2835739?v=4&s=20) **Javier de Silóniz Sandino (jdesiloniz)**](https://github.com/jdesiloniz) +- [![juanpedromoreno](https://avatars2.githubusercontent.com/u/4879373?v=4&s=20) **Juan Pedro Moreno (juanpedromoreno)**](https://github.com/juanpedromoreno) +- [![raulraja](https://avatars3.githubusercontent.com/u/456796?v=4&s=20) **Raúl Raja Martínez (raulraja)**](https://github.com/raulraja) + +## Contributors + +These are the people that have contributed to the _evaluator_ project: + +- [![juanpedromoreno](https://avatars2.githubusercontent.com/u/4879373?v=4&s=20) **juanpedromoreno**](https://github.com/juanpedromoreno) +- [![kiroco12](https://avatars1.githubusercontent.com/u/48894338?v=4&s=20) **kiroco12**](https://github.com/kiroco12) +- [![raulraja](https://avatars3.githubusercontent.com/u/456796?v=4&s=20) **raulraja**](https://github.com/raulraja) +- [![noelmarkham](https://avatars1.githubusercontent.com/u/1492487?v=4&s=20) **noelmarkham**](https://github.com/noelmarkham) +- [![dominv](https://avatars1.githubusercontent.com/u/3943031?v=4&s=20) **dominv**](https://github.com/dominv) +- [![jdesiloniz](https://avatars2.githubusercontent.com/u/2835739?v=4&s=20) **jdesiloniz**](https://github.com/jdesiloniz) +- [![andyscott](https://avatars3.githubusercontent.com/u/310363?v=4&s=20) **andyscott**](https://github.com/andyscott) +- [![angoglez](https://avatars0.githubusercontent.com/u/10107285?v=4&s=20) **angoglez**](https://github.com/angoglez) +- [![47erbot](https://avatars1.githubusercontent.com/u/24799081?v=4&s=20) **47erbot**](https://github.com/47erbot) \ No newline at end of file diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 00000000..1cf05d1e --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,22 @@ +[comment]: <> (Don't edit this file!) +[comment]: <> (It is automatically updated after every release of https://github.com/47degrees/.github) +[comment]: <> (If you want to suggest a change, please open a PR or issue in that repository) + +# Code of Conduct + +We are committed to providing a friendly, safe and welcoming +environment for all, regardless of level of experience, gender, gender +identity and expression, sexual orientation, disability, personal +appearance, body size, race, ethnicity, age, religion, nationality, or +other such characteristics. + +Everyone is expected to follow the +[Scala Code of Conduct](https://typelevel.org/code-of-conduct.html) when +discussing the project on the available communication channels. If you +are being harassed, please contact us immediately so that we can +support you. + +## Moderation + +For any questions, concerns, or moderation requests please contact a +[member of the project](AUTHORS.md#maintainers). \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000..9b96383e --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,31 @@ +[comment]: <> (Don't edit this file!) +[comment]: <> (It is automatically updated after every release of https://github.com/47degrees/.github) +[comment]: <> (If you want to suggest a change, please open a PR or issue in that repository) + +# Contributing + +Discussion around _evaluator_ happens in the [GitHub issues](https://github.com/scala-exercises/evaluator/issues) and [pull requests](https://github.com/scala-exercises/evaluator/pulls). + +Feel free to open an issue if you notice a bug, have an idea for a feature, or have a question about +the code. Pull requests are also welcome. + +People are expected to follow the [Code of Conduct](CODE_OF_CONDUCT.md) when discussing _evaluator_ on the Github page or other venues. + +If you are being harassed, please contact one of [us](AUTHORS.md#maintainers) immediately so that we can support you. In case you cannot get in touch with us please write an email to [47 Degrees](mailto:scala-exercises@47deg.com). + +## How can I help? + +_evaluator_ follows a standard [fork and pull](https://help.github.com/articles/using-pull-requests/) model for contributions via GitHub pull requests. + +The process is simple: + + 1. Find something you want to work on + 2. Let us know you are working on it via GitHub issues/pull requests + 3. Implement your contribution + 4. Write tests + 5. Update the documentation + 6. Submit pull request + +You will be automatically included in the [AUTHORS.md](AUTHORS.md#contributors) file as contributor in the next release. + +If you encounter any confusion or frustration during the contribution process, please create a GitHub issue and we'll do our best to improve the process. \ No newline at end of file diff --git a/LICENSE b/LICENSE.md similarity index 99% rename from LICENSE rename to LICENSE.md index 8dada3ed..fef1c3a0 100644 --- a/LICENSE +++ b/LICENSE.md @@ -178,7 +178,7 @@ APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" + boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright {yyyy} {name of copyright owner} + Copyright (C) 2016-2020 47 Degrees Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -198,4 +198,4 @@ distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and - limitations under the License. + limitations under the License. \ No newline at end of file diff --git a/NOTICE.md b/NOTICE.md new file mode 100644 index 00000000..5fd14c12 --- /dev/null +++ b/NOTICE.md @@ -0,0 +1,9 @@ +[comment]: <> (Don't edit this file!) +[comment]: <> (It is automatically updated after every release of https://github.com/47degrees/.github) +[comment]: <> (If you want to suggest a change, please open a PR or issue in that repository) + +evaluator + +Copyright (c) 2016-2020 47 Degrees. All rights reserved. + +Licensed under Apache-2.0. See [LICENSE](LICENSE.md) for terms. \ No newline at end of file diff --git a/README.md b/README.md index 842fa185..1f17cef9 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,3 @@ -[![Build Status](https://travis-ci.org/scala-exercises/evaluator.svg?branch=master)](https://travis-ci.org/scala-exercises/evaluator) - # Remote Scala Eval The remote Scala evaluator is a server based application that @@ -14,14 +12,14 @@ sbt "project evaluator-server" "run" # Authentication The remote Scala eval uses [JWT](https://jwt.io/) to encode / decode tokens. -The `secretKey` used for encoding/decoding is configurable as part of the service configuration in +The `secretKey` used for encoding/decoding is configurable as part of the service configuration in `server/src/main/resources/application.conf`. Please change `secretKey` by overriding it or providing the `EVAL_SECRET_KEY` env var. ``` eval.auth { - secretKey = "secretKey" + secretKey = "secretKey" secretKey = ${?EVAL_SECRET_KEY} } ``` @@ -52,12 +50,12 @@ Requests are sent in JSON format via HTTP POST and are authenticated via the `x- Given the token above a sample request may look like: ```bash -curl -X POST -H "Content-Type: application/json" -H "x-scala-eval-api-token: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eW91ciBpZGVudGl0eQ.cfH43Wa7k_w1i0W2pQhV1k21t2JqER9lw5EpJcENRMI" -d '{ - "resolvers":[ +curl -X POST -H "Content-Type: application/json" -H "x-scala-eval-api-token: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eW91ciBpZGVudGl0eQ.cfH43Wa7k_w1i0W2pQhV1k21t2JqER9lw5EpJcENRMI" -d '{ + "resolvers":[ "https://oss.sonatype.org/content/repositories/releases" ], - "dependencies":[ - { + "dependencies":[ + { "groupId":"org.typelevel", "artifactId":"cats-core_2.11", "version":"0.4.1" @@ -78,12 +76,12 @@ x-scala-eval-api-token : eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eW91ciBpZGVudGl0eQ ## Body ```json -{ - "resolvers":[ +{ + "resolvers":[ "https://oss.sonatype.org/content/repositories/releases" ], - "dependencies":[ - { + "dependencies":[ + { "groupId":"org.typelevel", "artifactId":"cats-core_2.11", "version":"0.4.1" @@ -151,16 +149,3 @@ Evaluating code that may result in a thrown exception "compilationInfos": {} } ``` - - -# License - -Copyright (C) 2015-2016 47 Degrees, LLC. Reactive, scalable software solutions. http://47deg.com hello@47deg.com - -Some parts of the code have been taken from twitter-eval, and slightly adapted to the evaluator needs. Copyright 2010 Twitter, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at - -http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. \ No newline at end of file diff --git a/build.sbt b/build.sbt index c11c086d..dda1654c 100644 --- a/build.sbt +++ b/build.sbt @@ -1,5 +1,5 @@ -addCommandAlias("ci-test", "scalafmtCheck; scalafmtSbtCheck; test") -addCommandAlias("ci-docs", "project-docs/mdoc") +addCommandAlias("ci-test", "github; scalafmtCheck; scalafmtSbtCheck; test") +addCommandAlias("ci-docs", "github; project-docs/mdoc; headerCreateAll") Universal / javaOptions += "-Dscala.classpath.closeZip=true" @@ -8,7 +8,7 @@ lazy val `evaluator-server` = (project in file("server")) .enablePlugins(AutomateHeaderPlugin) .enablePlugins(sbtdocker.DockerPlugin) .enablePlugins(BuildInfoPlugin) - .settings(noPublishSettings: _*) + .settings(skip in publish := true) .settings( name := "evaluator-server", serverHttpDependencies, @@ -21,17 +21,17 @@ lazy val `evaluator-server` = (project in file("server")) lazy val smoketests = (project in file("smoketests")) .dependsOn(`evaluator-server`) .enablePlugins(BuildInfoPlugin) - .settings(noPublishSettings: _*) + .settings(skip in publish := true) .settings( name := "evaluator-server-smoke-tests", - smoketestDependencies + serverHttpDependencies ) .settings(buildInfoSettings: _*) lazy val root = (project in file(".")) .settings(mainClass in Universal := Some("org.scalaexercises.evaluator.EvaluatorServer")) .settings(stage := (stage in Universal in `evaluator-server`).value) - .settings(noPublishSettings: _*) + .settings(skip in publish := true) .aggregate(`evaluator-server`) .dependsOn(`evaluator-server`) diff --git a/keys.tar.gz.gpg b/keys.tar.gz.gpg deleted file mode 100644 index bf7359eba0925006fb900b378979692f47b15798..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3393 zcmV-H4ZiY>4Fm@R0*^s=t~ECjF<{cnZvhhR+)8QWSv|SrXsfA&sZMx-vLC;&IuZ`y zBcPC7`4BE+ut+nN`bO!kg#AS9J184_L}X;qzN6i{jiK3s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-77TbD$$$YX@BLGRG(QNmRbJy z56dNcRvB#mxXIf>lsvyayW1PB1&~`_GvY{5QZ)HaB0H2zWa*5R>#^IguKstSBN@Z) z)H9)usiUA@c%_k^5)E(A!sRN+%>M3CgOA@xbBv7XmQRNLF z4(+_~TcFK;gvV1VX|h!XXB`C5OYQ>+>iXnR!$^#_l~pKjQiU~0gH_Mk26of!mON9T zi~BO0AFFp3JCa84<*`493{NF4U@#FfIE(4sA=>|ZnD`P^cw86G_v#_oI~cf_KFNHi z5mT7=!=;McygK{T@v#6LFO{$PL~UDGQu2>sMMs3fNMng=FEJ$v13NUMC=LfD`#Q+i z8iPpT_Fby_HfR3Wm_1vh9EabWs*JghnH4XD`?EeB>mv_z19hB^_dX4%Q+EB}?5*#v zH~}-8&VjehTa-P`TK#h}`T*s%FY3#cZXf3tIQ3SXw&w^*%)AG#%POPZ#bcmR7ZA)AL`gmq}G}q diff --git a/project/ProjectPlugin.scala b/project/ProjectPlugin.scala index 91d899a7..82f0b05a 100644 --- a/project/ProjectPlugin.scala +++ b/project/ProjectPlugin.scala @@ -1,35 +1,35 @@ import de.heikoseeberger.sbtheader.HeaderPlugin import de.heikoseeberger.sbtheader.HeaderPlugin.autoImport._ import sbt.Keys._ -import sbt.{Def, _} +import sbt._ import sbtassembly.AssemblyPlugin.autoImport.assembly import sbtbuildinfo.BuildInfoKey import sbtbuildinfo.BuildInfoPlugin.autoImport._ import sbtdocker.DockerPlugin.autoImport._ -import sbtorgpolicies.OrgPoliciesPlugin.autoImport._ -import sbtorgpolicies._ -import sbtorgpolicies.model._ +import com.alejandrohdezma.sbt.github.SbtGithubPlugin object ProjectPlugin extends AutoPlugin { override def trigger: PluginTrigger = allRequirements - override def requires: Plugins = plugins.JvmPlugin && HeaderPlugin && OrgPoliciesPlugin + override def requires: Plugins = plugins.JvmPlugin && SbtGithubPlugin object autoImport { object V { lazy val cats = "2.1.0" - lazy val http4s = "0.21.0-M6" - lazy val circe = "0.12.3" + lazy val catsEffect = "2.1.3" + lazy val http4s = "0.21.3" + lazy val circe = "0.13.0" lazy val log4s = "1.7.0" lazy val scalatest = "3.1.1" - lazy val scalatestplusScheck = "3.1.0.0-RC2" + lazy val scalatestplusScheck = "3.1.1.1" lazy val jodaTime = "2.10.5" - lazy val slf4jSimple = "1.7.30" + lazy val slf4j = "1.7.30" lazy val jwtCore = "4.3.0" - lazy val coursier = "2.0.0-RC5-6" + lazy val coursier = "2.0.0-RC6-12" lazy val config = "1.4.0" + lazy val scala = "2.13.1" } lazy val dockerSettings = Seq( @@ -66,22 +66,22 @@ object ProjectPlugin extends AutoPlugin { lazy val serverHttpDependencies = Seq( libraryDependencies ++= Seq( - %%("cats-core", V.cats), - %%("cats-effect", V.cats), - %%("circe-core", V.circe), - %%("circe-generic", V.circe), - %("slf4j-simple", V.slf4jSimple), - %%("http4s-dsl", V.http4s), - %%("http4s-blaze-server", V.http4s), - %%("http4s-circe", V.http4s), - %("config", V.config), - %%("jwt-core", V.jwtCore), - %%("coursier", V.coursier), - %%("coursier-cache", V.coursier), - "io.get-coursier" %% "coursier-cats-interop" % V.coursier, - %%("scalatest", V.scalatest), - "org.scalatestplus" %% "scalatestplus-scalacheck" % V.scalatestplusScheck, - "joda-time" % "joda-time" % V.jodaTime + "org.typelevel" %% "cats-core" % V.cats, + "org.typelevel" %% "cats-effect" % V.catsEffect, + "io.circe" %% "circe-core" % V.circe, + "io.circe" %% "circe-generic" % V.circe, + "org.slf4j" % "slf4j-simple" % V.slf4j, + "org.http4s" %% "http4s-dsl" % V.http4s, + "org.http4s" %% "http4s-blaze-server" % V.http4s, + "org.http4s" %% "http4s-circe" % V.http4s, + "io.get-coursier" %% "coursier" % V.coursier, + "io.get-coursier" %% "coursier-cache" % V.coursier, + "com.typesafe" % "config" % V.config, + "com.pauldijou" %% "jwt-core" % V.jwtCore, + "io.get-coursier" %% "coursier-cats-interop" % V.coursier, + "org.scalatest" %% "scalatest" % V.scalatest, + "org.scalatestplus" %% "scalacheck-1-14" % V.scalatestplusScheck, + "joda-time" % "joda-time" % V.jodaTime ) ) @@ -90,57 +90,23 @@ object ProjectPlugin extends AutoPlugin { buildInfoPackage := "org.scalaexercises.evaluator" ) - lazy val smoketestDependencies = Seq( - libraryDependencies ++= Seq( - %%("cats-core", V.cats), - %%("cats-effect", V.cats), - %%("circe-core", V.circe), - %%("circe-generic", V.circe), - %%("circe-parser", V.circe), - %%("http4s-blaze-client", V.http4s), - %%("http4s-circe", V.http4s), - %%("jwt-core", V.jwtCore), - %%("scalatest", V.scalatest) % Test, - "org.scalatestplus" %% "scalatestplus-scalacheck" % V.scalatestplusScheck % Test - ) - ) - } + import autoImport._ + override def projectSettings: Seq[Def.Setting[_]] = Seq( name := "evaluator", description := "Scala Exercises: The path to enlightenment", - startYear := Option(2016), - resolvers ++= Seq( - Resolver.mavenLocal, - Resolver.sonatypeRepo("snapshots"), - Resolver.sonatypeRepo("releases") - ), - orgGithubSetting := GitHubSettings( - organization = "scala-exercises", - project = name.value, - organizationName = "Scala Exercises", - groupId = "org.scala-exercises", - organizationHomePage = url("https://www.scala-exercises.org"), - organizationEmail = "hello@47deg.com" - ), - orgLicenseSetting := ApacheLicense, - scalaVersion := "2.13.1", - scalaOrganization := "org.scala-lang", + organization := "org.scala-exercises", + organizationName := "47 Degrees", + organizationHomepage := Some(url("https://47deg.com")), + scalaVersion := V.scala, + crossScalaVersions := Seq(V.scala), scalacOptions ~= (_ filterNot (_ == "-Xfuture")), scalacOptions += "-Ymacro-annotations", javacOptions ++= Seq("-encoding", "UTF-8", "-Xlint:-options"), parallelExecution in Test := false, - cancelable in Global := true, - headerLicense := Some( - HeaderLicense.Custom( - s"""| - | scala-exercises - ${name.value} - | Copyright (C) 2015-2019 47 Degrees, LLC. - | - |""".stripMargin - ) - ) - ) ++ shellPromptSettings + cancelable in Global := true + ) } diff --git a/project/plugins.sbt b/project/plugins.sbt index e86f1b01..faee546c 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,10 +1,12 @@ -resolvers += Resolver.sonatypeRepo("snapshots") addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.7.0") addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.10") -addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.9.0") addSbtPlugin("se.marcuslonnberg" % "sbt-docker" % "1.5.0") -addSbtPlugin("com.47deg" % "sbt-org-policies" % "0.13.3") +addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.9.0") addSbtPlugin("com.geirsson" % "sbt-ci-release" % "1.5.3") +addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.3.4") addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.1.5") -addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.3.3") +addSbtPlugin("de.heikoseeberger" % "sbt-header" % "5.6.0") +addSbtPlugin("com.alejandrohdezma" %% "sbt-github" % "0.8.0") +addSbtPlugin("com.alejandrohdezma" % "sbt-github-header" % "0.8.0") +addSbtPlugin("com.alejandrohdezma" % "sbt-github-mdoc" % "0.8.0") addSbtPlugin("com.alejandrohdezma" % "sbt-mdoc-toc" % "0.2") diff --git a/server/src/main/scala/org/scalaexercises/evaluator/auth.scala b/server/src/main/scala/org/scalaexercises/evaluator/auth.scala index 957bb971..01d4ed4c 100644 --- a/server/src/main/scala/org/scalaexercises/evaluator/auth.scala +++ b/server/src/main/scala/org/scalaexercises/evaluator/auth.scala @@ -1,8 +1,17 @@ /* + * Copyright 2016-2020 47 Degrees * - * scala-exercises - evaluator-server - * Copyright (C) 2015-2019 47 Degrees, LLC. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package org.scalaexercises.evaluator diff --git a/server/src/main/scala/org/scalaexercises/evaluator/codecs.scala b/server/src/main/scala/org/scalaexercises/evaluator/codecs.scala index 84c71eb6..4e0227b0 100644 --- a/server/src/main/scala/org/scalaexercises/evaluator/codecs.scala +++ b/server/src/main/scala/org/scalaexercises/evaluator/codecs.scala @@ -1,8 +1,17 @@ /* + * Copyright 2016-2020 47 Degrees * - * scala-exercises - evaluator-server - * Copyright (C) 2015-2019 47 Degrees, LLC. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package org.scalaexercises.evaluator diff --git a/server/src/main/scala/org/scalaexercises/evaluator/evaluation.scala b/server/src/main/scala/org/scalaexercises/evaluator/evaluation.scala index dea73f77..9d6e3e39 100644 --- a/server/src/main/scala/org/scalaexercises/evaluator/evaluation.scala +++ b/server/src/main/scala/org/scalaexercises/evaluator/evaluation.scala @@ -1,8 +1,17 @@ /* + * Copyright 2016-2020 47 Degrees * - * scala-exercises - evaluator-server - * Copyright (C) 2015-2019 47 Degrees, LLC. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package org.scalaexercises.evaluator diff --git a/server/src/main/scala/org/scalaexercises/evaluator/services.scala b/server/src/main/scala/org/scalaexercises/evaluator/services.scala index e9b9b967..be7ab666 100644 --- a/server/src/main/scala/org/scalaexercises/evaluator/services.scala +++ b/server/src/main/scala/org/scalaexercises/evaluator/services.scala @@ -1,8 +1,17 @@ /* + * Copyright 2016-2020 47 Degrees * - * scala-exercises - evaluator-server - * Copyright (C) 2015-2019 47 Degrees, LLC. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package org.scalaexercises.evaluator diff --git a/server/src/main/scala/org/scalaexercises/evaluator/types.scala b/server/src/main/scala/org/scalaexercises/evaluator/types.scala index ea901182..e5a82e67 100644 --- a/server/src/main/scala/org/scalaexercises/evaluator/types.scala +++ b/server/src/main/scala/org/scalaexercises/evaluator/types.scala @@ -1,8 +1,17 @@ /* + * Copyright 2016-2020 47 Degrees * - * scala-exercises - evaluator-server - * Copyright (C) 2015-2019 47 Degrees, LLC. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package org.scalaexercises.evaluator diff --git a/server/src/test/scala/org/scalaexercises/evaluator/EvalEndpointSpec.scala b/server/src/test/scala/org/scalaexercises/evaluator/EvalEndpointSpec.scala index fc498d3e..76aec46d 100644 --- a/server/src/test/scala/org/scalaexercises/evaluator/EvalEndpointSpec.scala +++ b/server/src/test/scala/org/scalaexercises/evaluator/EvalEndpointSpec.scala @@ -1,8 +1,17 @@ /* + * Copyright 2016-2020 47 Degrees * - * scala-exercises - evaluator-server - * Copyright (C) 2015-2019 47 Degrees, LLC. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package org.scalaexercises.evaluator diff --git a/server/src/test/scala/org/scalaexercises/evaluator/EvaluatorSpec.scala b/server/src/test/scala/org/scalaexercises/evaluator/EvaluatorSpec.scala index a4d20a5c..906fabd3 100644 --- a/server/src/test/scala/org/scalaexercises/evaluator/EvaluatorSpec.scala +++ b/server/src/test/scala/org/scalaexercises/evaluator/EvaluatorSpec.scala @@ -1,8 +1,17 @@ /* + * Copyright 2016-2020 47 Degrees * - * scala-exercises - evaluator-server - * Copyright (C) 2015-2019 47 Degrees, LLC. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package org.scalaexercises.evaluator diff --git a/server/src/test/scala/org/scalaexercises/evaluator/Implicits.scala b/server/src/test/scala/org/scalaexercises/evaluator/Implicits.scala index 1551426e..375bcc77 100644 --- a/server/src/test/scala/org/scalaexercises/evaluator/Implicits.scala +++ b/server/src/test/scala/org/scalaexercises/evaluator/Implicits.scala @@ -1,8 +1,17 @@ /* + * Copyright 2016-2020 47 Degrees * - * scala-exercises - evaluator-server - * Copyright (C) 2015-2019 47 Degrees, LLC. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package org.scalaexercises.evaluator diff --git a/server/src/test/scala/org/scalaexercises/evaluator/helper.scala b/server/src/test/scala/org/scalaexercises/evaluator/helper.scala index f9bdf6ec..5dd72965 100644 --- a/server/src/test/scala/org/scalaexercises/evaluator/helper.scala +++ b/server/src/test/scala/org/scalaexercises/evaluator/helper.scala @@ -1,8 +1,17 @@ /* + * Copyright 2016-2020 47 Degrees * - * scala-exercises - evaluator-server - * Copyright (C) 2015-2019 47 Degrees, LLC. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package org.scalaexercises.evaluator