nice_http 1.9.5 → 1.9.7

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: 806526768550e3cbc865065969da4a64f743440fdc049ec0a57ff9030e5cff6f
4
- data.tar.gz: 46f3bea1706bf4329c918e309f3e2d0ac806841c4fa84e8b151eebdbcff1306b
3
+ metadata.gz: 41cdb6573d61a197be54a860cf866552f7601ec2b51767d094cf9187d6cf2946
4
+ data.tar.gz: 90d6bbecf158d8c00ca4f73917eb4e4a35a1a00fedf80f31ccbd42fdcd030678
5
5
  SHA512:
6
- metadata.gz: 05fcd7af53f95a9285e7c9a8928e1d2e2ec568a6299209cfa7f34a9a864da01fa221427a9ac8fb89be7a250e0c95842ca3f343485029dc4974164fb034f819f5
7
- data.tar.gz: 5910f5b98a6fc60c2ff43f8e74d466375f41b7c44c116e4285da19bbe354f1fe5aed4ec7e314ffce6465bf2f12ffc5988f539d22c2ff2db6d101e43d3dd42b28
6
+ metadata.gz: e6377a24a67e092ca8f7dec56424097df3b17f4b9e75dc4f0ff33085e77fd93d5e312be0753d696aba08cf796e371eaa2f15d59554c19b628906b0f9cc4223ed
7
+ data.tar.gz: 3d7640eb70c81dc3a795816720b98a451c709ebd4ac28a6665c131c578e15e113d6e7e09762890795b2edf502f1a54c28b7b45fdf77f5c008d361f30627c0c1c
data/README.md CHANGED
@@ -3,6 +3,10 @@
3
3
  [![Gem Version](https://badge.fury.io/rb/nice_http.svg)](https://rubygems.org/gems/nice_http)
4
4
  [![Build Status](https://travis-ci.com/MarioRuiz/nice_http.svg?branch=master)](https://github.com/MarioRuiz/nice_http)
5
5
  [![Coverage Status](https://coveralls.io/repos/github/MarioRuiz/nice_http/badge.svg?branch=master)](https://coveralls.io/github/MarioRuiz/nice_http?branch=master)
6
+ ![Gem](https://img.shields.io/gem/dt/nice_http)
7
+ ![GitHub commit activity](https://img.shields.io/github/commit-activity/y/MarioRuiz/nice_http)
8
+ ![GitHub last commit](https://img.shields.io/github/last-commit/MarioRuiz/nice_http)
9
+ ![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/MarioRuiz/nice_http)
6
10
 
7
11
  NiceHttp the simplest library for accessing and testing HTTP and REST resources.
8
12
 
@@ -751,14 +755,14 @@ This will generate an items key that will contain an array of the values you add
751
755
  * Direct download:
752
756
 
753
757
  ```ruby
754
- resp = NiceHttp.new("https://euruko2019.org").get("/assets/images/logo.png", save_data: './tmp/')
758
+ resp = NiceHttp.new("https://github.com").get("/MarioRuiz/slack-smart-bot/blob/master/slack-smart-bot.png", save_data: './tmp/')
755
759
  ```
756
760
 
757
761
  * Get the data and store it like you want:
758
762
 
759
763
  ```ruby
760
- resp = NiceHttp.new("https://euruko2019.org").get("/assets/images/logo.png")
761
- File.open('./logo.png', 'wb') { |fp| fp.write(resp.data) }
764
+ resp = NiceHttp.new("https://github.com").get("/MarioRuiz/slack-smart-bot/blob/master/slack-smart-bot.png")
765
+ File.open('./slack-smart-bot.png', 'wb') { |fp| fp.write(resp.data) }
762
766
  ```
763
767
 
764
768
  ### Send multipart content
@@ -192,5 +192,6 @@ module NiceHttpManageResponse
192
192
  @logger.fatal "manage_response Error on method #{method_s} "
193
193
  end
194
194
  @start_time = nil
195
+ @response.body = @response.data
195
196
  end
196
197
  end
@@ -19,6 +19,9 @@ module NiceHttpUtils
19
19
  end
20
20
  elsif v.is_a?(Hash)
21
21
  data[k] = set_lambdas(v, data_orig[k])
22
+ unless data_orig.is_a?(Hash) and data_orig.key?(k)
23
+ data.delete(k) if data[k].empty?
24
+ end
22
25
  elsif v.is_a?(Array)
23
26
  v.each.with_index do |v2, i|
24
27
  if data_orig.key?(k) and data_orig[k].is_a?(Array) and data_orig[k].size > i
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nice_http
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.9.5
4
+ version: 1.9.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mario Ruiz
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-01-29 00:00:00.000000000 Z
11
+ date: 2023-03-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nice_hash
@@ -19,7 +19,7 @@ dependencies:
19
19
  version: '1.18'
20
20
  - - ">="
21
21
  - !ruby/object:Gem::Version
22
- version: 1.18.2
22
+ version: 1.18.4
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
@@ -29,7 +29,7 @@ dependencies:
29
29
  version: '1.18'
30
30
  - - ">="
31
31
  - !ruby/object:Gem::Version
32
- version: 1.18.2
32
+ version: 1.18.4
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: rspec
35
35
  requirement: !ruby/object:Gem::Requirement