traject 2.2.0-java → 2.2.1-java

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: 31b0c8daf3b5365e6f76172e9af9d8ec7fd842fe
4
- data.tar.gz: 9286f5626eb34bd4df3e89aa1197fc3b1810e601
3
+ metadata.gz: a6776cbd1aa5431c84bdfc7e9e345ad9a30ed9f3
4
+ data.tar.gz: 98779e82de6bb171dd1f75ff0b206397401f078e
5
5
  SHA512:
6
- metadata.gz: 0495e94238704ab066c86c40e1ef65c86d4229178795031a59dfaf42ceb5efa01e00943b0447291a666d504b42f3cca62d56735240a56004541fa24b8efc138a
7
- data.tar.gz: e002525a16a48c0897548f526df1c63bccdf5d23d888cd799afb2518b52a73b3832ba0f5e8a8748f8649ef45b43c6efe85b0f48fa883d9540480f15dd6d19423
6
+ metadata.gz: a3633976a3b8000b75405f3696128e523e850c3addccd9e701d853cb7a953184fefd060cf21c078200e8e10eda020f4175523339057e0debce30767b361a41f1
7
+ data.tar.gz: e1a6cc2536573984ff354e78c15beab14895cd02a49c427f73b857a8e3faaba0c813448a789b3c22c8d7b7f186d8c2cc7eb6f9c49af46d20289ca94d11b515a2
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: java
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
  requirement: !ruby/object:Gem::Requirement