marc 1.0.4 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Changes +3 -1
- data/README.md +2 -2
- data/lib/marc/reader.rb +5 -1
- data/lib/marc/version.rb +1 -1
- data/lib/marc/xmlwriter.rb +1 -1
- metadata +16 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8c9044ee8b0320c4a4145862195ae8d031e33bc5d6bc8e0e306b5db0ff9cc38f
|
|
4
|
+
data.tar.gz: 854fffb717093c1aca08fbb7d3ca84153f22dc4131bd65d61a844d861a367c55
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8036b61f1558aa341b52686923e2532983196b441f2fbcba21068b51b1b092217480c1a5ae892aa090654c5a693bedcf733a6733a506c37e5c902d4e7854bc0d
|
|
7
|
+
data.tar.gz: 2118c251d7a6683c38130ae5fc7dd2e02b993059e9d41f92bf8afdadf7e1be7ebd4c285e9bec2df9332427a2c07790a45cdfb305b76cb270d923b94f4dbc9439
|
data/Changes
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
v1.1.0 June 2021
|
|
2
|
+
- Add support for additional valid subfield codes in marcxml
|
|
3
|
+
|
|
1
4
|
v1.0.2 July 2017
|
|
2
5
|
- Now (correctly) throw an error if datafield string is the empty string
|
|
3
6
|
(thanks to @bibliotechy)
|
|
@@ -147,4 +150,3 @@ v0.0.2 Mon Oct 17 17:42:57 CDT 2005
|
|
|
147
150
|
|
|
148
151
|
v0.0.1 Mon Oct 10 10:29:20 CDT 2005
|
|
149
152
|
- initial release
|
|
150
|
-
|
data/README.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
[](http://badge.fury.io/rb/marc)
|
|
2
|
-
|
|
2
|
+
 |
|
|
3
3
|
|
|
4
4
|
marc is a ruby library for reading and writing MAchine Readable Cataloging
|
|
5
5
|
(MARC). More information about MARC can be found at <http://www.loc.gov/marc>.
|
|
@@ -34,7 +34,7 @@ marc is a ruby library for reading and writing MAchine Readable Cataloging
|
|
|
34
34
|
|
|
35
35
|
MARC::Record provides `#to_hash` and `#from_hash` implementations that deal in ruby
|
|
36
36
|
hash's that are compatible with the
|
|
37
|
-
[marc-in-json](
|
|
37
|
+
[marc-in-json](https://rossfsinger.com/blog/2010/09/a-proposal-to-serialize-marc-in-json/)
|
|
38
38
|
serialization format. You are responsible for serializing the hash to/from JSON yourself.
|
|
39
39
|
|
|
40
40
|
## Installation
|
data/lib/marc/reader.rb
CHANGED
|
@@ -443,7 +443,11 @@ module MARC
|
|
|
443
443
|
# get an exception from inside ruby-marc, and it may change
|
|
444
444
|
# in future implementations.
|
|
445
445
|
if params[:internal_encoding]
|
|
446
|
-
|
|
446
|
+
if RUBY_VERSION >= '3.0'
|
|
447
|
+
str = str.encode(params[:internal_encoding], **params)
|
|
448
|
+
else
|
|
449
|
+
str = str.encode(params[:internal_encoding], params)
|
|
450
|
+
end
|
|
447
451
|
elsif (params[:invalid] || params[:replace] || (params[:validate_encoding] == true))
|
|
448
452
|
|
|
449
453
|
if params[:validate_encoding] == true && ! str.valid_encoding?
|
data/lib/marc/version.rb
CHANGED
data/lib/marc/xmlwriter.rb
CHANGED
|
@@ -60,7 +60,7 @@ module MARC
|
|
|
60
60
|
# and returns a REXML::Document for the XML serialization.
|
|
61
61
|
|
|
62
62
|
def self.encode(record, opts={})
|
|
63
|
-
singleChar = Regexp.new('[\
|
|
63
|
+
singleChar = Regexp.new('[\dA-Za-z!"#$%&\'()*+,-./:;<=>?{}_^`~\[\]\\\]{1}')
|
|
64
64
|
ctrlFieldTag = Regexp.new('00[1-9A-Za-z]{1}')
|
|
65
65
|
|
|
66
66
|
# Right now, this writer handles input from the strict and
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: marc
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0
|
|
4
|
+
version: 1.1.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Kevin Clarke
|
|
@@ -13,7 +13,7 @@ authors:
|
|
|
13
13
|
autorequire: marc
|
|
14
14
|
bindir: bin
|
|
15
15
|
cert_chain: []
|
|
16
|
-
date:
|
|
16
|
+
date: 2021-06-01 00:00:00.000000000 Z
|
|
17
17
|
dependencies:
|
|
18
18
|
- !ruby/object:Gem::Dependency
|
|
19
19
|
name: scrub_rb
|
|
@@ -49,6 +49,20 @@ dependencies:
|
|
|
49
49
|
- - ">="
|
|
50
50
|
- !ruby/object:Gem::Version
|
|
51
51
|
version: '0'
|
|
52
|
+
- !ruby/object:Gem::Dependency
|
|
53
|
+
name: rexml
|
|
54
|
+
requirement: !ruby/object:Gem::Requirement
|
|
55
|
+
requirements:
|
|
56
|
+
- - ">="
|
|
57
|
+
- !ruby/object:Gem::Version
|
|
58
|
+
version: '0'
|
|
59
|
+
type: :runtime
|
|
60
|
+
prerelease: false
|
|
61
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
62
|
+
requirements:
|
|
63
|
+
- - ">="
|
|
64
|
+
- !ruby/object:Gem::Version
|
|
65
|
+
version: '0'
|
|
52
66
|
description:
|
|
53
67
|
email: ehs@pobox.com
|
|
54
68
|
executables: []
|