cw 0.0.7 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/README.md +2 -0
- data/cw.gemspec +1 -1
- data/data/text/progress.txt +1 -1
- data/lib/cw/book_details.rb +1 -1
- data/lib/cw/file_details.rb +4 -3
- metadata +1 -2
- data/read_book.rb +0 -33
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 07532b10e20297eadad02ee9acbcb4ae044f3ed6
|
4
|
+
data.tar.gz: fd692cc4c505e4240aa7f7314e1c0c5535fa192a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2eb678d25c8d30214b4c1ae9f4f303737ecaf2ba74158c569456d34552b749388ced5a4a71466a777e955a087cef03644c31fd8134c888d8755fde17291cad33
|
7
|
+
data.tar.gz: 13f20251f2bfc2c4bc4876c131c54ad78052bf234150d68cc77cf991402a6fd6006e873e10750eb377929d759e0be3c26db481bf8cc457f52cbd988eb1b79e95
|
data/.gitignore
CHANGED
data/README.md
CHANGED
data/cw.gemspec
CHANGED
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = 'cw'
|
7
|
-
spec.version = '0.0.
|
7
|
+
spec.version = '0.0.8'
|
8
8
|
spec.date = '2016-05-21'
|
9
9
|
spec.authors = ["Martyn Jago"]
|
10
10
|
spec.email = ["martyn.jago@btinternet.com"]
|
data/data/text/progress.txt
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
0
|
data/lib/cw/book_details.rb
CHANGED
data/lib/cw/file_details.rb
CHANGED
@@ -3,11 +3,12 @@
|
|
3
3
|
class FileDetails
|
4
4
|
HERE = File.dirname(__FILE__) + '/'
|
5
5
|
TEXT = HERE + '../../data/text/'
|
6
|
+
AUDIO = HERE + '../../audio/'
|
6
7
|
|
7
8
|
def initialize
|
8
|
-
@repeat_tone = "
|
9
|
-
@r_tone = "
|
10
|
-
@sentence_folder = "
|
9
|
+
@repeat_tone = AUDIO + "rpt.mp3"
|
10
|
+
@r_tone = AUDIO + "r.mp3"
|
11
|
+
@sentence_folder = TEXT + "sentences/"
|
11
12
|
@text_folder = TEXT
|
12
13
|
@progress_file = 'progress.txt'
|
13
14
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cw
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Martyn Jago
|
@@ -71,7 +71,6 @@ files:
|
|
71
71
|
- lib/cw/tone_generator.rb
|
72
72
|
- lib/cw/voice.rb
|
73
73
|
- lib/cw/words.rb
|
74
|
-
- read_book.rb
|
75
74
|
- test/run_tests_continuously.rb
|
76
75
|
- test/test_cw.rb
|
77
76
|
- test/test_stream.rb
|
data/read_book.rb
DELETED
@@ -1,33 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
|
3
|
-
now = Time.now
|
4
|
-
|
5
|
-
require_relative 'lib/cw'
|
6
|
-
|
7
|
-
speed = 20
|
8
|
-
|
9
|
-
CW.new do
|
10
|
-
wpm speed
|
11
|
-
play_book output: :letter, duration: 10
|
12
|
-
end
|
13
|
-
|
14
|
-
|
15
|
-
seconds = (Time.now - now).to_i
|
16
|
-
|
17
|
-
if seconds == 0
|
18
|
-
puts 'No tests run!'
|
19
|
-
else
|
20
|
-
minutes = 0
|
21
|
-
if seconds >= 60
|
22
|
-
minutes = (seconds / 60).to_i
|
23
|
-
seconds = seconds % 60
|
24
|
-
end
|
25
|
-
print "Daily run completed in "
|
26
|
-
print "#{minutes} minute" if minutes > 0
|
27
|
-
print 's' if minutes > 1
|
28
|
-
print ', ' if((seconds > 0) && (minutes > 0))
|
29
|
-
print "#{seconds} second" if seconds > 0
|
30
|
-
print 's' if seconds > 1
|
31
|
-
puts '.'
|
32
|
-
end
|
33
|
-
|