api_client_base 1.4.0 → 1.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/api_client_base.rb +1 -0
- data/lib/api_client_base/request.rb +11 -2
- data/lib/api_client_base/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 16b20a668021e8155ac1a9f45863a2bf24c8671d529d6050d4c7d351d4a67475
|
4
|
+
data.tar.gz: 295d032174dbbf604bc1f7fa39ad81e53fd6fb0466a48325f96e2c4a728726d3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 715769a66ce42746dff5ed6b09e4fd9c20e7476e2dbc76d0780f3d542a4d6ddc4ec7ab06d2a325de5da9f4888db10efc1e45ed06857cd7eb0d55c57387758fe4
|
7
|
+
data.tar.gz: 8091fb4977f8b329a9f55865913351e51ba1fd1be20f8f018d76fe7fc6fd91b1b86540f9f76f6cb6c21a952d66027fedef2bbea63a6bb59cd68e717a586c0e91
|
data/CHANGELOG.md
CHANGED
@@ -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.4.1] - 2019-01-30
|
8
|
+
### Fixed
|
9
|
+
- `host` configuration should not remove the path
|
10
|
+
|
7
11
|
## [1.4.0] - 2018-09-04
|
8
12
|
### Added
|
9
13
|
- Support `host` configurations that already have a path
|
data/lib/api_client_base.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
require "active_support/concern"
|
2
2
|
require "active_support/core_ext/class/attribute"
|
3
3
|
require "active_support/core_ext/module/attribute_accessors"
|
4
|
+
require "active_support/core_ext/object/blank"
|
4
5
|
require "active_support/inflector"
|
5
6
|
require "gem_config"
|
6
7
|
require "virtus"
|
@@ -59,8 +59,17 @@ module APIClientBase
|
|
59
59
|
end
|
60
60
|
|
61
61
|
def default_uri
|
62
|
-
uri = if
|
63
|
-
URI.
|
62
|
+
uri = if api_client_base_path.present?
|
63
|
+
path = URI.parse(host).path
|
64
|
+
if path.present?
|
65
|
+
URI.join(
|
66
|
+
host,
|
67
|
+
[path, "/"].join,
|
68
|
+
api_client_base_path[1..-1]
|
69
|
+
)
|
70
|
+
else
|
71
|
+
URI.join(host, api_client_base_path)
|
72
|
+
end
|
64
73
|
else
|
65
74
|
URI(host)
|
66
75
|
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.
|
4
|
+
version: 1.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ramon Tayag
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-01-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -200,7 +200,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
200
200
|
version: '0'
|
201
201
|
requirements: []
|
202
202
|
rubyforge_project:
|
203
|
-
rubygems_version: 2.7.
|
203
|
+
rubygems_version: 2.7.8
|
204
204
|
signing_key:
|
205
205
|
specification_version: 4
|
206
206
|
summary: Abstractions to help author API wrappers in Ruby.
|