traject 2.2.0 → 2.2.1

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
  SHA1:
3
- metadata.gz: 9898a1e58a98a8175b8c8b008c037b69f0875b5b
4
- data.tar.gz: f7fe50884601d34e7e8df3dc3dfbfb1e16529cb4
3
+ metadata.gz: 882c229ca8974a122f164d416f7c66a44747e52a
4
+ data.tar.gz: b2ca749fafbf344868460cf7ce9269c0ece6ff5c
5
5
  SHA512:
6
- metadata.gz: cbc9ff66ee264e0224037a8e6715d0f301ab76225e1c19901120d1f3f8936e81e658d18920d19b6b6ab3c0f77b5ef69bbb12302d8ba33e77f95d8dcc9a469886
7
- data.tar.gz: e64c2df8155184ee7a51d01e24f7232bce2e99c8727de638d552d9a5e16381dd34e7b64ef663f16fbd2c54dd87f723f7bc2d50150600aab738c86f98e2d0fead
6
+ metadata.gz: 40158190f8f9037e6b2f62c64de41ac16472d6f9c11280246d3a7ffdd97aa9fcf63e9a00cd2e91a727564401c56c95e64e6f82c2a6039003b97607979a8c912b
7
+ data.tar.gz: ada10854465ffdadfb24c0f2aab0d68b73248b05a81a262c4a018de343c32347894c8c408b1c32365c7665d7cfe6b388307c1383f9627cca40db0e7bab925ac2
data/CHANGES.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # Changes
2
2
 
3
+ ## 2.2.1
4
+ * Had inadverntantly broken use of arrays as extract_marc specifications. Fixed.
5
+
3
6
  ## 2.2.0
4
7
  * Change DebugWriter to be more forgiving (and informative) about missing record-id fields
5
8
  * Automatically require DebugWriter for easier use on the command line
@@ -17,7 +17,7 @@ module Traject
17
17
  def self.new(seedset = {})
18
18
 
19
19
  case seedset
20
- when String
20
+ when String, Array
21
21
  s = allocate
22
22
  s.hash = Spec.hash_from_string(seedset)
23
23
  s
@@ -1,3 +1,3 @@
1
1
  module Traject
2
- VERSION = "2.2.0"
2
+ VERSION = "2.2.1"
3
3
  end
@@ -28,6 +28,11 @@ describe "Traject::MarcExtractor" do
28
28
 
29
29
  assert_kind_of Array, spec.subfields
30
30
  end
31
+
32
+ it "parses specset from an array" do
33
+ parsed = Traject::MarcExtractor::SpecSet.new(%w[245abcde 810 700|*4|bcd])
34
+ assert_equal parsed.tags, %w[245 810 700]
35
+ end
31
36
 
32
37
  it "parses a mixed bag" do
33
38
  parsed = Traject::MarcExtractor::Spec.hash_from_string("245abcde:810:700|*4|bcd")
@@ -55,6 +60,17 @@ describe "Traject::MarcExtractor" do
55
60
  assert_equal "4", spec700.indicator2
56
61
  assert_equal %w{b c d}, spec700.subfields
57
62
  end
63
+
64
+ it "parses from an array" do
65
+ parsed = Traject::MarcExtractor::Spec.hash_from_string(%w[245abcde 810 700|*4|bcd])
66
+ spec245 = parsed['245'].first
67
+ spec810 = parsed['810'].first
68
+ spec700 = parsed['700'].first
69
+
70
+ assert_length 3, parsed
71
+ end
72
+
73
+
58
74
 
59
75
  it "parses fixed field byte offsets" do
60
76
  parsed = Traject::MarcExtractor::Spec.hash_from_string("005[5]:008[7-10]")
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: traject
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.0
4
+ version: 2.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonathan Rochkind
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-01-13 00:00:00.000000000 Z
12
+ date: 2016-02-04 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: concurrent-ruby