termit 3.5.0 → 3.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/termit/data_fetcher_base.rb +8 -1
- data/lib/termit/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2556746804ff77045ae5977cf972586b81ca6445
|
4
|
+
data.tar.gz: c5ebf6322cca4d5a0586d6688b90cd6f60e829fd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e41fd5faf2a48dd55b34817a5b3912ced6f21c2005630642f88aab826e2c00defe8c2d4e5f4dea1853d0fa9506255bcb60090ce039cf07f09b5cc607c423eb99
|
7
|
+
data.tar.gz: 8619a4ec32f40929946c22a2049de87ceec09b091d01179ac5996aedae0bafccfae4dda22896471609cec5b2bfed2273dcaf951319529a2f8b6d4569250c13a3
|
@@ -5,6 +5,7 @@ module Termit
|
|
5
5
|
class DataFetcherBase
|
6
6
|
include CanOutput
|
7
7
|
delegate :display_invalid_data_msg, :display_error_msg, to: :output_manager
|
8
|
+
DUMMY_AGENT = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36'.freeze
|
8
9
|
|
9
10
|
def initialize url, text
|
10
11
|
@url = url
|
@@ -24,7 +25,13 @@ module Termit
|
|
24
25
|
private
|
25
26
|
|
26
27
|
def self.auth_cookies
|
27
|
-
@@_auth_cookies ||= RestClient.
|
28
|
+
@@_auth_cookies ||= RestClient::Request.execute(
|
29
|
+
method: :get,
|
30
|
+
url: 'https://www.bing.com/translator',
|
31
|
+
headers: {
|
32
|
+
'User-Agent' => DUMMY_AGENT
|
33
|
+
}
|
34
|
+
).cookies
|
28
35
|
end
|
29
36
|
end
|
30
37
|
end
|
data/lib/termit/version.rb
CHANGED
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: 3.
|
4
|
+
version: 3.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- pawurb
|
@@ -186,7 +186,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
186
186
|
version: '0'
|
187
187
|
requirements: []
|
188
188
|
rubyforge_project:
|
189
|
-
rubygems_version: 2.
|
189
|
+
rubygems_version: 2.4.6
|
190
190
|
signing_key:
|
191
191
|
specification_version: 4
|
192
192
|
summary: Translations with speech synthesis in your terminal
|