Skip to content

Updates Project #107

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 23, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions AUTHORS.md
Original file line number Diff line number Diff line change
@@ -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)
22 changes: 22 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -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).
31 changes: 31 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -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:[email protected]).

## 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.
6 changes: 3 additions & 3 deletions LICENSE → LICENSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -178,15 +178,15 @@
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
file or class name and description of purpose be included on the
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 <https://47deg.com>

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand All @@ -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.
9 changes: 9 additions & 0 deletions NOTICE.md
Original file line number Diff line number Diff line change
@@ -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.
35 changes: 10 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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}
}
```
Expand Down Expand Up @@ -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"
Expand All @@ -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"
Expand Down Expand Up @@ -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 [email protected]

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.
12 changes: 6 additions & 6 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -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"

Expand All @@ -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,
Expand All @@ -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`)

Expand Down
Binary file removed keys.tar.gz.gpg
Binary file not shown.
104 changes: 35 additions & 69 deletions project/ProjectPlugin.scala
Original file line number Diff line number Diff line change
@@ -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(
Expand Down Expand Up @@ -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
)
)

Expand All @@ -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 = "[email protected]"
),
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. <http://www.47deg.com>
|
|""".stripMargin
)
)
) ++ shellPromptSettings
cancelable in Global := true
)
}
Loading