marc 1.2.0 → 1.3.0

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: 78a543b07dbaa8d6aeff40421038d6d24649bc1769db2f286017e9205428c086
4
- data.tar.gz: ed2b006b3f4c32ec718ede1a5d56435311970144a8208821733c6089e82bfea7
3
+ metadata.gz: faaea90f6a961fd419d41cd3fc789a7967ddd41866b82cb2075be3a139e73e58
4
+ data.tar.gz: dacb3e74659b39f4774205231c07a09802af24bf15726cd8eecee1c424199a56
5
5
  SHA512:
6
- metadata.gz: 6a53a6fafee92dad72b644668a5b1adabcd0cdb1af6b2ed87d7f8c97d5e56415bcf1e990f113cb5f459807e792e2ac5846948e116534dbfdfd31061c1a44f905
7
- data.tar.gz: 4b36af95c908ac282efe7f05f1205b66f8c6c6f62c9f750843012512360c5695af15c5bb23759ccad2703d6c0304540915c45ae3259068fe8a7cb1497f1237f6
6
+ metadata.gz: c5860c18fac9062dc15cea515e925a31e652bb599ddb5ef96281ac1840860b607a0d5c2bc66e514ab7d0ea17d1f08219253f54eeff128a9d6251a73627a4a3ce
7
+ data.tar.gz: 3936a4dc7fd88038e9794cec0427e0f0ee1264639f700d7ae8cf37c9710bc7ff4bba0c7679c8c301034ca3ea98c36e6c5df81c77caff8b6dfe2a9cdf6928dcaf
@@ -11,9 +11,9 @@ jobs:
11
11
  runs-on: ubuntu-latest
12
12
  strategy:
13
13
  matrix:
14
- ruby: [2.5, 2.6, 2.7, 3.0, jruby]
14
+ ruby: [2.7, 3.0, 3.1, 3.2, 3.3, 3.4, jruby, truffleruby, "truffleruby+graalvm"]
15
15
  steps:
16
- - uses: actions/checkout@v2
16
+ - uses: actions/checkout@v4
17
17
  - name: Set up Ruby
18
18
  uses: ruby/setup-ruby@v1
19
19
  with:
data/CHANGELOG.md CHANGED
@@ -2,6 +2,20 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
+ ## [1.3] - 2025-01-0-9
6
+
7
+ ### Breaking Change
8
+
9
+ **ruby >= 2.2 is now required**. Removed no-longer-necessary `unf` gem in
10
+ favor of built-in string methods for dealing with encodings.
11
+
12
+ ### Non-user-facing changes
13
+
14
+ - Pulled everything into the gemspec instead of having some stuff
15
+ hanging out in the Gemfile
16
+ - Changed tested rubies to only include 2.7, 3.[0,1,2,3,4], latest
17
+ jruby, and latest truffleruby (with and without graalvm)
18
+
5
19
  ## [1.2] - 2022-08-02
6
20
 
7
21
  ### Added
data/Gemfile CHANGED
@@ -1,15 +1,5 @@
1
1
  source "https://rubygems.org"
2
2
 
3
- group :test do
4
- if RUBY_VERSION != "1.8.7"
5
- gem "nokogiri"
6
- end
7
- gem "rake"
8
- gem "rdoc"
9
- gem "xml-simple"
10
- gem "test-unit"
11
- gem "warning"
12
- end
13
3
 
14
4
  # Specify your gem's dependencies in ..gemspec
15
5
  gemspec
@@ -1,6 +1,5 @@
1
1
  require "marc"
2
2
  require "marc/marc8/map_to_unicode"
3
- require "unf/normalizer"
4
3
 
5
4
  module MARC
6
5
  module Marc8
@@ -170,7 +169,7 @@ module MARC
170
169
  end
171
170
 
172
171
  if normalization
173
- uni_str = UNF::Normalizer.normalize(uni_str, normalization)
172
+ uni_str = uni_str.unicode_normalize(normalization)
174
173
  end
175
174
 
176
175
  uni_str
