api_client_base 1.8.0 → 1.9.0

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: 6220f14a790ce1548a85cd97a5f870cd0e6e05c0c14c3a815c97499b4dc5a88b
4
- data.tar.gz: 2d1e16d307a3fd1859e35cde544833db19279fccc03968f4c929fa7f2d704e01
3
+ metadata.gz: 8b9fd36954265d22fd5c8b2ae143ccf63a54b941ffbfd4230022683501e5b674
4
+ data.tar.gz: 5bf06572c3e6c65ccc66dd6c98e650c8cd33b639f720b5cbd56a397daa8815e1
5
5
  SHA512:
6
- metadata.gz: 4ac762090b5b39591e73181a804ac9932fae90e3f26213e6ba08bd4a3916b4e5a7e4a5ec786ee4b1536fddfc2ad873e98ba69941aea855ddb33e2b17a3c0f6bf
7
- data.tar.gz: 4ef26be532375b6714c4d426755888b5371f2d08727f0c89690a189d5fcca83ba369f13ca6b87b4226c150b3517463d2ca2fd4222d35d56e22917913465e6df6
6
+ metadata.gz: d4e2dcc49429d9d20a65daff58d433aeb0170e0b5b0bbf9fc2feb2121be17ea28894e8a196175e095eb8f29526042d4418e2d0822a22e1c80aecc0c8eec56638
7
+ data.tar.gz: 441e6aeeb41f95255f35522f43e558370df1cc25b6954684c5eea40b0a4d0bffb6d47e10be187b209f9fd21515f3f4559a70a7a4d557d971edbedd408a5c8491
@@ -4,7 +4,11 @@ All notable changes to this project will be documented in this file.
4
4
  The format is based on [Keep a Changelog](http://keepachangelog.com/)
5
5
  and this project adheres to [Semantic Versioning](http://semver.org/).
6
6
 
7
- ## [Unreleased]
7
+ ## [1.9.0] - 2020-06-30
8
+ ### Added
9
+ - Allow users to override typhoeus_options to pass any args that we haven't defined
10
+
11
+ ## [1.8.0] - 2020-06-30
8
12
  ### Added
9
13
  - Allow all Typhoeus options to be passed to BuildTyphoeusOptions. This is useful when overriding the method `typhoeus_options` in requests
10
14
 
@@ -42,7 +42,16 @@ module APIClientBase
42
42
  def run
43
43
  require "typhoeus"
44
44
  if defined?(Typhoeus)
45
- request = Typhoeus::Request.new(uri, typhoeus_options)
45
+ opts = BuildTyphoeusOptions.(
46
+ {
47
+ method: action,
48
+ headers: headers,
49
+ body: body,
50
+ params: params,
51
+ proxy: proxy,
52
+ }.merge(typhoeus_options)
53
+ )
54
+ request = Typhoeus::Request.new(uri, opts)
46
55
  request.run
47
56
  else
48
57
  fail "Either override #run or make sure Typhoeus is available for use."
@@ -62,8 +71,8 @@ module APIClientBase
62
71
  path = URI.parse(host).path
63
72
  if path.present?
64
73
  URI.join(
65
- host,
66
- [path, "/"].join,
74
+ host,
75
+ [path, "/"].join,
67
76
  api_client_base_path[1..-1]
68
77
  )
69
78
  else
@@ -88,13 +97,7 @@ module APIClientBase
88
97
  def before_call; end
89
98
 
90
99
  def typhoeus_options
91
- BuildTyphoeusOptions.(
92
- method: action,
93
- headers: headers,
94
- body: body,
95
- params: params,
96
- proxy: proxy,
97
- )
100
+ {}
98
101
  end
99
102
 
100
103
  end
@@ -1,3 +1,3 @@
1
1
  module APIClientBase
2
- VERSION = "1.8.0"
2
+ VERSION = "1.9.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: api_client_base
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.0
4
+ version: 1.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ramon Tayag