termit 2.0.6 → 2.0.7

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: e30065a5242cf4e4aa3768265c44ecac3b8b2f2d
4
- data.tar.gz: 546fcbe56d7a5f9ad22490545013650f440c9a31
3
+ metadata.gz: d4becac03cd5e109044a37c71df52b8e39d4a4d9
4
+ data.tar.gz: 4b95288ab909020a7b9c7ff7eee0c532a559b9b5
5
5
  SHA512:
6
- metadata.gz: 54db1363b236b0d1720b875e4406a49b51ce6492c4155e6db6fdca7f26eb241f9afdd8c19d8cafdfd3768a90d3806b91671d580fdf3639ba28f5e047faa519eb
7
- data.tar.gz: 3d4bf47dcea58ee04569bcd82061883fc7dfdeb3ff22208f566ca099322a327ee6a275d1238999be313d2138aa167c5c9dbfe3a2daa392d053555b709adbafd5
6
+ metadata.gz: a8c5561b329efce00848eb9297023509f2c0a6b5cb7941ac0a68fcfaae3c3ae6a9235c176e330c94ec55f2020a00a0a163fc2b93d525a26feaf4a1de754a95b2
7
+ data.tar.gz: afef69c8a1675e489bf84c56ccb705e4796a566da8c56bc702024430cd759fd13286d41090a1af820826fe54b50ce1ac29c48c087677c10ae5fa654352fbfeae
@@ -2,11 +2,23 @@
2
2
  module Termit
3
3
  class OutputManager
4
4
  def display_error_info_and_quit
5
- abort "TERMIT: Wrong data. Example: 'termit en es the cowboy ' => 'el vaquero'"
5
+ puts "TERMIT: Wrong data. Example: 'termit en es the cowboy ' => 'el vaquero'"
6
+ exit
7
+ end
8
+
9
+ def display_player_error_and_quit
10
+ message = "Termit speech synthesis requires mpg123 installed."
11
+ case Gem::Platform.local.os
12
+ when "darwin"
13
+ message << "\nPlease run 'brew install mpg123'"
14
+ when "linux"
15
+ message << "\nPlease run 'sudo apt-get install mpg123'"
16
+ end
17
+ abort message
6
18
  end
7
19
 
8
20
  def display_help_and_quit
9
- abort <<-EOS
21
+ puts <<-EOS
10
22
  =========TERMIT=========
11
23
  Usage:
12
24
  termit 'source_language' 'target_language' 'text'
@@ -21,21 +33,13 @@ Options:
21
33
 
22
34
  Check docs at: github.com/pawurb/termit
23
35
  EOS
36
+ exit
24
37
  end
25
38
 
26
- def display_player_error_and_quit
27
- message = "Termit speech synthesis requires mpg123 installed."
28
- case Gem::Platform.local.os
29
- when "darwin"
30
- message << "\nPlease run 'brew install mpg123'"
31
- when "linux"
32
- message << "\nPlease run 'sudo apt-get install mpg123'"
33
- end
34
- abort message
35
- end
36
39
 
37
40
  def display_version_and_quit
38
- abort "Termit #{Termit::VERSION}"
41
+ puts "Termit #{Termit::VERSION}"
42
+ exit
39
43
  end
40
44
 
41
45
  def display_translation text
@@ -47,6 +51,5 @@ EOS
47
51
  print '=> Synonyms: '
48
52
  puts synonyms
49
53
  end
50
-
51
54
  end
52
55
  end
@@ -1,3 +1,3 @@
1
1
  module Termit
2
- VERSION = "2.0.6"
2
+ VERSION = "2.0.7"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: termit
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.6
4
+ version: 2.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - pawurb