yatran 0.1.0 → 0.1.1

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.
data/lib/yatran/cli.rb CHANGED
@@ -69,7 +69,7 @@ EOS
69
69
  @options[:debug] = true
70
70
  end
71
71
  end.parse!
72
-
72
+ p @options
73
73
  end
74
74
 
75
75
 
@@ -105,9 +105,10 @@ EOS
105
105
 
106
106
 
107
107
  unless @text
108
- if @options[:source]
109
- raise Error.new("File #{@options[:source]} doesn't exist") unless File.exists? @options[:source]
110
- @text = IO.read @options[:source]
108
+ if @options[:file]
109
+ raise Error.new("File #{@options[:file]} doesn't exist") unless File.exists? @options[:file]
110
+ @text = IO.read @options[:file]
111
+
111
112
  end
112
113
  end
113
114
 
@@ -116,7 +117,7 @@ EOS
116
117
  end
117
118
 
118
119
  def validate_direction!
119
- @direction = @options[:direction]
120
+ @direction = @options[:direction].gsub("-","_")
120
121
  unless @direction
121
122
  raise Error.new(" Undefined translation direction ") unless ( @options[:from] and @options[:to] )
122
123
  @direction = "#{@options[:from]}-#{@options[:to]}"
@@ -21,5 +21,5 @@
21
21
  # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22
22
  #++
23
23
  module Yatran
24
- VERSION = "0.1.0"
24
+ VERSION = "0.1.1"
25
25
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yatran
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2012-09-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: json
16
- requirement: &70254395693740 !ruby/object:Gem::Requirement
16
+ requirement: &70148916838960 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70254395693740
24
+ version_requirements: *70148916838960
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: rspec
27
- requirement: &70254395693200 !ruby/object:Gem::Requirement
27
+ requirement: &70148916838000 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,7 +32,7 @@ dependencies:
32
32
  version: '0'
33
33
  type: :development
34
34
  prerelease: false
35
- version_requirements: *70254395693200
35
+ version_requirements: *70148916838000
36
36
  description: ! 'unofficial http://api.yandex.ru/translate API Client for ruby '
37
37
  email:
38
38
  - fedoronchuk@gmail.com