Skip to content

Commit

Permalink
add config value to clojure function
Browse files Browse the repository at this point in the history
  • Loading branch information
MarchLiu committed May 29, 2019
1 parent 44628bc commit 075188e
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 21 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ For Leiningen:

## What's New

- 0.1.9 add config value to clojure function
- 0.1.8 add a protected clojure actor state
- 0.1.7 add actor of functions for ClojureActor create
- 0.1.6 fixed bug in pipeline operator `?->`
Expand Down
8 changes: 4 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<groupId>liu.mars</groupId>
<artifactId>akka-clojure</artifactId>
<packaging>jar</packaging>
<version>0.1.8</version>
<version>0.1.9</version>
<name>akka-clojure</name>
<description>akka toolkit for clojure programmer</description>
<url>https://github.com/MarchLiu/akka-clojure</url>
Expand All @@ -14,7 +14,7 @@
</license>
</licenses>
<scm>
<tag>28d082dde43b224f344cb7ac7d48cf77ac2958b9</tag>
<tag>44628bc791a466658696245ac3e3fe591597f825</tag>
</scm>
<build>
<sourceDirectory>src/main/clojure</sourceDirectory>
Expand Down Expand Up @@ -87,12 +87,12 @@
<dependency>
<groupId>com.typesafe.akka</groupId>
<artifactId>akka-actor_2.12</artifactId>
<version>2.5.19</version>
<version>2.5.22</version>
</dependency>
<dependency>
<groupId>liu.mars</groupId>
<artifactId>jaskell</artifactId>
<version>0.2.2</version>
<version>0.2.7</version>
</dependency>
<dependency>
<groupId>com.typesafe.akka</groupId>
Expand Down
26 changes: 13 additions & 13 deletions pom.xml.asc
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEo/PfgmhDCBoQZMzyZTWaAbhhs1wFAlzlB4YACgkQZTWaAbhh
s1y+dBAAmP52Z9QMVJimwiZqAS2p6VZ2SnZblbIxVbQqcKG1/gsbt++KYdbcYSCj
XCei1vkArwv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E1HroTXqFKWspW4uV62uxwPEK+E
VyXje6SHOJYUsrfswKrDIwi5imQmlG2k0bm5fKx5ILT3iRPyM/LE8YcAHyLCKPkw
u24uPDzM058aCxKrbjxPce/fwdIRlMfbc73Suf58WJgYL6IES8iLFb7Vpdu448d8
pWFbH2AJthSNjiVX7sPhkW8aGCV9BClvt5rSg12THszgH2u5ge83x9nqhZu3o9qu
R6WVjFF7lBQZP/IfdyOJ/z43CTnVrDywANsXUtFXqc1MqI5LuH8X6WAubFKUj5Ls
9XtaLWy0V2hKxnwBWm7tVLAVI6krO7AbKcan6K42J4jHNGPCfXA=
=pp22
-----END PGP SIGNATURE-----
6 changes: 3 additions & 3 deletions project.clj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(defproject liu.mars/akka-clojure "0.1.8"
(defproject liu.mars/akka-clojure "0.1.9"
:description "akka toolkit for clojure programmer"
:url "https://github.com/MarchLiu/akka-clojure"
:license {:name "Eclipse Public License"
Expand All @@ -7,8 +7,8 @@
:java-source-paths ["src/main/java"]
:test-paths ["src/test/clojure"]
:dependencies [[org.clojure/clojure "1.10.0"]
[com.typesafe.akka/akka-actor_2.12 "2.5.19"]
[liu.mars/jaskell "0.2.2"]]
[com.typesafe.akka/akka-actor_2.12 "2.5.22"]
[liu.mars/jaskell "0.2.7"]]
:deploy-repositories [["releases" :clojars]
["snapshots" :clojars]]
:profiles {:test {:dependencies [[com.typesafe.akka/akka-testkit_2.12 "2.5.22"]]
Expand Down
9 changes: 8 additions & 1 deletion src/main/clojure/liu/mars/actor.clj
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
(ns liu.mars.actor
(:require [jaskell.util :refer [keywordize-it]])
(:import (akka.pattern Patterns)
(java.time Duration)
(akka.actor ActorRef AbstractActor ActorSystem)
(com.typesafe.config ConfigValueFactory)
(com.typesafe.config ConfigValueFactory ConfigValue)
(akka.dispatch Dispatcher)
(clojure.lang MultiFn IFn Agent)
(liu.mars ClojureActor)))
Expand Down Expand Up @@ -71,3 +72,9 @@
(into [] (map config-value) data))
(keyword? data) (name data)
:else (ConfigValueFactory/fromAnyRef data)))

(defn config-value-to-clj
[^ConfigValue config]
(-> config
.unwrapped
keywordize-it))

0 comments on commit 075188e

Please sign in to comment.