Skip to content

Commit

Permalink
Merge pull request #6 from nnichols/major-ver
Browse files Browse the repository at this point in the history
Major version release
  • Loading branch information
nnichols committed Jul 28, 2020
2 parents 98d8797 + c3067b3 commit cae5b24
Show file tree
Hide file tree
Showing 15 changed files with 34 additions and 170 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## v1.0.0 / 2020 Jul 28

> This release removes the palette namespace, as it has been more appropriately migrated to com.wallbrew/brewtility
* **Update** ^^^

## v0.10.0 / 2020 Jul 18

> This release adds several `only` functions for singleton collections
Expand Down
42 changes: 11 additions & 31 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nnichols",
"version": "0.10.0",
"version": "1.0.0",
"description": "A bunch of functions and definitions I'm sick of copy/pasting",
"main": "index.js",
"directories": {
Expand Down
2 changes: 1 addition & 1 deletion project.clj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(defproject nnichols "0.10.0"
(defproject nnichols "1.0.0"
:description "A bunch of functions and definitions I'm sick of copy/pasting"
:url "https://github.com/nnichols/nnichols"
:license {:name "MIT"
Expand Down
114 changes: 0 additions & 114 deletions src/nnichols/palette.cljc

This file was deleted.

3 changes: 2 additions & 1 deletion src/nnichols/util.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@
"Attempt to return the first and only element in `coll`.
If the collection does not contain exactly one element, throw an exception"
[coll]
(if (seq (rest coll))
(if (or (empty? coll)
(seq (rest coll)))
(throw (ex-info "Collection does not contain exactly one element!" {}))
(first coll)))

Expand Down
2 changes: 1 addition & 1 deletion test/nnichols/http_test.cljc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
(ns nnichols.http-test
(:require [nnichols.http :as http]
#? (:clj [clojure.test :refer [deftest is testing]])
#? (:cljs [cljs.test :refer-macros [deftest is testing run-tests]])))
#? (:cljs [cljs.test :refer-macros [deftest is testing]])))

(deftest bodiless-json-response
(testing "Response maps are properly created"
Expand Down
13 changes: 0 additions & 13 deletions test/nnichols/palette_test.cljc

This file was deleted.

2 changes: 1 addition & 1 deletion test/nnichols/parse_test.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[nnichols.util :as nu]
[nnichols.predicate :as npr]
#? (:clj [clojure.test :refer [deftest is testing]])
#? (:cljs [cljs.test :refer-macros [deftest is testing run-tests]])))
#? (:cljs [cljs.test :refer-macros [deftest is testing]])))

(deftest parse-radix-test
(testing "Strings are turned into the positive integer they represent"
Expand Down
2 changes: 1 addition & 1 deletion test/nnichols/predicate_test.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
(:require [nnichols.predicate :as np]
[nnichols.util :as nu]
#? (:clj [clojure.test :refer [deftest is testing]])
#? (:cljs [cljs.test :refer-macros [deftest is testing run-tests]])
#? (:cljs [cljs.test :refer-macros [deftest is testing]])
#? (:clj [clj-time.core :as time])
#? (:cljs [cljs-time.core :as time])))

Expand Down
2 changes: 0 additions & 2 deletions test/nnichols/runner.cljs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
(ns nnichols.runner
(:require [doo.runner :refer-macros [doo-tests]]
[nnichols.http-test]
[nnichols.palette-test]
[nnichols.parse-test]
[nnichols.predicate-test]
[nnichols.spec-test]
Expand All @@ -10,7 +9,6 @@
[nnichols.xml-test]))

(doo-tests 'nnichols.http-test
'nnichols.palette-test
'nnichols.parse-test
'nnichols.predicate-test
'nnichols.spec-test
Expand Down
2 changes: 1 addition & 1 deletion test/nnichols/spec_test.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
[nnichols.spec :as s]
[nnichols.util :as nu]
#? (:clj [clojure.test :refer [deftest is testing]])
#? (:cljs [cljs.test :refer-macros [deftest is testing run-tests]])))
#? (:cljs [cljs.test :refer-macros [deftest is testing]])))

(deftest boolean-spec-test
(testing "Testing the boolean spec can conform/validate data"
Expand Down
2 changes: 1 addition & 1 deletion test/nnichols/string_test.cljc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
(ns nnichols.string-test
(:require [nnichols.string :as nstr]
#? (:clj [clojure.test :refer [deftest is testing]])
#? (:cljs [cljs.test :refer-macros [deftest is testing run-tests]])))
#? (:cljs [cljs.test :refer-macros [deftest is testing]])))

(deftest prepare-for-compare-test
(testing "Strings are appropriately re-cased and trimmed of whitespace"
Expand Down
8 changes: 7 additions & 1 deletion test/nnichols/util_test.cljc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
(ns nnichols.util-test
(:require [nnichols.util :as nu]
#? (:clj [clojure.test :refer [deftest is testing]])
#? (:cljs [cljs.test :refer-macros [deftest is testing run-tests]])))
#? (:cljs [cljs.test :refer-macros [deftest is testing]])))

(deftest sort-keys-test
(testing "Keywords are sorted lexicographically"
Expand Down Expand Up @@ -168,3 +168,9 @@
(is (= "snakes" (nu/pluralize "snake" 2)))
(is (= "peach" (nu/pluralize "peach" 1 "peaches")))
(is (= "peaches" (nu/pluralize "peach" 10 "peaches")))))

(deftest only-test
(testing "Functional correctness"
(is (= 1 (nu/only [1])))
#?(:clj (is (thrown? Exception (nu/only []))))
#?(:clj (is (thrown? Exception (nu/only [1 2]))))))
2 changes: 1 addition & 1 deletion test/nnichols/xml_test.cljc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
(ns nnichols.xml-test
(:require [nnichols.xml :as nx]
#? (:clj [clojure.test :refer [deftest is testing]])
#? (:cljs [cljs.test :refer-macros [deftest is testing run-tests]])))
#? (:cljs [cljs.test :refer-macros [deftest is testing]])))

(deftest tag-keyword-conversion-test
(testing "Tag formatted and EDN formatted keywords can be transformed"
Expand Down

0 comments on commit cae5b24

Please sign in to comment.