web_translate_it 2.4.6 → 2.4.7

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: 9a7c85794c05562e7e978e1512aba4f8b3ff55cb
4
- data.tar.gz: 5be94ed3031772ac7bce204ed55d54aa23089f51
3
+ metadata.gz: 37656492f7a6e8dc4217d6f84799a141f9bc30c2
4
+ data.tar.gz: 9590f016fa7a25b0453435b06e379566331ae315
5
5
  SHA512:
6
- metadata.gz: ee6070347969a333f81600f166667f45e47c3cd0604a1a5ded6bee60d7a4338fc5d8c70ad755319547fa23649611292c2b235ae7a34beb29a154e28fed4cb9bd
7
- data.tar.gz: e97a72ca7512acaead3ab8a77e20ede0db3a472f710d37ccde9c8c5d13573a0ea729289b0bb58fc4b84a0846e1af8320f0678cf8c50ed174f03268b26af64f1b
6
+ metadata.gz: e9a52a91a082f0ef0906319993b13926e47df20997cfc1aa9775032c4a3d21a2f95d1f784c660b2b3fcbf97448b4e24b2c32ab9b6af3a1794c1070e2a298b9d7
7
+ data.tar.gz: adcd82f7ce617746a63b6c3dbf838a890c76cbb300b6a205b6a96188a4fca96671d147f49c92f564680ae0ceb74c3e55099a1724fdcd31b2d12f761305e510ba
data/history.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## Version 2.4.7 / 2018-03-28
2
+
3
+ * Add an option to .wti file to silence SSL errors.
4
+
1
5
  ## Version 2.4.6 / 2018-02-28
2
6
 
3
7
  * Fix SSL issue.
@@ -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
@@ -276,4 +276,4 @@ fr: 100% translated, 100% completed.
276
276
 
277
277
  # License
278
278
 
279
- Copyright (c) 2009-2017 Atelier Convivialité, released under the MIT License.
279
+ Copyright (c) 2009-2018 Atelier Convivialité, released under the MIT License.
@@ -4,3 +4,6 @@ api_key: 4af21ce1fb3a4f7127a60b31ebc41c1446b38bb2
4
4
  # Optional: locales not to sync with Web Translate It.
5
5
  # eg. [:en, :fr] or just 'en'
6
6
  # ignore_locales: :en
7
+
8
+ # Silence SSL errors
9
+ # silence_errors: true
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.6
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-02-28 00:00:00.000000000 Z
11
+ date: 2018-03-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: multipart-post