Skip to content
Permalink
Browse files

WIP "Traversing and Modifying", "Optics", and "Encoding and Decoding"…

… sections, added.
  • Loading branch information...
AntonioMateoGomez committed Apr 3, 2017
1 parent 1da6c9a commit f5c6e2e72d1cb03abc5e00afc67e87eee5567751
@@ -0,0 +1,22 @@
style = defaultWithAlign
maxColumn = 100

continuationIndent.callSite = 2

newlines {
sometimesBeforeColonInMethodReturnType = false
}

align {
arrowEnumeratorGenerator = false
ifWhileOpenParen = false
openParenCallSite = false
openParenDefnSite = false
}

docstrings = JavaDoc

rewrite {
rules = [SortImports, RedundantBraces]
redundantBraces.maxLines = 1
}
@@ -1,9 +1,14 @@
language: scala
scala:
- 2.11.8
- 2.11.8
jdk:
- oraclejdk8
- oraclejdk8
script:
- sbt test
- sbt test
- if [ "$TRAVIS_BRANCH" = "master" -a "$TRAVIS_PULL_REQUEST" = "false" ]; then
openssl aes-256-cbc -K $encrypted_40545b9562dd_key -iv $encrypted_40545b9562dd_iv
-in secring.gpg.enc -out secring.gpg -d;
fi
after_success:
- bash deploy.sh
- if [ "$TRAVIS_BRANCH" = "master" -a "$TRAVIS_PULL_REQUEST" = "false" ]; then sbt
compile publishSigned; fi
@@ -15,7 +15,7 @@ Scala Exercises is available at [scala-exercises.org](https://scala-exercises.or
Contributions welcome! Please join our [Gitter channel](https://gitter.im/scala-exercises/scala-exercises)
to get involved, or visit our [GitHub site](https://github.com/scala-exercises).

##License
## License

Copyright (C) 2015-2016 47 Degrees, LLC.
Reactive, scalable software solutions.
@@ -1,56 +1,29 @@
val circeVersion = "0.4.1"
val scalaExerciesV = "0.4.0-SNAPSHOT"
val circeVersion = "0.7.0"

lazy val circe = (project in file("."))
.settings(publishSettings:_*)
.enablePlugins(ExerciseCompilerPlugin)
.settings(
organization := "org.scala-exercises",
name := "exercises-circe",
scalaVersion := "2.11.8",
version := "0.2.2-SNAPSHOT",
resolvers ++= Seq(
Resolver.sonatypeRepo("snapshots"),
Resolver.sonatypeRepo("releases")
),
libraryDependencies ++= Seq(
"org.typelevel" %% "cats-core" % "0.4.1",
"com.chuusai" %% "shapeless" % "2.2.5",
"org.scalatest" %% "scalatest" % "2.2.4",
"org.scala-exercises" %% "exercise-compiler" % version.value,
"org.scala-exercises" %% "definitions" % version.value,
"org.scalacheck" %% "scalacheck" % "1.12.5",
"com.github.alexarchambault" %% "scalacheck-shapeless_1.12" % "0.3.1",
"io.circe" %% "circe-core" % circeVersion,
"io.circe" %% "circe-generic" % circeVersion,
"io.circe" %% "circe-parser" % circeVersion,
compilerPlugin("org.spire-math" %% "kind-projector" % "0.7.1")
def dep(artifactId: String) = "org.scala-exercises" %% artifactId % scalaExerciesV

lazy val `circe` = (project in file("."))
.enablePlugins(ExerciseCompilerPlugin)
.settings(
name := "exercises-circe",
libraryDependencies ++= Seq(
dep("exercise-compiler"),
dep("definitions"),
%%("circe-core"),
%%("circe-generic"),
%%("circe-parser"),
"io.circe" %% "circe-optics" % circeVersion,
%%("shapeless"),
%%("cats-core"),
%%("scalatest"),
%%("scalacheck"),
%%("scheckShapeless")
)
)
)

// Distribution

lazy val gpgFolder = sys.env.getOrElse("SE_GPG_FOLDER", ".")

lazy val publishSettings = Seq(
organizationName := "Scala Exercises",
organizationHomepage := Some(new URL("http://scala-exercises.org")),
startYear := Some(2016),
description := "Scala Exercises: The path to enlightenment",
homepage := Some(url("http://scala-exercises.org")),
pgpPassphrase := Some(sys.env.getOrElse("SE_GPG_PASSPHRASE", "").toCharArray),
pgpPublicRing := file(s"$gpgFolder/pubring.gpg"),
pgpSecretRing := file(s"$gpgFolder/secring.gpg"),
credentials += Credentials("Sonatype Nexus Repository Manager", "oss.sonatype.org", sys.env.getOrElse("PUBLISH_USERNAME", ""), sys.env.getOrElse("PUBLISH_PASSWORD", "")),
scmInfo := Some(ScmInfo(url("https://github.com/scala-exercises/exercises-circe"), "https://github.com/scala-exercises/exercises-circe.git")),
licenses := Seq("Apache License, Version 2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0.txt")),
publishMavenStyle := true,
publishArtifact in Test := false,
pomIncludeRepository := Function.const(false),
publishTo := {
val nexus = "https://oss.sonatype.org/"
if (isSnapshot.value)
Some("Snapshots" at nexus + "content/repositories/snapshots")
else
Some("Releases" at nexus + "service/local/staging/deploy/maven2")
}
)
pgpPassphrase := Some(getEnvVar("PGP_PASSPHRASE").getOrElse("").toCharArray)
pgpPublicRing := file(s"$gpgFolder/pubring.gpg")
pgpSecretRing := file(s"$gpgFolder/secring.gpg")
@@ -0,0 +1,47 @@
import de.heikoseeberger.sbtheader.HeaderPattern
import de.heikoseeberger.sbtheader.HeaderPlugin.autoImport._
import sbt.Keys._
import sbt._
import sbtorgpolicies._
import sbtorgpolicies.model._
import sbtorgpolicies.OrgPoliciesPlugin.autoImport._

object ProjectPlugin extends AutoPlugin {

override def trigger: PluginTrigger = allRequirements

override def requires: Plugins = plugins.JvmPlugin && OrgPoliciesPlugin

override def projectSettings: Seq[Def.Setting[_]] =
Seq(
description := "Scala Exercises: The path to enlightenment",
startYear := Option(2016),
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.11.8",
scalaOrganization := "org.scala-lang",
crossScalaVersions := Seq("2.11.8"),
resolvers ++= Seq(
Resolver.mavenLocal,
Resolver.sonatypeRepo("snapshots"),
Resolver.sonatypeRepo("releases")
),
scalacOptions := sbtorgpolicies.model.scalacCommonOptions,
headers := Map(
"scala" -> (HeaderPattern.cStyleBlockComment,
s"""|/*
| * scala-exercises - ${name.value}
| * Copyright (C) 2015-2016 47 Degrees, LLC. <http://www.47deg.com>
| */
|
|""".stripMargin)
)
)
}
@@ -1 +1 @@
sbt.version=0.13.9
sbt.version=0.13.13
@@ -1,3 +1,6 @@
resolvers += Resolver.sonatypeRepo("snapshots")
addSbtPlugin("org.scala-exercises" % "sbt-exercise" % "0.2.2-SNAPSHOT", "0.13", "2.10")
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.0.0")
resolvers ++= Seq(
Resolver.sonatypeRepo("snapshots")
)

addSbtPlugin("org.scala-exercises" % "sbt-exercise" % "0.4.0-SNAPSHOT", "0.13", "2.10")
addSbtPlugin("com.47deg" % "sbt-org-policies" % "0.3.2")
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg width="32px" height="32px" viewBox="0 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 42 (36781) - http://www.bohemiancoding.com/sketch -->
<title>circe-brand</title>
<desc>Created with Sketch.</desc>
<defs></defs>
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="Icon" transform="translate(2.000000, 0.000000)" fill="#FFFFFF">
<path d="M0.9,23.4708768 L13.98215,30.9516381 L27.09455,23.4705772 L27.09455,8.51619345 L13.9823,1.03518253 L0.9,8.51594384 L0.9,23.4708768 Z M13.98165,31.9868206 L0,23.9917629 L0,7.99505772 L13.9818,0 L27.99455,7.99475819 L27.99455,23.9920125 L13.98165,31.9868206 Z" id="Border"></path>
<path d="M19.05044,10.131225 C19.05049,10.3673061 19.02224,10.5995432 18.96789,10.8238927 L20.15744,10.131225 L19.05044,10.131225 Z M11.01849,8.08452293 L17.39204,11.7208911 C17.87014,11.333097 18.15059,10.750707 18.15044,10.131225 L16.05329,10.131225 L16.05329,9.23262902 L17.93749,9.23262902 C17.59644,8.55344025 16.88184,8.08452293 16.05874,8.08452293 L11.01849,8.08452293 Z M12.08744,12.624629 L12.08744,21.2655276 L15.65334,19.2288599 L15.65334,14.6577523 L12.08744,12.624629 Z M11.18744,25.7044418 L11.18744,22.8148069 L8.53219,24.3029816 L7.62954,23.7832936 L11.18744,21.7795744 L11.18744,11.0766477 L16.55334,14.1361173 L16.55334,19.7500456 L12.08744,22.3007601 L12.08744,24.1560112 L18.18754,20.6757491 L18.18754,13.2096649 L7.62954,7.18592699 L16.05874,7.18592699 C17.38864,7.18592699 18.52044,8.04698159 18.90774,9.23262902 L23.48709,9.23262902 L18.31224,12.2458708 L19.08754,12.6882296 L19.08754,21.1971844 L11.18744,25.7044418 Z"></path>
</g>
</g>
</svg>
@@ -1,17 +1,24 @@
package circelib
/*
* scala-exercises - exercises-circe
* Copyright (C) 2015-2016 47 Degrees, LLC. <http://www.47deg.com>
*/

package circelib

import org.scalaexercises.definitions

/** circe (pronounced SUR-see, or KEER-kee in classical Greek) is a JSON library for Scala (and Scala.js).
*
* @param name circe
*/
*
* @param name circe
*/
object CirceLibrary extends definitions.Library {
override def owner = "scala-exercises"
override def owner = "scala-exercises"
override def repository = "exercises-circe"

override def color = Some("#996666")

override def sections = List(JsonSection)
override def sections =
List(JsonSection, TraversingSection, OpticsSection, EncodingDecodingSection)

override def logoPath = "circe"
}

0 comments on commit f5c6e2e

Please sign in to comment.
You can’t perform that action at this time.