api_client_base 1.4.1 → 1.5.0

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 16b20a668021e8155ac1a9f45863a2bf24c8671d529d6050d4c7d351d4a67475
4
- data.tar.gz: 295d032174dbbf604bc1f7fa39ad81e53fd6fb0466a48325f96e2c4a728726d3
3
+ metadata.gz: ab81c1e64a88897c1acdc27560853545889693a32398fce9ae64b5ba4b29c4ca
4
+ data.tar.gz: cea3469155ef8e303d168d8a3e9b6f28ce08915fd2b072ce4be433e909998846
5
5
  SHA512:
6
- metadata.gz: 715769a66ce42746dff5ed6b09e4fd9c20e7476e2dbc76d0780f3d542a4d6ddc4ec7ab06d2a325de5da9f4888db10efc1e45ed06857cd7eb0d55c57387758fe4
7
- data.tar.gz: 8091fb4977f8b329a9f55865913351e51ba1fd1be20f8f018d76fe7fc6fd91b1b86540f9f76f6cb6c21a952d66027fedef2bbea63a6bb59cd68e717a586c0e91
6
+ metadata.gz: 3983bbe59413269d8a4fa4e9b8d9791c6ec2ee1e4f4b8013aa570640575117ee7643420515bc9cf12fa9c5b7e27408090b75373f01219524c550e2c8f7937071
7
+ data.tar.gz: acd06f3eb25ce1337d47df1f95ab6a8db983db6243bd8f16562e0b4577dc7fdb862925ce145e19f57167a2781a4a3e9f01cff08e0523ac84a8beedf710bba40f
@@ -4,6 +4,10 @@ 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
+ ## [1.5.0] - 2019-04-03
8
+ ### Added
9
+ - Allow developer to define `before_call` in requests to execute code
10
+
7
11
  ## [1.4.1] - 2019-01-30
8
12
  ### Fixed
9
13
  - `host` configuration should not remove the path
data/README.md CHANGED
@@ -154,6 +154,14 @@ module MyGem
154
154
  def default_action
155
155
  :post # defaults to :get
156
156
  end
157
+
158
+ def before_call
159
+ # You need not define this, but it might be helpful if you want to log things, for example, before the http request is executed.
160
+ # The following example would require you to define a `logger` attribute
161
+
162
+ self.logger.debug "Will make a #{action} call: #{body}"
163
+ end
164
+
157
165
  end
158
166
  end
159
167
  ```
@@ -32,6 +32,8 @@ module APIClientBase
32
32
  end
33
33
 
34
34
  def call
35
+ before_call
36
+
35
37
  require "typhoeus"
36
38
  if defined?(Typhoeus)
37
39
  request = Typhoeus::Request.new(
@@ -86,5 +88,7 @@ module APIClientBase
86
88
  end
87
89
  end
88
90
 
91
+ def before_call; end
92
+
89
93
  end
90
94
  end
@@ -1,3 +1,3 @@
1
1
  module APIClientBase
2
- VERSION = "1.4.1"
2
+ VERSION = "1.5.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: api_client_base
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.1
4
+ version: 1.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ramon Tayag
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-01-30 00:00:00.000000000 Z
11
+ date: 2019-04-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport