iteraptor 0.8.0 → 0.8.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/iteraptor/version.rb +1 -1
- data/lib/iteraptor.rb +10 -6
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6233b7b0b6e3df8f2a9d839325ce0bb0b98c71db
|
4
|
+
data.tar.gz: b4253266ab34631d9f16a4f699cc75e418d683db
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6727ba65fc3958b1aaa207146cdf1ce882cc5cd456ca42b1266e1b141c6c3a392d7758e1d240f9436d061c5f76af261003fb7da231ee445f32e648f5804159db
|
7
|
+
data.tar.gz: aad08a5fb9bf7dc75d8dea35164a5c236d9061c4890d1d7204ac5c6a0d6c6686ebea8646598f0a2f6d5cd8485232ea5706eab00ee6a4c562d42334f1853e0d98
|
data/lib/iteraptor/version.rb
CHANGED
data/lib/iteraptor.rb
CHANGED
@@ -33,12 +33,16 @@ module Iteraptor
|
|
33
33
|
end
|
34
34
|
|
35
35
|
def compactar **params
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
36
|
+
(is_a?(Array) ? compact : self).
|
37
|
+
mapa(yield_all: true) do |p, (k, v)|
|
38
|
+
v.is_a?(Array) ? [k, v.compact] : [k, v]
|
39
|
+
end.mapa(**params) do |parent, (k, v)|
|
40
|
+
p = parent.split(H.iteraptor_delimiter(params)).last
|
41
|
+
puts [p, parent, k, v].inspect
|
42
|
+
(p.to_i.to_s != p && v.nil?) ? nil : [k, v]
|
43
|
+
end.tap do |this|
|
44
|
+
break {} if this.empty? && is_a?(Hash)
|
45
|
+
end
|
42
46
|
end
|
43
47
|
|
44
48
|
# rubocop:disable Style/Alias
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: iteraptor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Aleksei Matiushkin
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-08-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|