alba_habla 0.0.2 → 0.0.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f68da23652a8ceb37915444b4365fa587e46f841
4
- data.tar.gz: f8c4330c5a41e2788382f81f994bdd6ca6eb2961
3
+ metadata.gz: 3ad034340937ba8de825b0f5d358068c7b6f1f34
4
+ data.tar.gz: c41ce2df54a15cb7d25cb358d5af3cdd4c8f55b4
5
5
  SHA512:
6
- metadata.gz: d37412a5f88bb9b6f13ff9b1ebcee29c5261638fa21e9667855d24e7a94e60d2319befcff6669299db438576aa2692fb9ddee5957fe16900628aa549b1ea8740
7
- data.tar.gz: 1c22ac349ed0a1e17695dfdfee662738aaaf08981d773126def3f33ded6d1e1da53737ba68d42a11226a59c60c3d0cd332e17688762ee6e01e616a3095664324
6
+ metadata.gz: 6d3830d830f4b79d2554f9433279aa282d067e7c83babac0acdc8eafb4dd1bf5b9070a38eb9319c7d12e965d8719ce511a1a6d8b1929164af79df996367c9a3f
7
+ data.tar.gz: 2f654a972522a16a9a496fbb6ed651ec7c9f4dd085a284532b3687802b5ec2b536cfe8f0fc1eb5613c7ddbb4e3c1c512940055233453856a585d9408c33cef39
data/bin/alba_habla CHANGED
@@ -3,7 +3,7 @@ require 'io/console'
3
3
  require 'alba_habla'
4
4
 
5
5
  cli_options = AlbaHabla::Cli.parse(ARGV)
6
- ah = AlbaHabla::Commands.new(cli_options[:book_path])
6
+ ah = AlbaHabla::Commands.new(cli_options[:book_path], cli_options[:voice])
7
7
 
8
8
  command = nil
9
9
  command_history = []
@@ -7,6 +7,7 @@ module AlbaHabla
7
7
  book_path: '',
8
8
  }.freeze
9
9
 
10
+ # rubocop:disable Metrics/MethodLength
10
11
  def self.parse(args)
11
12
  options = DEFAULT_OPTIONS.dup
12
13
 
@@ -16,10 +17,15 @@ module AlbaHabla
16
17
  opts.on('-bBOOK_PATH', '--books=BOOK_PATH', 'Path to folder with book files') do |bp|
17
18
  options[:book_path] = bp.end_with?('/') ? bp : "#{bp}/"
18
19
  end
20
+
21
+ opts.on('-vVOICE', '--voice=VOICE', 'Voice to be used by your speech synthesizer') do |v|
22
+ options[:voice] = v
23
+ end
19
24
  end
20
25
 
21
26
  opt_parser.parse!(args)
22
27
  options
23
28
  end
29
+ # rubocop:enable Metrics/MethodLength
24
30
  end
25
31
  end
@@ -8,8 +8,8 @@ module AlbaHabla
8
8
  'espeak' => 'en-westindies',
9
9
  }.freeze
10
10
 
11
- def initialize(book_path)
12
- @voice = DEFAULT_VOICES[executable]
11
+ def initialize(book_path, voice = nil)
12
+ @voice = voice || DEFAULT_VOICES[executable]
13
13
  @book_path = book_path
14
14
  end
15
15
 
data/lib/alba_habla.rb CHANGED
@@ -2,5 +2,5 @@ require 'alba_habla/commands'
2
2
  require 'alba_habla/cli'
3
3
 
4
4
  module AlbaHabla
5
- VERSION = '0.0.2'.freeze
5
+ VERSION = '0.0.3'.freeze
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: alba_habla
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mertonium
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-06-17 00:00:00.000000000 Z
11
+ date: 2017-06-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec