web_translate_it 2.4.6 → 2.4.7
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.
- checksums.yaml +4 -4
- data/history.md +4 -0
- data/lib/web_translate_it/command_line.rb +3 -0
- data/lib/web_translate_it/configuration.rb +1 -0
- data/lib/web_translate_it/connection.rb +6 -1
- data/readme.md +1 -1
- data/spec/examples/config/translation.yml +3 -0
- 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: 37656492f7a6e8dc4217d6f84799a141f9bc30c2
|
|
4
|
+
data.tar.gz: 9590f016fa7a25b0453435b06e379566331ae315
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e9a52a91a082f0ef0906319993b13926e47df20997cfc1aa9775032c4a3d21a2f95d1f784c660b2b3fcbf97448b4e24b2c32ab9b6af3a1794c1070e2a298b9d7
|
|
7
|
+
data.tar.gz: adcd82f7ce617746a63b6c3dbf838a890c76cbb300b6a205b6a96188a4fca96671d147f49c92f564680ae0ceb74c3e55099a1724fdcd31b2d12f761305e510ba
|
data/history.md
CHANGED
|
@@ -344,6 +344,9 @@ api_key: #{api_key}
|
|
|
344
344
|
# before_push: "echo 'some unix command'" # Command executed before pushing files
|
|
345
345
|
# after_push: "touch tmp/restart.txt" # Command executed after pushing files
|
|
346
346
|
|
|
347
|
+
# Silence SSL errors
|
|
348
|
+
# silence_errors: true
|
|
349
|
+
|
|
347
350
|
FILE
|
|
348
351
|
return file
|
|
349
352
|
end
|
|
@@ -30,6 +30,7 @@ module WebTranslateIt
|
|
|
30
30
|
set_locales_needed(configuration)
|
|
31
31
|
set_files(project_info['project'])
|
|
32
32
|
set_locales(project_info['project'])
|
|
33
|
+
WebTranslateIt::Connection.turn_silent_on if configuration['silence_errors']
|
|
33
34
|
self.project_name = project_info['project']['name']
|
|
34
35
|
else
|
|
35
36
|
puts StringUtil.failure("\nCan't find a configuration file in #{File.expand_path(path_to_config_file, self.path)}")
|
|
@@ -10,6 +10,7 @@ module WebTranslateIt
|
|
|
10
10
|
@@api_key = nil
|
|
11
11
|
@@http_connection = nil
|
|
12
12
|
@@debug = false
|
|
13
|
+
@@silent = false
|
|
13
14
|
|
|
14
15
|
#
|
|
15
16
|
# Initialize and yield a HTTPS Keep-Alive connection to WebTranslateIt.com
|
|
@@ -43,7 +44,7 @@ module WebTranslateIt
|
|
|
43
44
|
@@http_connection = http.start
|
|
44
45
|
yield @@http_connection if block_given?
|
|
45
46
|
rescue OpenSSL::SSL::SSLError
|
|
46
|
-
puts "Unable to verify SSL certificate."
|
|
47
|
+
puts "Unable to verify SSL certificate." unless @@silent
|
|
47
48
|
http = Net::HTTP::Proxy(proxy.host, proxy.port, proxy.user, proxy.password).new('webtranslateit.com', 443)
|
|
48
49
|
http.set_debug_output($stderr) if @@debug
|
|
49
50
|
http.use_ssl = true
|
|
@@ -64,6 +65,10 @@ module WebTranslateIt
|
|
|
64
65
|
@@debug = true
|
|
65
66
|
end
|
|
66
67
|
|
|
68
|
+
def self.turn_silent_on
|
|
69
|
+
@@silent = true
|
|
70
|
+
end
|
|
71
|
+
|
|
67
72
|
def self.api_key
|
|
68
73
|
@@api_key
|
|
69
74
|
end
|
data/readme.md
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: web_translate_it
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.4.
|
|
4
|
+
version: 2.4.7
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Edouard Briere
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2018-
|
|
11
|
+
date: 2018-03-28 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: multipart-post
|