nice_http 1.9.6 → 1.9.8

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: ce4cd39e55a49ccb27dd1d8fb39e6eef8ce0b0b22e5f9c40c8e176b6ab72ab22
4
- data.tar.gz: 6ff7b6521a902ebb23013d87a9c89267fb487fea816e6776da6365ea3408c50a
3
+ metadata.gz: e56d1f6e75e63e5fd77e1d17c8627a77774535b502b733abece896f6c29b655e
4
+ data.tar.gz: 79109fc2b1b42f154294130e245c93d7c670ce11a96993e3a5674a06670d4569
5
5
  SHA512:
6
- metadata.gz: a7ca0da07cd6c0ddf6806a41c6348829dd7e3956f2bf2240f467f318138824e91e80feb3f686d7ea330295a6b3fea160157606ade7e02b6d8530369e845fbe0a
7
- data.tar.gz: 2d80c98e41f9f7369064d197a1df8fbc7f8fbde942cd053cdc2b1c4b523d9588c6064d3562de75844a6758cbe30fca3fe22e5dd9151275257f8264a5ca9fd415
6
+ metadata.gz: 4498833215e1541e72bff84657796a46573cbee713d3d84268bdd6505199dd347f115a750a05e192004e8eedb0164782ca2a933bfbb9d0a01b0bc17e649b7088
7
+ data.tar.gz: c4f5f63ce27bc8233c727c386d3c2fc346a3f83a94b4a618e05af0527f9554dcaef1475eb9e619e899011e797bd63266538ef830b2a509328bc45525a4bd3e21
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
 
@@ -13,12 +13,19 @@ module NiceHttpUtils
13
13
  if v.is_a?(Proc)
14
14
  data_kv = v.call
15
15
  if data_kv.nil?
16
- data.delete(k) unless data_orig.is_a?(Hash) and data_orig.key?(k)
16
+ if data_orig.is_a?(Hash) and data_orig.key?(k)
17
+ data[k] = data_orig[k]
18
+ else
19
+ data.delete(k)
20
+ end
17
21
  else
18
22
  data[k] = data_kv
19
23
  end
20
24
  elsif v.is_a?(Hash)
21
25
  data[k] = set_lambdas(v, data_orig[k])
26
+ unless data_orig.is_a?(Hash) and data_orig.key?(k)
27
+ data.delete(k) if data[k].empty?
28
+ end
22
29
  elsif v.is_a?(Array)
23
30
  v.each.with_index do |v2, i|
24
31
  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.6
4
+ version: 1.9.8
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-03-21 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