diff --git a/README.md b/README.md index fdbeb70..1aba313 100755 --- a/README.md +++ b/README.md @@ -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. diff --git a/test/euler/new.clj b/test/euler/new.clj index c42ccee..8cbac23 100755 --- a/test/euler/new.clj +++ b/test/euler/new.clj @@ -6,7 +6,7 @@ (defn data-ns [problem] (format "(ns euler.p%s.data) -(def answer nil) +(def answer \"put-the-md5-of-the-solution-here\") " problem)) @@ -14,17 +14,17 @@ (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