Skip to content

Commit 283d977

Browse files
committed
Initial commit
0 parents  commit 283d977

File tree

7 files changed

+243
-0
lines changed

7 files changed

+243
-0
lines changed

.gitignore

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
*.class
2+
*.log
3+
4+
# sbt specific
5+
dist/*
6+
target/
7+
lib_managed/
8+
src_managed/
9+
project/boot/
10+
project/plugins/project/
11+
12+
# Scala-IDE specific
13+
.scala_dependencies
14+
15+
# IntelliJ stuff
16+
.idea/

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2019 celadari
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
# Json Logic Scala
2+
Build complex rules, serialize them as JSON, and execute them in Scala
3+
4+
## Problem Statement
5+
6+
This little project aims to solve the following problems:
7+
8+
1. Make stuff more awesome.
9+
2. Remove the less awesome stuff from your project.
10+
11+
## Configuration
12+
13+
Add the Sonatype.org Releases repo as a resolver in your `build.sbt` or `Build.scala` as appropriate.
14+
15+
```scala
16+
resolvers += "Sonatype.org Releases" at "https://oss.sonatype.org/content/repositories/releases/"
17+
```
18+
19+
Add **Json Logic Scala** as a dependency in your `build.sbt` or `Build.scala` as appropriate.
20+
21+
```scala
22+
libraryDependencies ++= Seq(
23+
// Other dependencies ...
24+
"com.github.celadari" %% "JsonLogicScala" % "0.0.1" % "compile"
25+
)
26+
```
27+
28+
## Scala Versions
29+
30+
This project is compiled, tested, and published for the following Scala versions:
31+
32+
1. 2.9.1
33+
2. 2.9.1-1
34+
3. 2.9.2
35+
4. 2.9.3
36+
5. 2.10.3
37+
6. 2.11.12
38+
7. 2.12.6
39+
40+
41+
## Usage
42+
43+
To use **Json Logic Scala**, you should import it and call it...
44+
45+
## Scaladoc API
46+
47+
The Scaladoc API for this project can be found [here](http://celadari.github.io/json-logic-scala/latest/api).
48+
49+
## Examples
50+
51+
```scala
52+
package org.example
53+
54+
import com.github.celadari.jsonlogicscala._
55+
56+
case object MyObject {
57+
// ...
58+
}
59+
```
60+
61+
## Wishlist
62+
63+
Below is a list of features we would like to one day include in this project
64+
65+
1. Support more awesome.
66+
2. Decimate the not-awesome.
67+
68+
## License
69+
70+
*Json Logic Scala* is licensed under the MIT License.
71+
72+
MIT License
73+
74+
Copyright (c) 2019 celadari
75+
76+
Permission is hereby granted, free of charge, to any person obtaining a copy
77+
of this software and associated documentation files (the "Software"), to deal
78+
in the Software without restriction, including without limitation the rights
79+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
80+
copies of the Software, and to permit persons to whom the Software is
81+
furnished to do so, subject to the following conditions:
82+
83+
The above copyright notice and this permission notice shall be included in all
84+
copies or substantial portions of the Software.
85+
86+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
87+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
88+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
89+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
90+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
91+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
92+
SOFTWARE.

build.sbt

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
name := "Json Logic Scala"
2+
3+
organization := "com.github.celadari"
4+
5+
homepage := Some(url("https://github.com/celadari/json-logic-scala"))
6+
7+
version := "0.0.1-SNAPSHOT"
8+
9+
scalaVersion := "2.9.1"
10+
11+
crossScalaVersions := Seq("2.9.1", "2.9.1-1", "2.9.2", "2.9.3", "2.10.3")
12+
13+
resolvers ++= Seq(
14+
"sonatype-snapshots" at "http://oss.sonatype.org/content/repositories/snapshots",
15+
"sonatype-releases" at "http://oss.sonatype.org/content/repositories/releases"
16+
)
17+
18+
libraryDependencies ++= {
19+
Seq(
20+
// "org.scalatest" %% "scalatest" % "1.9.1" % "test",
21+
// "org.scalacheck" %% "scalacheck" % "1.10.1" % "test"
22+
)
23+
}
24+
25+
scalacOptions <<= scalaVersion map { v: String =>
26+
val opts = "-deprecation" :: "-unchecked" :: Nil
27+
if (v.startsWith("2.9.")) opts
28+
else opts ++ ("-feature" :: "-language:postfixOps" :: "-language:implicitConversions" :: Nil)
29+
}
30+
31+
// Publishing stuff for sonatype
32+
publishTo <<= version { _.endsWith("SNAPSHOT") match {
33+
case true => Some("snapshots" at "https://oss.sonatype.org/content/repositories/snapshots")
34+
case false => Some("releases" at "https://oss.sonatype.org/service/local/staging/deploy/maven2")
35+
}
36+
}
37+
38+
credentials += Credentials( file("sonatype.credentials") )
39+
40+
publishMavenStyle := true
41+
42+
publishArtifact in Test := false
43+
44+
pomIncludeRepository := { _ => false }
45+
46+
pomExtra := (
47+
<scm>
48+
<url>git@github.com:celadari/json-logic-scala.git</url>
49+
<connection>scm:git:git@github.com:celadari/json-logic-scala.git</connection>
50+
</scm>
51+
<developers>
52+
<developer>
53+
<id>celadari</id>
54+
<name>Charles-Edouard LADARI</name>
55+
<url>https://github.com/celadari</url>
56+
</developer>
57+
</developers>
58+
)
59+
60+
licenses += ("MIT", url("http://mit-license.org/"))
61+
62+
// OSGi Bundle stuff
63+
osgiSettings
64+
65+
OsgiKeys.bundleSymbolicName := "com.github.celadari.jsonlogicscala"
66+
67+
OsgiKeys.exportPackage := Seq("com.github.celadari.jsonlogicscala")
68+
69+
OsgiKeys.privatePackage := Seq()
70+
71+
OsgiKeys.bundleActivator := None
72+
73+
// Scala bundle versions require special handling becuase of binary compatibility issues.
74+
// This is a bit tricky because the published jars are versioned with more than just the Scala version.
75+
// For example, 2.10.1 is versioned as 2.10.1.v20130302-092018-VFINAL-33e32179fd
76+
OsgiKeys.requireBundle <<= (scalaVersion, crossScalaVersions) { (ver, crossVers) =>
77+
val nextVer = crossVers.zip(crossVers.tail).find(_._1 == ver).map(_._2)
78+
val langBundleVer =
79+
if(ver.startsWith("2.10")) "[2.10,2.11)" // All 2.10.x versions are binary-compatible
80+
else if(ver.startsWith("2.9.3")) "[2.9.3,2.9.4)" // Special case for the last 2.9.x version at this time
81+
else "["+ver+","+nextVer.get+")" // The current version, up to but excluding the next version
82+
Seq("scala-library;bundle-version=\""+langBundleVer+"\"")
83+
}
84+
85+
// Scaladoc publishing stuff
86+
site.settings
87+
88+
ghpages.settings
89+
90+
git.remoteRepo := "git@github.com:celadari/json-logic-scala.git"
91+
92+
site.includeScaladoc()
93+
94+
// Stuff for publicizing on http://ls.implicit.ly
95+
seq(lsSettings :_*)
96+
97+
(LsKeys.tags in LsKeys.lsync) := Seq("awesome")
98+
99+
(description in LsKeys.lsync) := "Json Logic Scala is the most awesome scala project available today"
100+
101+
(LsKeys.ghUser in LsKeys.lsync) := Some("celadari")
102+
103+
(LsKeys.ghRepo in LsKeys.lsync) := Some("json-logic-scala")
104+
105+
(LsKeys.ghBranch in LsKeys.lsync) := Some("master")

project/build.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
sbt.version=0.13.1

project/gpg.sbt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
addSbtPlugin("com.typesafe.sbt" % "sbt-pgp" % "0.8.1")

project/plugins.sbt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
resolvers += "jgit-repo" at "http://download.eclipse.org/jgit/maven"
2+
3+
addSbtPlugin("com.typesafe.sbt" % "sbt-ghpages" % "0.5.2") // https://github.com/sbt/sbt-ghpages
4+
5+
addSbtPlugin("com.typesafe.sbt" % "sbt-osgi" % "0.7.0") // https://github.com/sbt/sbt-osgi/
6+
7+
addSbtPlugin("me.lessis" % "ls-sbt" % "ls(ls-sbt, softprops, ls)")

0 commit comments

Comments
 (0)