termit 2.0.7 → 2.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 +3 -2
- data/bin/termit +7 -2
- data/lib/termit/output_manager.rb +1 -1
- data/lib/termit/text_response_handler.rb +1 -1
- data/lib/termit/version.rb +1 -1
- data/spec/spec_helper.rb +2 -0
- data/spec/termit/sound_response_handler_spec.rb +6 -3
- data/termit.gemspec +1 -0
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 44368384e1b8390999961489ef0583787eee15d6
|
4
|
+
data.tar.gz: 14f6149d0e2b337739ffb2f91cb21ef5d2fded7b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 030786d93bf26c4053a1fd2c7b9fd3390f305af1c736fac622ae3771660963758068650f9e25f13f94be4cb8cea68f97c7182d54dbce903bdeb28dff1632ee35
|
7
|
+
data.tar.gz: 23ac51c985d5932e53a76e54b3d913eee478513177cda6addf02043066d468a04b11a10120a42cbd522e862c55e284eae3feef5e59370c957013de6b6e58930b
|
data/.gitignore
CHANGED
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
#Termit [![Build Status](https://travis-ci.org/pawurb/termit.png)](https://travis-ci.org/pawurb/termit) [![Gem Version](https://badge.fury.io/rb/termit.png)](http://badge.fury.io/rb/termit)
|
1
|
+
#Termit [![Build Status](https://travis-ci.org/pawurb/termit.png)](https://travis-ci.org/pawurb/termit) [![Gem Version](https://badge.fury.io/rb/termit.png)](http://badge.fury.io/rb/termit) [![Coverage Status](https://coveralls.io/repos/pawurb/termit/badge.png)](https://coveralls.io/r/pawurb/termit)
|
2
2
|
|
3
3
|
|
4
4
|
Termit is an easy way to use Google Translate in your terminal.
|
@@ -78,9 +78,10 @@ For MacOSX:
|
|
78
78
|
|
79
79
|
This is my first open-source project for people to use. Any feedback will be appreciated.
|
80
80
|
|
81
|
+
Currently I am available for hire as a rails developer and willing to relocate.
|
82
|
+
|
81
83
|
You can contact me on: p.urbanek89@gmail.com
|
82
84
|
|
83
|
-
Btw. I am looking for a job as a rails developer now and I am willing to relocate.
|
84
85
|
|
85
86
|
|
86
87
|
|
data/bin/termit
CHANGED
@@ -5,7 +5,12 @@ $LOAD_PATH.unshift(File.dirname(__FILE__) + '/../lib') unless $LOAD_PATH.include
|
|
5
5
|
|
6
6
|
require 'termit'
|
7
7
|
|
8
|
-
|
9
|
-
Termit::
|
8
|
+
begin
|
9
|
+
options = Termit::UserInputParser.new(ARGV).options
|
10
|
+
Termit::Main.new(options).translate
|
11
|
+
rescue Interrupt
|
12
|
+
STDERR.puts "\nTermit: exiting due to user request"
|
13
|
+
exit 130
|
14
|
+
end
|
10
15
|
|
11
16
|
|
@@ -26,7 +26,7 @@ module Termit
|
|
26
26
|
def extract_synonyms
|
27
27
|
synonyms_data = @text.split("[[")[2].split("[")[1]
|
28
28
|
length = synonyms_data.length
|
29
|
-
if synonyms_data[0] == '4' #
|
29
|
+
if synonyms_data[0] == '4' #there are no synonyms
|
30
30
|
" ---"
|
31
31
|
else
|
32
32
|
synonyms_data[0..(length-3)].delete("\"").gsub(/(,)/, ", ")
|
data/lib/termit/version.rb
CHANGED
data/spec/spec_helper.rb
CHANGED
@@ -3,10 +3,13 @@ require 'spec_helper'
|
|
3
3
|
|
4
4
|
describe Termit::SoundResponseHandler do
|
5
5
|
describe "call method" do
|
6
|
-
|
7
|
-
|
6
|
+
subject { Termit::SoundResponseHandler.new('tralala') }
|
7
|
+
let(:location) { "#{File.expand_path('~')}/.termit" }
|
8
8
|
|
9
|
-
it "
|
9
|
+
it "saves and plays the sound file the sound file" do
|
10
|
+
File.should_receive(:open).with("#{location}/sound_response.mpeg", "wb")
|
11
|
+
Object.any_instance.should_receive(:system).with("mpg123 -q #{location}/sound_response.mpeg")
|
12
|
+
subject.call
|
10
13
|
end
|
11
14
|
end
|
12
15
|
end
|
data/termit.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: termit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- pawurb
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-10-
|
11
|
+
date: 2013-10-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|
@@ -66,6 +66,20 @@ dependencies:
|
|
66
66
|
- - '>='
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: coveralls
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - '>='
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - '>='
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
69
83
|
description: ' Termit is an easy way to use all the Google Translate goodies straight
|
70
84
|
from your terminal. '
|
71
85
|
email:
|