Repository: exercism/clojure
Pull request #272 (2019-04-30 05:08:28)

Rename bracket-push to matching-brackets
Updates the exercise name in config.json, README.md, project.clj,
namespaces and filenames.


Patch:
diff --git a/config.json b/config.json
index efa1390..f5023bb 100644
--- a/config.json
+++ b/config.json
@@ -509,7 +509,7 @@
       "topics": null
     },
     {
-      "slug": "bracket-push",
+      "slug": "matching-brackets",
       "uuid": "c8ebc25b-17b9-44a9-8cbe-df2c2eb6e2d6",
       "core": false,
       "unlocked_by": null,
diff --git a/exercises/bracket-push/README.md b/exercises/matching-brackets/README.md
similarity index 93%
rename from exercises/bracket-push/README.md
rename to exercises/matching-brackets/README.md
index e3dcc25..ebc8aa9 100644
--- a/exercises/bracket-push/README.md
+++ b/exercises/matching-brackets/README.md
@@ -1,8 +1,9 @@
-# Bracket Push
+# Matching Brackets
 
 Given a string containing brackets `[]`, braces `{}`, parentheses `()`,
 or any combination thereof, verify that any and all pairs are matched
 and nested correctly.
+
 ## Source
 
 Ginna Baker
diff --git a/exercises/bracket-push/project.clj b/exercises/matching-brackets/project.clj
similarity index 50%
rename from exercises/bracket-push/project.clj
rename to exercises/matching-brackets/project.clj
index 7a38e31..eb8d2ce 100644
--- a/exercises/bracket-push/project.clj
+++ b/exercises/matching-brackets/project.clj
@@ -1,4 +1,4 @@
-(defproject bracket-push "0.1.0-SNAPSHOT"
-  :description "bracket-push exercise."
-  :url "https://github.com/exercism/clojure/tree/master/exercises/bracket-push"
+(defproject matching-brackets "0.1.0-SNAPSHOT"
+  :description "matching-brackets exercise."
+  :url "https://github.com/exercism/clojure/tree/master/exercises/matching-brackets"
   :dependencies [[org.clojure/clojure "1.10.0"]])
diff --git a/exercises/bracket-push/src/example.clj b/exercises/matching-brackets/src/example.clj
similarity index 94%
rename from exercises/bracket-push/src/example.clj
rename to exercises/matching-brackets/src/example.clj
index 4456eb7..28d9ef9 100644
--- a/exercises/bracket-push/src/example.clj
+++ b/exercises/matching-brackets/src/example.clj
@@ -1,4 +1,4 @@
-(ns bracket-push)
+(ns matching-brackets)
 
 (defn valid? [s]
   (let [pairs {\) \( \] \[ \} \{}
diff --git a/exercises/bracket-push/src/bracket_push.clj b/exercises/matching-brackets/src/matching_brackets.clj
similarity index 74%
rename from exercises/bracket-push/src/bracket_push.clj
rename to exercises/matching-brackets/src/matching_brackets.clj
index efea2f7..cf4a0f0 100644
--- a/exercises/bracket-push/src/bracket_push.clj
+++ b/exercises/matching-brackets/src/matching_brackets.clj
@@ -1,4 +1,4 @@
-(ns bracket-push)
+(ns matching-brackets)
 
 (defn valid? [] ;; <- arglist goes here
   ;; your code goes here


Test patch:
diff --git a/exercises/bracket-push/test/bracket_push_test.clj b/exercises/bracket-push/test/bracket_push_test.clj
deleted file mode 100644
index f1c46bb..0000000
--- a/exercises/bracket-push/test/bracket_push_test.clj
+++ /dev/null
@@ -1,50 +0,0 @@
-(ns bracket-push-test
-  (:require [clojure.test :refer [deftest is]]
-            bracket-push))
-
-(deftest paired-square
-  (is (bracket-push/valid? "[]") "paired square brackets"))
-
-(deftest empty-string
-  (is (bracket-push/valid? "") "empty string"))
-
-(deftest unpaired-brackets
-  (is (false? (bracket-push/valid? "[[")) "unpaired brackets"))
-
-(deftest wrong-ordered-brackets
-  (is (false? (bracket-push/valid? "}{")) "wrong ordered brackets"))
-
-(deftest paired-with-whitespace
-  (is (bracket-push/valid? "{ }") "paired with whitespace"))
-
-(deftest simple-nested-brackets
-  (is (bracket-push/valid? "{[]}")
-      "simple nested brackets"))
-
-(deftest several-paired-brackets
-  (is (bracket-push/valid? "{}[]")
-      "several paired brackets"))
-
-(deftest paired-and-nested-brackets
-  (is (bracket-push/valid? "([{}({}[])])")
-      "paired and nested brackets"))
-
-(deftest unopened-closing-brackets
-  (is (false? (bracket-push/valid? "{[)][]}"))
-      "unopened closing brackets"))
-
-(deftest unpaired-and-nested-brackets
-  (is (false? (bracket-push/valid? "([{])"))
-      "unpaired and nested brackets"))
-
-(deftest paired-and-wrong-nested-brackets
-  (is (false? (bracket-push/valid? "[({]})"))
-      "paired and wrong nested brackets"))
-
-(deftest math-expression
-  (is (bracket-push/valid? "(((185 + 223.85) * 15) - 543)/2")
-      "math expression"))
-
-(deftest complex-latex-expression
-  (is (bracket-push/valid? "\\\\left(\\\\begin{array}{cc} \\\\frac{1}{3} & x\\\\\\\\ \\\\mathrm{e}^{x} &... x^2 \\\\end{array}\\\\right)")
-      "complex latex expression"))
diff --git a/exercises/matching-brackets/test/matching_brackets_test.clj b/exercises/matching-brackets/test/matching_brackets_test.clj
new file mode 100644
index 0000000..d84e5c7
--- /dev/null
+++ b/exercises/matching-brackets/test/matching_brackets_test.clj
@@ -0,0 +1,50 @@
+(ns matching-brackets-test
+  (:require [clojure.test :refer [deftest is]]
+            matching-brackets))
+
+(deftest paired-square
+  (is (matching-brackets/valid? "[]") "paired square brackets"))
+
+(deftest empty-string
+  (is (matching-brackets/valid? "") "empty string"))
+
+(deftest unpaired-brackets
+  (is (false? (matching-brackets/valid? "[[")) "unpaired brackets"))
+
+(deftest wrong-ordered-brackets
+  (is (false? (matching-brackets/valid? "}{")) "wrong ordered brackets"))
+
+(deftest paired-with-whitespace
+  (is (matching-brackets/valid? "{ }") "paired with whitespace"))
+
+(deftest simple-nested-brackets
+  (is (matching-brackets/valid? "{[]}")
+      "simple nested brackets"))
+
+(deftest several-paired-brackets
+  (is (matching-brackets/valid? "{}[]")
+      "several paired brackets"))
+
+(deftest paired-and-nested-brackets
+  (is (matching-brackets/valid? "([{}({}[])])")
+      "paired and nested brackets"))
+
+(deftest unopened-closing-brackets
+  (is (false? (matching-brackets/valid? "{[)][]}"))
+      "unopened closing brackets"))
+ 
+(deftest unpaired-and-nested-brackets
+  (is (false? (matching-brackets/valid? "([{])"))
+      "unpaired and nested brackets"))
+
+(deftest paired-and-wrong-nested-brackets
+  (is (false? (matching-brackets/valid? "[({]})"))
+      "paired and wrong nested brackets"))
+
+(deftest math-expression
+  (is (matching-brackets/valid? "(((185 + 223.85) * 15) - 543)/2")
+      "math expression"))
+
+(deftest complex-latex-expression
+  (is (matching-brackets/valid? "\\\\left(\\\\begin{array}{cc} \\\\frac{1}{3} & x\\\\\\\\ \\\\mathrm{e}^{x} &... x^2 \\\\end{array}\\\\right)")
+      "complex latex expression"))