marc 1.1.0 → 1.1.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
  SHA256:
3
- metadata.gz: 8c9044ee8b0320c4a4145862195ae8d031e33bc5d6bc8e0e306b5db0ff9cc38f
4
- data.tar.gz: 854fffb717093c1aca08fbb7d3ca84153f22dc4131bd65d61a844d861a367c55
3
+ metadata.gz: 53c1e338a00e1dbd7c09ed14edc916edd1211abe0edbabcf757b8b00a5aa209c
4
+ data.tar.gz: 80b4c48c2fc95887216194d264583302bacae6c606616a087c888668ba2bfb68
5
5
  SHA512:
6
- metadata.gz: 8036b61f1558aa341b52686923e2532983196b441f2fbcba21068b51b1b092217480c1a5ae892aa090654c5a693bedcf733a6733a506c37e5c902d4e7854bc0d
7
- data.tar.gz: 2118c251d7a6683c38130ae5fc7dd2e02b993059e9d41f92bf8afdadf7e1be7ebd4c285e9bec2df9332427a2c07790a45cdfb305b76cb270d923b94f4dbc9439
6
+ metadata.gz: b6dd17fa76ff33ef0da68946d29ec2079c495423559c47391cabf80b59393f0d481ef6b1467b839465d3225c1a52aec2d4945994986e8e956eccfc2ea73ada5b
7
+ data.tar.gz: a745e41aa2cbe87c70f9a2cbfe0de0dd12f47c167f867127353d86ff771ada14327dbce1ec461fcb81cacb3cf3f60f821cdb4c0087213f37a0ef42dc7ade78e8
data/Changes CHANGED
@@ -1,3 +1,6 @@
1
+ v1.1.1 June 2021
2
+ - Fix a regression when normalizing indicator values when serializing marcxml
3
+
1
4
  v1.1.0 June 2021
2
5
  - Add support for additional valid subfield codes in marcxml
3
6
 
data/lib/marc/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module MARC
2
- VERSION = "1.1.0"
2
+ VERSION = "1.1.1"
3
3
  end
@@ -60,7 +60,8 @@ 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-Za-z!"#$%&\'()*+,-./:;<=>?{}_^`~\[\]\\\]{1}')
63
+ singleChar = Regexp.new('[\da-z ]{1}')
64
+ subfieldChar = Regexp.new('[\dA-Za-z!"#$%&\'()*+,-./:;<=>?{}_^`~\[\]\\\]{1}')
64
65
  ctrlFieldTag = Regexp.new('00[1-9A-Za-z]{1}')
65
66
 
66
67
  # Right now, this writer handles input from the strict and
@@ -122,7 +123,7 @@ module MARC
122
123
 
123
124
  # If marc is leniently parsed, we may have some dirty data; using
124
125
  # the blank subfield code should help us locate these later to fix
125
- if (subfield.code.match(singleChar) == nil)
126
+ if (subfield.code.match(subfieldChar) == nil)
126
127
  subfield.code = ' '
127
128
  end
128
129
 
data/test/tc_xml.rb CHANGED
@@ -140,11 +140,16 @@ class XMLTest < Test::Unit::TestCase
140
140
  record1 = MARC::Record.new
141
141
  record1.leader = '00925njm 22002777a 4500'
142
142
  record1.append MARC::ControlField.new('007', 'sdubumennmplu')
143
- record1.append MARC::DataField.new('245', '0', '4',
143
+ record1.append MARC::DataField.new('245', '0', '4',
144
144
  ['a', 'The Great Ray Charles'], ['h', '[sound recording].'])
145
+ record1.append MARC::DataField.new('998', ' ', ' ',
146
+ ['^', 'Valid local subfield'])
147
+
148
+ # MARC::XMLWriter mutates records
149
+ dup_record = MARC::Record.new_from_hash(record1.to_hash)
145
150
 
146
151
  writer = MARC::XMLWriter.new('test/test.xml', :stylesheet => 'style.xsl')
147
- writer.write(record1)
152
+ writer.write(dup_record)
148
153
  writer.close
149
154
 
150
155
  xml = File.read('test/test.xml')
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.1.0
4
+ version: 1.1.1
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: 2021-06-01 00:00:00.000000000 Z
16
+ date: 2021-06-07 00:00:00.000000000 Z
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency
19
19
  name: scrub_rb