Skip to content

Commit

Permalink
saving.
Browse files Browse the repository at this point in the history
  • Loading branch information
sritchie committed Feb 2, 2015
1 parent 49e1e1f commit 8ccf8e2
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 23 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Here's the latest Leiningen version info:
You'll also need to add Om:

```clojure
[om "0.7.3"]
[org.omcljs/om "0.8.7"]
```

You can find more detailed information on how to configure your Clojurescript project to use Om-Bootstrap on the documentation site's [Getting Started section](http://om-bootstrap.herokuapp.com/getting-started).
Expand Down Expand Up @@ -96,8 +96,8 @@ I personally like to start the repl with `lein repl :headless` and do all of thi
Om-Bootstrap works with the following dependencies:

- Clojure 1.6.x, 1.7.x
- React.JS 0.11.x
- Om 0.7.x
- React.JS 0.12.x
- Om 0.8.x
- Bootstrap 3.1.x (probably works on 3.2, haven't tested it)

and the latest version of ClojureScript. Please create a [GitHub issue](https://github.com/racehub/om-bootstrap/issues) if you run into problems with these versions or would like to see further versions supported.
Expand Down
3 changes: 0 additions & 3 deletions docs/src/clj/om_bootstrap/server.clj
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,3 @@
(reset! server (run-server (handler/api #'app-routes)
{:port port}))
(println "Server started on port [" port "].")))

;; TODO: Check out history.js for supporting the html5 pushstate stuff
;; on different browsers.
6 changes: 3 additions & 3 deletions docs/src/cljs/om_bootstrap/docs/getting_started.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@
...
:dependencies [[org.clojure/clojure \"1.6.0\"]
[org.clojure/clojurescript \"0.0-2411\"]
[racehub/om-bootstrap \"0.3.4\"]
[racehub/om-bootstrap \"0.4.0\"]
[om \"0.7.3\"]]
...)"})
(d/p "Om-Bootstrap requires Om 0.7.0 or later, and has been tested against Bootstrap 3.1.0 and later. The "
(d/p "Om-Bootstrap requires Om 0.8.0 or later, and has been tested against Bootstrap 3.1.0 and later. The "
(d/a {:href "https://github.com/racehub/om-bootstrap#supported-versions"} "Om-Bootstrap README")
" has more information on specific requirements and limitations.")
(d/p "For local development your "
Expand All @@ -57,7 +57,7 @@
</head>
<body>
<div id=\"my-app\"></div>
<script src=\"http://fb.me/react-0.11.1.js\"></script>
<script src=\"http://fb.me/react-0.12.2.js\"></script>
<script src=\"out/goog/base.js\" type=\"text/javascript\"></script>
<script src=\"main.js\" type=\"text/javascript\"></script>
<script type=\"text/javascript\">goog.require(\"main.core\");</script>
Expand Down
30 changes: 16 additions & 14 deletions test/om_bootstrap/util_test.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@
"Cloning an Om component works too."
(is=el om-component (u/clone-with-props om-component)))

;; FIRST FAILING TEST
(is (= {:x "alpha", :y "two", :z "three", :className "cake walrus"}
(-> (->fake-div {:x "one" :y "two" :z "three"
:class "cake"})
Expand All @@ -143,21 +144,22 @@
"Cloning an om component merges the extra properties into the
cursor, NOT into the overall props.")

(let [hut-the-vals (fn [m]
(->> (map (fn [[k v]]
[k (str v "-hut!")])
m)
(into {})))]
(is (= {:x "one-hut!"
:y "two-hut!"
:z "three-hut!"
:class "cake-hut!"}
(-> (->fake-div {:x "one" :y "two" :z "three" :class "cake"})
(u/clone-with-props hut-the-vals)
(u/get-props)))
"clone-with-props can take a function as well. This one adds
(comment
(let [hut-the-vals (fn [m]
(->> (map (fn [[k v]]
[k (str v "-hut!")])
m)
(into {})))]
(is (= {:x "one-hut!"
:y "two-hut!"
:z "three-hut!"
:class "cake-hut!"}
(-> (->fake-div {:x "one" :y "two" :z "three" :class "cake"})
(u/clone-with-props hut-the-vals)
(u/get-props)))
"clone-with-props can take a function as well. This one adds
hut! onto the end of all string values.
The whole :class merging only comes into play if extra attrs
contains a :class as well. :class is left alone here and not
converted to :className."))))
converted to :className.")))))

0 comments on commit 8ccf8e2

Please sign in to comment.