data/lib/marc/reader.rb CHANGED
@@ -1,5 +1,3 @@
1
- require "scrub_rb"
2
-
3
1
  # Note: requiring 'marc/marc8/to_unicode' below, in #initialize,
4
2
  # only when necessary
5
3
 
data/lib/marc/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module MARC
2
- VERSION = "1.2.0"
2
+ VERSION = "1.3.0"
3
3
  end
data/marc.gemspec CHANGED
@@ -8,7 +8,7 @@ Gem::Specification.new do |s|
8
8
  s.homepage = "https://github.com/ruby-marc/ruby-marc/"
9
9
  s.summary = "A ruby library for working with Machine Readable Cataloging"
10
10
  s.license = "MIT"
11
- s.required_ruby_version = ">= 1.8.6"
11
+ s.required_ruby_version = ">= 2.2.0"
12
12
  s.authors = ["Kevin Clarke", "Bill Dueber", "William Groppe", "Jonathan Rochkind", "Ross Singer", "Ed Summers", "Chris Beer"]
13
13
 
14
14
  s.files = `git ls-files -z`.split("\x0")
@@ -16,8 +16,13 @@ Gem::Specification.new do |s|
16
16
  s.test_files = s.files.grep(%r{^(test|spec|features)/})
17
17
  s.require_paths = ["lib"]
18
18
 
19
+ s.add_dependency "nokogiri", "~>1.0"
20
+
21
+ s.add_development_dependency "rake", "~>13.0"
22
+ s.add_development_dependency "test-unit", "~>3.0"
19
23
  s.add_development_dependency "standard", "~>1.0"
20
- s.add_dependency "scrub_rb", ">= 1.0.1", "< 2" # backport for ruby 2.1 String#scrub
21
- s.add_dependency "unf" # unicode normalization
24
+ s.add_development_dependency "warning", "~>1.5"
25
+ s.add_development_dependency "xml-simple"
26
+
22
27
  s.add_dependency "rexml" # rexml was unbundled from the stdlib in ruby 3
23
28
  end
@@ -3,8 +3,6 @@ require "marc"
3
3
 
4
4
  require "marc/marc8/to_unicode"
5
5
 
6
- require "unf"
7
-
8
6
  if "".respond_to?(:encoding)
9
7
 
10
8
  class TestMarc8ToUnicode < Test::Unit::TestCase
@@ -22,7 +20,7 @@ if "".respond_to?(:encoding)
22
20
  value = MARC::Marc8::ToUnicode.new.transcode("Conversa\xF0c\xE4ao")
23
21
  assert_equal "UTF-8", value.encoding.name
24
22
 
25
- expected = UNF::Normalizer.normalize("Conversação", :nfc)
23
+ expected = "Conversação".unicode_normalize(:nfc)
26
24
 
27
25
  assert_equal expected, value
28
26
  end
@@ -67,10 +65,10 @@ if "".respond_to?(:encoding)
67
65
  marc8 = "Conversa\xF0c\xE4ao \xC1"
68
66
  unicode = "Conversação \u2113"
69
67
 
70
- unicode_c = UNF::Normalizer.normalize(unicode, :nfc)
71
- unicode_kc = UNF::Normalizer.normalize(unicode, :nfkc)
72
- unicode_d = UNF::Normalizer.normalize(unicode, :nfd)
73
- unicode_kd = UNF::Normalizer.normalize(unicode, :nfkd)
68
+ unicode_c = unicode.unicode_normalize(:nfc)
69
+ unicode_kc = unicode.unicode_normalize(:nfkc)
70
+ unicode_d = unicode.unicode_normalize(:nfd)
71
+ unicode_kd = unicode.unicode_normalize(:nfkd)
74
72
 
75
73
  converter = MARC::Marc8::ToUnicode.new
76
74
 
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.2.0
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kevin Clarke
@@ -14,16 +14,16 @@ authors:
14
14
  autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
