easy_translate 0.5.0 → 0.5.1

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: a65f5b6c50442857f3f8de4d618cd0d3311a78af
4
- data.tar.gz: a74abf1852057b9dbb787d2e2a8df4c53da5e0f6
3
+ metadata.gz: dc42a67dbc77615111fadfe7e35dc2ed65c72148
4
+ data.tar.gz: 629842ec7b8e4dd08d5a53169e29b0f7f08e80d8
5
5
  SHA512:
6
- metadata.gz: 064111bf0a3becf0ef54ed54e49452c6d1ce14929b0c5f51a929bef71d68d4983b5b83cb7d1232599f5e3c799031f4b1d13159766219d5196454bd113fc05267
7
- data.tar.gz: 95b03df27f5e80405e17000f30a68c9370ac0204840d18690a594f75266dc874c0eea21837faa5041c48395ec9fb471faec69df5af7ec236ad2feedfe80a10e6
6
+ metadata.gz: dfe3e38981eb1003583a65720823e8160f477ebee17fad18078b936a6e8407dfb28a6ca7a491f1f02af43b914cff8aefc2c6734f7de538b8d7f8a476f6d29fe4
7
+ data.tar.gz: '0439a0871adf41762f7630f1a18ce0e110411cff3290fee0ceb76e82159d1022b1351de91c338dbe2b29afb414c09e78fc0e14b6c74f8dae8848126c4e8c0013'
@@ -52,7 +52,7 @@ module EasyTranslate
52
52
  private
53
53
 
54
54
  def uri
55
- @uri ||= URI.parse("https://www.googleapis.com#{path}?#{param_s}")
55
+ @uri ||= URI.parse("https://translation.googleapis.com#{path}?#{param_s}")
56
56
  end
57
57
 
58
58
  def http
@@ -50,6 +50,7 @@ module EasyTranslate
50
50
  self.html = options.delete(:html)
51
51
  @source = options.delete(:from)
52
52
  @target = options.delete(:to)
53
+ @model = options.delete(:model)
53
54
  raise ArgumentError.new('No target language provided') unless @target
54
55
  raise ArgumentError.new('Support for multiple targets dropped in V2') if @target.is_a?(Array)
55
56
  @http_options = http_options
@@ -67,6 +68,7 @@ module EasyTranslate
67
68
  params = super || {}
68
69
  params[:source] = lang(@source) unless @source.nil?
69
70
  params[:target] = lang(@target) unless @target.nil?
71
+ params[:model] = @model unless @model.nil?
70
72
  params[:format] = @format unless @format.nil?
71
73
  params.merge! @options if @options
72
74
  params
@@ -1,5 +1,5 @@
1
1
  module EasyTranslate
2
2
 
3
- VERSION = '0.5.0'
3
+ VERSION = '0.5.1'
4
4
 
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: easy_translate
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Crepezzi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-31 00:00:00.000000000 Z
11
+ date: 2018-01-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
@@ -24,20 +24,6 @@ dependencies:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
- - !ruby/object:Gem::Dependency
28
- name: json
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - ">="
32
- - !ruby/object:Gem::Version
33
- version: '0'
34
- type: :runtime
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - ">="
39
- - !ruby/object:Gem::Version
40
- version: '0'
41
27
  - !ruby/object:Gem::Dependency
42
28
  name: thread
43
29
  requirement: !ruby/object:Gem::Requirement
@@ -84,7 +70,8 @@ files:
84
70
  - lib/easy_translate/version.rb
85
71
  - spec/spec_helper.rb
86
72
  homepage: https://github.com/seejohnrun/easy_translate
87
- licenses: []
73
+ licenses:
74
+ - MIT
88
75
  metadata: {}
89
76
  post_install_message:
90
77
  rdoc_options: []
@@ -102,7 +89,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
102
89
  version: '0'
103
90
  requirements: []
104
91
  rubyforge_project:
105
- rubygems_version: 2.2.0
92
+ rubygems_version: 2.6.14
106
93
  signing_key:
107
94
  specification_version: 4
108
95
  summary: Google Translate API Wrapper for Ruby