iostreams 1.3.1 → 1.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/io_streams/tabular/header.rb +10 -11
- data/lib/io_streams/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: 5b743c145f120e461d09eed5b9c7476bacbdaa18453200e1ccc57ec9eef2239c
|
4
|
+
data.tar.gz: 7c54a49f344e454ef64a1e19e47f2c665b46e675eda34c03e1604668a6543de4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 27d4a3875009d1902285a9e01b67032e74e1eac6d295de3400096b01c663de8b14cb594e4ffd8f04154d23cf7cfd4a696dbc33b9651fd200808ff087c00c0dc2
|
7
|
+
data.tar.gz: 92656ad55f37e5ffb3b4588cc93d6d9c988ce31705f888d4e045d86ffcf5047f4185a8de30bc6c262a48ae7f048433edd00f827d155939db7caa858e5e495bf0
|
@@ -129,18 +129,17 @@ module IOStreams
|
|
129
129
|
# Perform cleansing on returned Hash keys during the narrowing process.
|
130
130
|
# For example, avoids issues with case etc.
|
131
131
|
def cleanse_hash(hash)
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
132
|
+
unmatched = columns - hash.keys
|
133
|
+
unless unmatched.empty?
|
134
|
+
hash = hash.dup
|
135
|
+
unmatched.each { |name| hash[cleanse_column(name)] = hash.delete(name) }
|
136
|
+
end
|
137
|
+
# Hash#slice as of Ruby 2.5
|
138
|
+
if hash.respond_to?(:slice)
|
139
|
+
hash.slice(*columns)
|
140
|
+
else
|
141
|
+
columns.each_with_object({}) { |column, new_hash| new_hash[column] = hash[column] }
|
142
142
|
end
|
143
|
-
h
|
144
143
|
end
|
145
144
|
|
146
145
|
def cleanse_column(name)
|
data/lib/io_streams/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: iostreams
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Reid Morrison
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-08-31 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description:
|
14
14
|
email:
|
@@ -130,7 +130,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
130
130
|
- !ruby/object:Gem::Version
|
131
131
|
version: '0'
|
132
132
|
requirements: []
|
133
|
-
rubygems_version: 3.
|
133
|
+
rubygems_version: 3.1.2
|
134
134
|
signing_key:
|
135
135
|
specification_version: 4
|
136
136
|
summary: Input and Output streaming for Ruby.
|