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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0b9ca3041f6932ab1b0cc64ebb0a93b4f800f990
4
- data.tar.gz: 83c9303964f2551c265bdc4be9c3683657544281
3
+ metadata.gz: 07532b10e20297eadad02ee9acbcb4ae044f3ed6
4
+ data.tar.gz: fd692cc4c505e4240aa7f7314e1c0c5535fa192a
5
5
  SHA512:
6
- metadata.gz: c16dcefb6c4100aadc6e06881138d890e6b651fa9cc19e6061cd41e2eb3f3e6276646b5ffb8a8216eff47f6e56d5a2c8d0a86f80e012e83654427fe2b1ea75de
7
- data.tar.gz: 94650aa49ab1a46b57d2b73dfb78737dc7a8ab1581416e1ff8f3d2b847932519182681890d0afca8949d6f548a4a727c4102e47f96241924cb000c34914474b3
6
+ metadata.gz: 2eb678d25c8d30214b4c1ae9f4f303737ecaf2ba74158c569456d34552b749388ced5a4a71466a777e955a087cef03644c31fd8134c888d8755fde17291cad33
7
+ data.tar.gz: 13f20251f2bfc2c4bc4876c131c54ad78052bf234150d68cc77cf991402a6fd6006e873e10750eb377929d759e0be3c26db481bf8cc457f52cbd988eb1b79e95
data/.gitignore CHANGED
@@ -1,3 +1,4 @@
1
1
  /Gemfile.lock
2
2
  /test.rb
3
3
  /.ruby_version/
4
+ audio/audio_output.wav
data/README.md CHANGED
@@ -71,6 +71,8 @@ ruby example.rb
71
71
  - repeat_word / double_words
72
72
  - word_length / word_size
73
73
  - word_shuffle / shuffle
74
+ - random_letters
75
+ - random_numbers
74
76
  - having_size_of / word_size
75
77
  - number_of_words / word_count
76
78
  - words_including / including
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'
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"]
@@ -1 +1 @@
1
- 1
1
+ 0
@@ -6,7 +6,7 @@ class BookDetails
6
6
 
7
7
  HERE = File.dirname(__FILE__) + '/'
8
8
  BOOK_DIRECTORY = HERE + '../../data/text/'
9
- BOOK_NAME = 'tom_sawyer.txt'
9
+ BOOK_NAME = 'adv_of_sh_holmes.txt'
10
10
 
11
11
  def initialize
12
12
  @book_name = BOOK_NAME
@@ -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 = "../tom2/rpt.mp3"
9
- @r_tone = "../tom2/r.mp3"
10
- @sentence_folder = "../tom2/"
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.7
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
-