hemlock 0.0.5 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +7 -3
- data/bin/hemlock +3 -3
- data/lib/hemlock/flashcard.rb +4 -0
- data/lib/hemlock/version.rb +1 -1
- data/spec/hemlock/csv_to_flashcards_spec.rb +1 -1
- data/spec/hemlock/flashcard_spec.rb +6 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fa666c362889811f1220e75ff301a30138783f55
|
4
|
+
data.tar.gz: 6af3749ab2b537cb5984b93829aa00d64ca90c42
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: def407d1ce401e61cc0fc8d82d588c9a1fab9298c150e784f4e541f9d0d3dbf82d2c0d3195cdbee06c96e119c6d0d826c1efd0fd982e52e84c40897daca2ca20
|
7
|
+
data.tar.gz: 96ed37a7438b07e3f901a7938c0d0e248208fea7d8c4ff9dc0041c07e2a38213d48a32cb6118368e8bd24ef63a137018e05752e2e951fd70decd324a0df11b25
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -1,16 +1,20 @@
|
|
1
1
|
# Hemlock
|
2
|
+
Do you create flashcards using Excel or Numbers? Well ingrain those flashcards in your head with this gem!
|
2
3
|
|
4
|
+
First, save your flashcards as .csv - if you have more than one sheet in your excel or numbers document you can save a folder of CSV.
|
5
|
+
|
6
|
+
Then in a terminal,
|
3
7
|
```
|
4
8
|
gem install hemlock
|
5
9
|
hemlock drink ~/Dropbox/flashcards
|
6
10
|
```
|
7
11
|
or whatever folder contains .csv flashcards.
|
8
12
|
|
9
|
-
This was made by me for me to study for the bar
|
13
|
+
This was made by me for me to study for the bar, but if hopefully it can help others deal with one of the biggest flaws of academia/standardized testing, requiring rote memorization.
|
10
14
|
|
11
|
-
##
|
15
|
+
## TODO
|
12
16
|
|
13
17
|
* Don't care about punctuation
|
14
18
|
|
15
19
|
## Why the name?
|
16
|
-
Hemlock is what Socrates was forced to drink to kill himself. As someone who detested writing, I thought I'd dedicate my forced writing practice to him. RIP old guy.
|
20
|
+
Hemlock is what Socrates was forced to drink to kill himself. As someone who detested writing because it erodes memory, I thought I'd dedicate my forced writing practice to him. RIP old guy.
|
data/bin/hemlock
CHANGED
@@ -29,7 +29,7 @@ command :drink do |c|
|
|
29
29
|
flashcard = flashcards[seed]
|
30
30
|
puts flashcard.question
|
31
31
|
answer = Readline.readline('>> ', false)
|
32
|
-
if
|
32
|
+
if flashcard.correct?(answer)
|
33
33
|
puts printf Rainbow('Correct').green
|
34
34
|
else
|
35
35
|
puts printf Rainbow('You must submit to the quarries').red
|
@@ -37,8 +37,8 @@ command :drink do |c|
|
|
37
37
|
while i < 3 do
|
38
38
|
puts flashcard.question
|
39
39
|
puts flashcard.answer
|
40
|
-
answer = Readline.readline('>> ',
|
41
|
-
if
|
40
|
+
answer = Readline.readline('>> ', true)
|
41
|
+
if flashcard.correct?(answer)
|
42
42
|
i += 1
|
43
43
|
else
|
44
44
|
puts printf Rainbow('Who are you? Sisyphus?!').red
|
data/lib/hemlock/flashcard.rb
CHANGED
data/lib/hemlock/version.rb
CHANGED
@@ -10,4 +10,10 @@ describe Hemlock::Flashcard do
|
|
10
10
|
specify { expect(flashcard.definition).to eq 'a great color' }
|
11
11
|
specify { expect(flashcard.answer).to eq 'a great color' }
|
12
12
|
|
13
|
+
context '#correct?' do
|
14
|
+
it 'should not care about capitilization' do
|
15
|
+
expect(flashcard.correct?('A GREAT COLOR')).to eq true
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
13
19
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hemlock
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nicholas Shook
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-01-
|
11
|
+
date: 2014-01-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: guard-rspec
|