eezee 1.0.8 → 1.0.9

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: d15fad54814782889522712e0b2fce58d831d0a3781ce63959aebd149cbda6e9
4
- data.tar.gz: d708469dd5d96a66433391f79f7f0908aa36c251cafa02b6a490ae81888790e7
3
+ metadata.gz: c933960551337d50661fc40b0c38a7dfbec76ee7a63be6141c4c7a20a527ae3e
4
+ data.tar.gz: a58390723f56e3a9b5d8ea38e38621b572db40f80eb3d1d01a0ff4356d238944
5
5
  SHA512:
6
- metadata.gz: 6e08b1abe503f6ea1bd7321682bde827061334f221dd77285c3a66496da59c6eaecf8c92408ffe73b04887ebcce0421cc4386c7ad4c67656802108ccccd2856f
7
- data.tar.gz: 1735d4f1dcfdc4955ba6a1b664b6141b806b0e0e37ee7da6ec404ef6f1fae2d68f0f318e4c81b611b9a43f2cfd43aa62dcfe58fe00400fefd7a6c104d54767c8
6
+ metadata.gz: 48863b10f2ccef3606f5185893f724d32c9447bec01c2e93a979c98fc5fa57541356d87d15fda2542c1abad87b4c6c17512e9e6ca1b6a47d3e7e3b4d879bc181
7
+ data.tar.gz: c909bfdfcb9962e960871558ee18c0e8c633b3c8e034f07cfe2c70b385b599fb1715e56c037c280158aaeb3ae4c85a65de06ef98f1724efa8e86f29b958efc0e
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # [Eezee][gem_page]
2
2
 
3
- *Eezee or ee-zee sounds like "Easy"*
3
+ *Eezee sounds like "Easy"*
4
4
 
5
5
  [![Gem Version][gem_version_image]][gem_version_page]
6
6
  [![Build Status][travis_status_image]][travis_page]
@@ -70,11 +70,11 @@ Eezee supports these HTTP methods:
70
70
 
71
71
  And here are the corresponding Eezee's HTTP methods:
72
72
 
73
- - get(request_options)
74
- - post(request_options)
75
- - patch(request_options)
76
- - put(request_options)
77
- - delete(request_options)
73
+ - `get(request_options)`
74
+ - `post(request_options)`
75
+ - `patch(request_options)`
76
+ - `put(request_options)`
77
+ - `delete(request_options)`
78
78
 
79
79
  OBS: The param `request_options` is optional.
80
80
 
@@ -283,7 +283,9 @@ Here are some examples:
283
283
 
284
284
  #### Complete integrations
285
285
 
286
- Coming soon...
286
+ - [Integrating with JsonPlaceHolder API and Go Rest API - With Service and Request options](https://gist.github.com/linqueta/b1c44cd3cca5e321893fdf3fa866c750)
287
+ - [Integrating with JsonPlaceHolder API and Go Rest API - With Request options](https://gist.github.com/linqueta/7c9bf0988d2141c2f92aebe1b6613be5)
288
+ - [Integrating with JsonPlaceHolder API and Go Rest API - Without Services and Request Options](https://gist.github.com/linqueta/a1ebe9bb598d2a66556019502e1eb433)
287
289
 
288
290
  #### Hooks
289
291
 
@@ -299,7 +301,7 @@ Coming soon...
299
301
 
300
302
  ## Why use Eezee instead Faraday
301
303
 
302
- So, it's an important part of this README. This gem uses [Faraday](#https://github.com/lostisland/faraday) as the HTTP client and Faraday is an excellent HTTP client, but it brings many difficult, or, in other words, many things could be easier, like:
304
+ So, it's an important part of this README. This gem uses [Faraday](https://github.com/lostisland/faraday) as the HTTP client and Faraday is an excellent HTTP client, but it brings many difficult, or, in other words, many things could be easier, like:
303
305
 
304
306
  - If you work with microservices, you'll create a Faraday Connection setting per ms, or, it's so common to see many Faraday Connection setting in the same project.
305
307
  - To raise errors with Faraday you know to set an adapter (it could be easier)
data/lib/eezee/request.rb CHANGED
@@ -82,6 +82,7 @@ module Eezee
82
82
  @params.filter { |k, _v| @uri.include?(":#{k}") }
83
83
  .each { |k, v| @uri.gsub!(":#{k}", v.to_s) }
84
84
  .then { @uri.gsub!(/:[a-z_-]+/, '') }
85
+ .then { @uri.gsub!(%r{/$}, '') }
85
86
  end
86
87
 
87
88
  def handle_query_params!
@@ -43,6 +43,8 @@ module Eezee
43
43
 
44
44
  def parsed_body
45
45
  JSON.parse(handled_faraday_response, symbolize_names: true)
46
+ rescue StandardError
47
+ { response: faraday_response }
46
48
  end
47
49
 
48
50
  def success_response?
data/lib/eezee/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Eezee
4
- VERSION = '1.0.8'
4
+ VERSION = '1.0.9'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eezee
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.8
4
+ version: 1.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - linqueta
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-12-22 00:00:00.000000000 Z
11
+ date: 2019-12-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday