Skip to content

Commit

Permalink
Updated new template and README
Browse files Browse the repository at this point in the history
  • Loading branch information
dfuenzalida committed Sep 22, 2019
1 parent f7f98cb commit 86de6bc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Clone this repo and find a [problem](https://projecteuler.net/archives) that you

script/new number username

where `number` is the problem number and `username` is your Github or Bitbucket username. Then fill in the solution in the file. If the input and answers are still empty you will have to provide it in the file `data.cljc`.
where `number` is the problem number and `username` is your Github or Bitbucket username. Then fill in the solution in the file. If the input and answer are still empty you will have to provide its md5 hash in the file `data.cljc`, using the `md5` function provided. This is required to avoid storing the actual solutions in plain text in the repo.

Once you are comfortable with your solution, test it as described below and submit a pull request. If you have an account in Project Euler, you can also submit your profile image to be listed in the *Contributors* section.

Expand Down
8 changes: 4 additions & 4 deletions test/euler/new.clj
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,25 @@
(defn data-ns [problem]
(format "(ns euler.p%s.data)
(def answer nil)
(def answer \"put-the-md5-of-the-solution-here\")
" problem))

(defn user-ns [problem user]
(format "(ns euler.p%s.%s
(:refer-clojure :exclude [read-string format])
(:require
[euler.utils :as u :refer [deftest read-string format]]
[euler.utils :as u :refer [deftest md5 read-string format]]
[euler.p%s.data :refer [answer]]
[clojure.test :as t :refer [is testing]]))
(defn solve []
;; TODO
;; TODO Implement this
)
(deftest tests
(is (= (str answer)
(str (solve)))))
(md5 (str (solve))))))
;;;; Scratch
Expand Down

0 comments on commit 86de6bc

Please sign in to comment.