request-builder 0.2.21 → 0.2.27

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
  SHA256:
3
- metadata.gz: e58dd8cbe13a1de679686b7534a99bbdb26fd5a4890bdb699206c3e092c61ded
4
- data.tar.gz: ab500ed70b7e452efa82adf02f6cceed55df658e0764a251e22ff1119e7d7dc7
3
+ metadata.gz: 7dd88ab09a63667d076be6e95d8e28df31e559a09d2ae8f7abcc568ac23587e7
4
+ data.tar.gz: 9cb325b898b688e4e5e0427dced624ecf764278fc633fe4613d371b1e63293ca
5
5
  SHA512:
6
- metadata.gz: 89c78f6200d91103bc14b99a5c123860772bdbf921405fdb3410caffe4a97efac3c4f2b6c992fba60ba1793b5a66642c20aace3b4491929c5115bc856ae1f40f
7
- data.tar.gz: aed0b5343c739c86015fc4262f23047236a7a37a3edf103db5359c0e152746e42a5095188afd25ba10c3aa89f54ec555d13fd1322a86ed50355eff210c4b8add
6
+ metadata.gz: 203454463717a1f550b34ea2a2e9ec75932435253c26930cad0194678cb870d6ee7860156f03f7a4a9d0fb73884d2c49d3f7371fce10e2a5723d02abb1ada70d
7
+ data.tar.gz: deb29cf7e0660c176acf41c42ec19c687c41958a9f8de9f9a37a6a7b0e36ba02aebdc2e86462355045597ad9354ddf854a443003a456342a3a85675b7fa38401
@@ -1,4 +1,5 @@
1
1
  require "faraday"
2
+ require "faraday_middleware"
2
3
 
3
4
  module Request
4
5
  module Builder
@@ -6,7 +7,7 @@ module Request
6
7
  private
7
8
 
8
9
  def connection
9
- @_connection ||= Faraday.new(url: config.host) do |builder|
10
+ @_connection ||= Faraday.new(url: config.host, proxy: config.proxy, ssl: config.ssl) do |builder|
10
11
  builder.adapter config.adapter, config.stubs
11
12
  builder.request config.request_middleware
12
13
  builder.response config.response_middleware
@@ -5,7 +5,7 @@ module Request
5
5
 
6
6
  delegate_missing_to :context
7
7
 
8
- attrs = [:params, :callbacks, :headers, :body, :host, :path, :method, :request_middleware, :response_middleware, :adapter, :logger, :timeout]
8
+ attrs = [:params, :callbacks, :headers, :body, :host, :path, :method, :request_middleware, :response_middleware, :adapter, :logger, :timeout, :proxy, :ssl]
9
9
 
10
10
  attr_reader :context, :stubs
11
11
  attr_writer *attrs, :stubs, :context
@@ -27,6 +27,8 @@ module Request
27
27
  @params = params[:params] || HashWithIndifferentAccess.new
28
28
  @headers = params[:headers] || HashWithIndifferentAccess.new
29
29
  @callbacks = params[:callbacks] || HashWithIndifferentAccess.new
30
+ @proxy = params[:proxy]
31
+ @ssl = params[:ssl] || {}
30
32
  end
31
33
 
32
34
  attrs.each do |attr|
@@ -113,7 +115,9 @@ module Request
113
115
  body: @body.dup,
114
116
  params: @params.dup,
115
117
  headers: @headers.dup,
116
- callbacks: @callbacks.dup
118
+ callbacks: @callbacks.dup,
119
+ proxy: @proxy.dup,
120
+ ssl: @ssl.dup
117
121
  )
118
122
  end
119
123
 
@@ -1,5 +1,5 @@
1
1
  module Request
2
2
  module Builder
3
- VERSION = "0.2.21"
3
+ VERSION = "0.2.27"
4
4
  end
5
5
  end
@@ -23,7 +23,8 @@ Gem::Specification.new do |spec|
23
23
  spec.executables = []
24
24
  spec.require_paths = ["lib"]
25
25
 
26
- spec.add_dependency "faraday", "~> 2.2.0"
26
+ spec.add_dependency "faraday", "~> 1.7.1"
27
+ spec.add_dependency "faraday_middleware", "~> 1.2.0"
27
28
  spec.add_dependency "dry-schema", "~> 1.9"
28
29
  spec.add_dependency "dry-initializer", "~> 3.0"
29
30
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: request-builder
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.21
4
+ version: 0.2.27
5
5
  platform: ruby
6
6
  authors:
7
7
  - Anton Kostyuk
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-01-14 00:00:00.000000000 Z
11
+ date: 2023-10-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -16,14 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 2.2.0
19
+ version: 1.7.1
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 2.2.0
26
+ version: 1.7.1
27
+ - !ruby/object:Gem::Dependency
28
+ name: faraday_middleware
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: 1.2.0
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: 1.2.0
27
41
  - !ruby/object:Gem::Dependency
28
42
  name: dry-schema
29
43
  requirement: !ruby/object:Gem::Requirement