- date: 2022-08-02 00:00:00.000000000 Z
17
+ date: 2025-01-09 00:00:00.000000000 Z
18
18
  dependencies:
19
19
  - !ruby/object:Gem::Dependency
20
- name: standard
20
+ name: nokogiri
21
21
  requirement: !ruby/object:Gem::Requirement
22
22
  requirements:
23
23
  - - "~>"
24
24
  - !ruby/object:Gem::Version
25
25
  version: '1.0'
26
- type: :development
26
+ type: :runtime
27
27
  prerelease: false
28
28
  version_requirements: !ruby/object:Gem::Requirement
29
29
  requirements:
@@ -31,33 +31,69 @@ dependencies:
31
31
  - !ruby/object:Gem::Version
32
32
  version: '1.0'
33
33
  - !ruby/object:Gem::Dependency
34
- name: scrub_rb
34
+ name: rake
35
35
  requirement: !ruby/object:Gem::Requirement
36
36
  requirements:
37
- - - ">="
37
+ - - "~>"
38
38
  - !ruby/object:Gem::Version
39
- version: 1.0.1
40
- - - "<"
39
+ version: '13.0'
40
+ type: :development
41
+ prerelease: false
42
+ version_requirements: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - "~>"
41
45
  - !ruby/object:Gem::Version
42
- version: '2'
43
- type: :runtime
46
+ version: '13.0'
47
+ - !ruby/object:Gem::Dependency
48
+ name: test-unit
49
+ requirement: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - "~>"
52
+ - !ruby/object:Gem::Version
53
+ version: '3.0'
54
+ type: :development
44
55
  prerelease: false
45
56
  version_requirements: !ruby/object:Gem::Requirement
46
57
  requirements:
47
- - - ">="
58
+ - - "~>"
48
59
  - !ruby/object:Gem::Version
49
- version: 1.0.1
50
- - - "<"
60
+ version: '3.0'
61
+ - !ruby/object:Gem::Dependency
62
+ name: standard
63
+ requirement: !ruby/object:Gem::Requirement
64
+ requirements:
65
+ - - "~>"
66
+ - !ruby/object:Gem::Version
67
+ version: '1.0'
68
+ type: :development
69
+ prerelease: false
70
+ version_requirements: !ruby/object:Gem::Requirement
71
+ requirements:
72
+ - - "~>"
73
+ - !ruby/object:Gem::Version
74
+ version: '1.0'
75
+ - !ruby/object:Gem::Dependency
76
+ name: warning
77
+ requirement: !ruby/object:Gem::Requirement
78
+ requirements:
79
+ - - "~>"
51
80
  - !ruby/object:Gem::Version
52
- version: '2'
81
+ version: '1.5'
82
+ type: :development
83
+ prerelease: false
84
+ version_requirements: !ruby/object:Gem::Requirement
85
+ requirements:
86
+ - - "~>"
87
+ - !ruby/object:Gem::Version
88
+ version: '1.5'
53
89
  - !ruby/object:Gem::Dependency
54
- name: unf
90
+ name: xml-simple
55
91
  requirement: !ruby/object:Gem::Requirement
56
92
  requirements:
57
93
  - - ">="
58
94
  - !ruby/object:Gem::Version
59
95
  version: '0'
60
- type: :runtime
96
+ type: :development
61
97
  prerelease: false
62
98
  version_requirements: !ruby/object:Gem::Requirement
63
99
  requirements:
@@ -170,14 +206,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
170
206
  requirements:
171
207
  - - ">="
172
208
  - !ruby/object:Gem::Version
173
- version: 1.8.6
209
+ version: 2.2.0
174
210
  required_rubygems_version: !ruby/object:Gem::Requirement
175
211
  requirements:
176
212
  - - ">="
177
213
  - !ruby/object:Gem::Version
178
214
  version: '0'
179
215
  requirements: []
180
- rubygems_version: 3.3.3
216
+ rubygems_version: 3.5.22
181
217
  signing_key:
182
218
  specification_version: 4
183
219
  summary: A ruby library for working with Machine Readable Cataloging