Skip to content

Commit 40ed6ee

Browse files
committed
Renaming and realigning
1 parent 2c8c3ac commit 40ed6ee

File tree

3 files changed

+16
-17
lines changed

3 files changed

+16
-17
lines changed

project.clj

+4-5
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
(defproject com.stuartsierra/component "0.2.3-SNAPSHOT"
1+
(defproject quile/component-cljs "0.2.3"
22
:description "Managed lifecycle of stateful objects"
3-
:url "https://github.com/stuartsierra/component"
3+
:url "https://github.com/quile/component-cljs"
44
:license {:name "The MIT License"
55
:url "http://opensource.org/licenses/MIT"}
66
:min-lein-version "2.1.3" ; added :global-vars
7-
:dependencies [[com.stuartsierra/dependency "0.1.4-CLJX" :exclusions [org.clojure/clojure]]]
7+
:dependencies [[quile/dependency-cljs "0.1.4" :exclusions [org.clojure/clojure]]]
88
:global-vars {*warn-on-reflection* true}
99
:aliases {"test-all"
1010
["with-profile" "clj1.4:clj1.5:clj1.6:clj1.7" "test"]}
@@ -25,8 +25,7 @@
2525
:output-path "target/test-classes"
2626
:rules :cljs}]}
2727

28-
:cljsbuild {:test-commands {"tests" ["phantomjs" "test/bin/runner-none.js" "target/test" "target/test.js"]
29-
"node-tests" ["node" "test-node/bin/runner-none.js" "target/test-node" "target/test-node.js"]}
28+
:cljsbuild {:test-commands {"node" ["node" "test-node/bin/runner-none.js" "target/test-node" "target/test-node.js"]}
3029
:builds [{:id "component"
3130
:source-paths ["target/classes"]
3231
:compiler {:output-to "target/component.js"

src/cljx/com/stuartsierra/component.cljx src/cljx/quile/component.cljx

+9-9
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
(ns com.stuartsierra.component
2-
(:require [com.stuartsierra.dependency :as dep]))
1+
(ns quile.component
2+
(:require [quile.dependency :as dep]))
33

44
(defprotocol Lifecycle
55
(start [component]
@@ -66,7 +66,7 @@
6666

6767
(defn dependency-graph
6868
"Returns a dependency graph, using the data structures defined in
69-
com.stuartsierra.dependency, for the components found by
69+
quile.dependency, for the components found by
7070
(select-keys system component-keys)"
7171
[system component-keys]
7272
(reduce-kv (fn [graph key component]
@@ -155,7 +155,7 @@
155155
([system]
156156
(start-system system (keys system)))
157157
([system component-keys]
158-
(update-system system component-keys #+clj #'start #+cljs (aget com.stuartsierra.component "start"))))
158+
(update-system system component-keys #+clj #'start #+cljs (aget quile.component "start"))))
159159

160160
(defn stop-system
161161
"Recursively stops components in the system, in reverse dependency
@@ -165,7 +165,7 @@
165165
([system]
166166
(stop-system system (keys system)))
167167
([system component-keys]
168-
(update-system-reverse system component-keys #+clj #'stop #+cljs (aget com.stuartsierra.component "stop"))))
168+
(update-system-reverse system component-keys #+clj #'stop #+cljs (aget quile.component "stop"))))
169169

170170
(defrecord SystemMap []
171171
Lifecycle
@@ -188,7 +188,7 @@
188188
with large objects. As a consequence, printed system maps cannot be
189189
'read'. To disable this behavior and print system maps like normal
190190
records, call
191-
(remove-method clojure.core/print-method com.stuartsierra.component.SystemMap)"
191+
(remove-method clojure.core/print-method quile.component.SystemMap)"
192192
[& keyvals]
193193
;; array-map doesn't check argument length (CLJ-1319)
194194
(when-not (even? (count keyvals))
@@ -198,16 +198,16 @@
198198

199199
(defn ex-component?
200200
"True if the java.lang.Throwable has ex-data indicating it was
201-
thrown by something in the com.stuartsierra.component namespace."
201+
thrown by something in the quile.component namespace."
202202
[throwable]
203203
(let [{:keys [reason]} (ex-data throwable)]
204204
(and (keyword? reason)
205-
(= "com.stuartsierra.component"
205+
(= "quile.component"
206206
(namespace reason)))))
207207

208208
(defn ex-without-components
209209
"If the java.lang.Throwable has ex-data provided by the
210-
com.stuartsierra.component namespace, returns a new exception
210+
quile.component namespace, returns a new exception
211211
instance with the :component and :system removed from its ex-data.
212212
Preserves the message, cause, and stacktrace of the original
213213
throwable. If the throwable was not created by this namespace,

test/cljx/com/stuartsierra/component_test.cljx test/cljx/quile/component_test.cljx

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
(ns com.stuartsierra.component-test
1+
(ns quile.component-test
22
#+clj (:require [clojure.test :as t :refer (is deftest are)]
3-
[com.stuartsierra.component :as component]
3+
[quile.component :as component]
44
[clojure.set :refer (map-invert)])
55
#+cljs (:require-macros [cemerick.cljs.test :refer (is deftest are)])
66
#+cljs (:require cemerick.cljs.test
7-
[com.stuartsierra.component :as component])
7+
[quile.component :as component])
88
)
99

1010
(def ^:dynamic *log* nil)

0 commit comments

Comments
 (0)