hemlock 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6737a05a6e8f8ee6e9e6e69749ddfb1a182102eb
4
- data.tar.gz: e1b43dfee77e7b83081d9d67c303ad705ff2bcc4
3
+ metadata.gz: fa666c362889811f1220e75ff301a30138783f55
4
+ data.tar.gz: 6af3749ab2b537cb5984b93829aa00d64ca90c42
5
5
  SHA512:
6
- metadata.gz: e19fffe9442b3c1f2ce5e69403ce7185a9f15d5e4e8ad1b79a1ef795a9f62b34a5726d43c73bbef29755bd389daf4722029592653d96f71ce7ecd740f3c8f6da
7
- data.tar.gz: 7f6083d94fe4dfd458b86d903c90e39d0709d3f8c26b016be47c69b8527bac30918e42b3295c53e69e056333264976aa6e8f3677941d8f9f7d49477220cdc366
6
+ metadata.gz: def407d1ce401e61cc0fc8d82d588c9a1fab9298c150e784f4e541f9d0d3dbf82d2c0d3195cdbee06c96e119c6d0d826c1efd0fd982e52e84c40897daca2ca20
7
+ data.tar.gz: 96ed37a7438b07e3f901a7938c0d0e248208fea7d8c4ff9dc0041c07e2a38213d48a32cb6118368e8bd24ef63a137018e05752e2e951fd70decd324a0df11b25
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- hemlock (0.0.5)
4
+ hemlock (0.0.6)
5
5
  gli (= 2.9.0)
6
6
  rainbow (= 1.99.1)
7
7
 
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. It basically asks me to repeat rules I need to know until they are ingrained in my memory.
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
- ## Usage
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.
@@ -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 answer == flashcard.answer
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('>> ', false)
41
- if answer == flashcard.answer
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
@@ -9,5 +9,9 @@ module Hemlock
9
9
 
10
10
  alias_method :question, :term
11
11
  alias_method :answer, :definition
12
+
13
+ def correct?(guess)
14
+ guess.upcase == self.answer.upcase ? true : false
15
+ end
12
16
  end
13
17
  end
@@ -1,3 +1,3 @@
1
1
  module Hemlock
2
- VERSION = '0.0.5'
2
+ VERSION = '0.0.6'
3
3
  end
@@ -15,7 +15,7 @@ describe Hemlock::CSVtoFlashcards do
15
15
  end
16
16
 
17
17
  context '#create_flashcards' do
18
- specify { expect(subject.create_flashcards(nil)).to_not eq [] }
18
+ specify { expect(subject.create_flashcards('')).to_not eq [] }
19
19
  end
20
20
 
21
21
  context "#replace_tildes" do
@@ -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.5
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-22 00:00:00.000000000 Z
11
+ date: 2014-01-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: guard-rspec