traject 2.0.1 → 2.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES.md +20 -0
- data/lib/traject/macros/marc21_semantics.rb +1 -1
- data/lib/traject/solr_json_writer.rb +6 -2
- data/lib/traject/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f738d7b32e8ccc9ac89b1ed735a154790a36c656
|
4
|
+
data.tar.gz: 79d32ec442d5569b50ac4c8c2f25d588de335a79
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3042d06bc09ffc3421a334595a6393a047e0425f0b41221ab17b6881de7e96e07040f51ea1f3b4a18dd24580158eebaa341c6e640cc31263385f497584b33f75
|
7
|
+
data.tar.gz: 811378d18249d07db3c85dc31205e2d70a98b86b6edd57fb97789f3aaa98c7b6fd7b1045966674c06eced1c6cc87848ef1efc361994f383a5c05488046fc286a
|
data/CHANGES.md
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
# Changes
|
2
|
+
|
3
|
+
## 2.0.2
|
4
|
+
|
5
|
+
* Guard against assumption of MARC data when indexing using SolrJsonWriter ([#94](https://github.com/traject-project/traject/issues/94))
|
6
|
+
* For MARC Records, try to use the production date when available ([#93](https://github.com/traject-project/traject/issues/93))
|
7
|
+
|
8
|
+
## 2.0.1
|
9
|
+
|
10
|
+
* Fix bad constant in logging ([#91](https://github.com/traject-project/traject/issues/91))
|
11
|
+
|
12
|
+
## 2.0.0
|
13
|
+
|
14
|
+
* Compatible with MRI/RBX
|
15
|
+
* Default to SolrJsonWriter
|
16
|
+
* Release separate MRI/JRuby gems
|
17
|
+
|
18
|
+
## 1.0
|
19
|
+
|
20
|
+
* First release
|
@@ -343,7 +343,7 @@ module Traject::Macros
|
|
343
343
|
# the FIRST date then, the earliest. That's just what we're doing.
|
344
344
|
if found_date.nil? && date_type != 'n' && date_type != 'q'
|
345
345
|
# in date_type 'r', second date is original publication date, use that I think?
|
346
|
-
date_str = (date_type == 'r' && date2_str.to_i != 0) ? date2_str : date1_str
|
346
|
+
date_str = ((date_type == 'r' || date_type == 'p') && date2_str.to_i != 0) ? date2_str : date1_str
|
347
347
|
# Deal with stupid 'u's, which end up meaning a range too,
|
348
348
|
# find midpoint and make sure our tolerance is okay.
|
349
349
|
ucount = 0
|
@@ -167,9 +167,13 @@ class Traject::SolrJsonWriter
|
|
167
167
|
end
|
168
168
|
|
169
169
|
# Returns MARC 001, then a slash, then output_hash["id"] -- if both
|
170
|
-
# are present. Otherwise may return just one, or even an empty string.
|
170
|
+
# are present. Otherwise may return just one, or even an empty string.
|
171
171
|
def record_id_from_context(context)
|
172
|
-
marc_id =
|
172
|
+
marc_id = if context.source_record &&
|
173
|
+
context.source_record.kind_of?(MARC::Record) &&
|
174
|
+
context.source_record['001']
|
175
|
+
context.source_record['001'].value
|
176
|
+
end
|
173
177
|
output_id = context.output_hash["id"]
|
174
178
|
|
175
179
|
return [marc_id, output_id].compact.join("/")
|
data/lib/traject/version.rb
CHANGED
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.0.
|
4
|
+
version: 2.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jonathan Rochkind
|
@@ -187,6 +187,7 @@ files:
|
|
187
187
|
- ".gitignore"
|
188
188
|
- ".travis.yml"
|
189
189
|
- ".yardopts"
|
190
|
+
- CHANGES.md
|
190
191
|
- Gemfile
|
191
192
|
- LICENSE.txt
|
192
193
|
- README.md
|