rorvswild 1.0.0.pre.alpha6 → 1.0.0.pre.alpha7

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: 492dae0df8044448c77cf1d9822d0a38c620eb5d
4
- data.tar.gz: 046530a1906c3987c082b077da9358dd8bb8c692
3
+ metadata.gz: 50e11a687453e3e7c28fc36d5c750f2208a783ae
4
+ data.tar.gz: 261bc6f599ace16dd0e6edb37258fddc55c9ebfc
5
5
  SHA512:
6
- metadata.gz: 8ab27a731ee5e63c9e08c11e89d6fe02376f943f7a5263652865ddebd5071e5faea20e66a52e11a3a619b5fa9505899cdc0aae599d61eb757f16facc03c9ccff
7
- data.tar.gz: cdd6af7ec6ec368499e8f5ff8cb7da967474f2e56b3827baf4d54a24857f364ad333e20109bf63acea81a6410633f9524123ec7dd69b823a5e9fea0216f788ba
6
+ metadata.gz: 2df0c430db43b135fdd90228aaaba9aff75281e2f425ae7aac411aed5fbdbce58daac1f443099160a7c06889a222454abee0d62feaa26a13d531b5acdd9aeef7
7
+ data.tar.gz: 63b75b0ae22780242e8dce27c8799869f654a9997bf23379d113066ee6eb4a095d77b5a770a2563cc1a27808c670bd76d68044027edf12f6133998d9c810d372
@@ -2,7 +2,6 @@ require "set"
2
2
  require "uri"
3
3
  require "json/ext"
4
4
  require "net/http"
5
- require "net/http/persistent"
6
5
 
7
6
  module RorVsWild
8
7
  class Client
@@ -30,11 +29,21 @@ module RorVsWild
30
29
  end
31
30
 
32
31
  def http
33
- return @http if @http
34
- http = Net::HTTP::Persistent.new
35
- http.retry_change_requests = true
32
+ @http ||= new_http
33
+ end
34
+
35
+ def new_http
36
+ uri = URI(api_url)
37
+ http = Net::HTTP.new(uri.host, uri.port)
36
38
  http.open_timeout = timeout
37
- @http = http
39
+
40
+ if uri.scheme == HTTPS
41
+ http.verify_mode = OpenSSL::SSL::VERIFY_PEER
42
+ http.ca_file = CERTIFICATE_AUTHORITIES_PATH
43
+ http.use_ssl = true
44
+ end
45
+
46
+ http
38
47
  end
39
48
 
40
49
  def post_async(path, data)
@@ -1,3 +1,3 @@
1
1
  module RorVsWild
2
- VERSION = "1.0.0-alpha6".freeze
2
+ VERSION = "1.0.0-alpha7".freeze
3
3
  end
data/rorvswild.gemspec CHANGED
@@ -19,6 +19,4 @@ Gem::Specification.new do |spec|
19
19
  spec.require_paths = ["lib"]
20
20
 
21
21
  spec.add_development_dependency "bundler", "~> 1.6"
22
-
23
- spec.add_dependency "net-http-persistent", ">= 2.9.4"
24
22
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rorvswild
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.pre.alpha6
4
+ version: 1.0.0.pre.alpha7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexis Bernard
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-05-03 00:00:00.000000000 Z
11
+ date: 2017-05-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -24,20 +24,6 @@ dependencies:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '1.6'
27
- - !ruby/object:Gem::Dependency
28
- name: net-http-persistent
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - ">="
32
- - !ruby/object:Gem::Version
33
- version: 2.9.4
34
- type: :runtime
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - ">="
39
- - !ruby/object:Gem::Version
40
- version: 2.9.4
41
27
  description: Performances & quality insights for rails developers.
42
28
  email:
43
29
  - alexis@bernard.io