web_translate_it 1.8.1.0 → 1.8.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/history.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## Version 1.8.1.1 / 2011-06-20
2
+
3
+ * Bug fix: Don’t verify SSL certificate when running under MS Windows. #57
4
+
1
5
  ## Version 1.8.1.0 / 2011-06-08
2
6
 
3
7
  * Upgrade `multipart-post` dependency.
@@ -30,11 +30,15 @@ module WebTranslateIt
30
30
  proxy = ENV['http_proxy'] ? URI.parse(ENV['http_proxy']) : OpenStruct.new
31
31
  http = Net::HTTP::Proxy(proxy.host, proxy.port, proxy.user, proxy.password).new('webtranslateit.com', 443)
32
32
  http.use_ssl = true
33
- http.verify_mode = OpenSSL::SSL::VERIFY_PEER
34
- if File.exists?('/etc/ssl/certs') # Ubuntu
35
- http.ca_path = '/etc/ssl/certs'
33
+ if RUBY_PLATFORM.downcase.include?("mingw32") # Don’t verify SSL cert for Windows
34
+ http.verify_mode = OpenSSL::SSL::VERIFY_NONE
36
35
  else
37
- http.ca_file = File.expand_path('cacert.pem', __FILE__)
36
+ http.verify_mode = OpenSSL::SSL::VERIFY_PEER
37
+ if File.exists?('/etc/ssl/certs') # Ubuntu
38
+ http.ca_path = '/etc/ssl/certs'
39
+ else
40
+ http.ca_file = File.expand_path('cacert.pem', __FILE__)
41
+ end
38
42
  end
39
43
  http.open_timeout = http.read_timeout = 30
40
44
  yield http.start
data/version.yml CHANGED
@@ -2,4 +2,4 @@
2
2
  :major: 1
3
3
  :minor: 8
4
4
  :tiny: 1
5
- :patch: 0
5
+ :patch: 1
metadata CHANGED
@@ -6,8 +6,8 @@ version: !ruby/object:Gem::Version
6
6
  - 1
7
7
  - 8
8
8
  - 1
9
- - 0
10
- version: 1.8.1.0
9
+ - 1
10
+ version: 1.8.1.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - "\xC3\x89douard Bri\xC3\xA8re"
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-06-08 00:00:00 +02:00
18
+ date: 2011-06-20 00:00:00 +02:00
19
19
  default_executable: wti
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency