marc_bot 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +5 -0
- data/lib/marc_bot/field_builder.rb +10 -1
- data/lib/marc_bot/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bac02957565b4ae2d2ab30d5971f8f858b93e12c66a7365b08699c2f7b8e2d1b
|
4
|
+
data.tar.gz: b3c38edea0618bd98ac160ea085ba88b0f5c3597ecc4e5c2d49b72fd189f34ee
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 82786dc19e99f483eac6ddf0337202dec6e2abf8560e485a82bf5e1a928de6cad1a884af7430a27f41dbb07fdabdef457aabb0a744adbc4db82294a059032fd0
|
7
|
+
data.tar.gz: 7570e5397d29e76d6ad76122f0ba10ee8a51a04e1d9ff7a16c4d08d3fb3cfdaeca21275812c7f54ccf55f20b19d21cc74ed424608e4a3e0b022afaa74c4ee613
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -40,8 +40,17 @@ module MarcBot
|
|
40
40
|
def subfield_array
|
41
41
|
input
|
42
42
|
.reject { |key, _value| SKIP_KEYS.include?(key) }
|
43
|
+
.map { |key, value| build_subfield_array(key, value) }
|
44
|
+
.flatten
|
45
|
+
.each_slice(2)
|
43
46
|
.to_a
|
44
|
-
|
47
|
+
end
|
48
|
+
|
49
|
+
def build_subfield_array(key, value)
|
50
|
+
key = key.to_s
|
51
|
+
return [key, value] unless value.is_a?(Array)
|
52
|
+
|
53
|
+
value.map { |v| [key, v] }
|
45
54
|
end
|
46
55
|
|
47
56
|
def tag
|
data/lib/marc_bot/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: marc_bot
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adam Wead
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-09-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: marc
|