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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 474c3ee37225584b3e5f189ff5f49507b82741da82aef0dd68a7e39180d25874
4
- data.tar.gz: f0d272c5171827dcfa327ae8d079ee0ada52ba8da5b981378f7c2352d16a7a0e
3
+ metadata.gz: 8c9044ee8b0320c4a4145862195ae8d031e33bc5d6bc8e0e306b5db0ff9cc38f
4
+ data.tar.gz: 854fffb717093c1aca08fbb7d3ca84153f22dc4131bd65d61a844d861a367c55
5
5
  SHA512:
6
- metadata.gz: 04361e464361334b874b737e292e58acae879c3d086a68d5292abb5b8ccd9c28370173c3a60ca6d5700ef8dbd941b607a888ef9c7c700623d4440f577423217d
7
- data.tar.gz: 22162879382120991f8a76484c2de73ac5f2aa8daf163bb1de0977723102876e0c2f2a81b9e04d2f4c5beda189e4828edc4673c37bf8f02e3a4a1235a2abaf16
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
  [![Gem Version](https://badge.fury.io/rb/marc.png)](http://badge.fury.io/rb/marc)
2
- [![Build Status](https://secure.travis-ci.org/ruby-marc/ruby-marc.png)](http://travis-ci.org/ruby-marc/ruby-marc)
2
+ ![Build Status](https://github.com/ruby-marc/ruby-marc/workflows/CI/badge.svg) |
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](http://dilettantes.code4lib.org/blog/2010/09/a-proposal-to-serialize-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
- str = str.encode(params[:internal_encoding], params)
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
@@ -1,3 +1,3 @@
1
1
  module MARC
2
- VERSION = "1.0.4"
2
+ VERSION = "1.1.0"
3
3
  end
@@ -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('[\da-z ]{1}')
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
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: 2019-06-28 00:00:00.000000000 Z
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: []