change_the_subject 0.4.1 → 1.0.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/Gemfile.lock +3 -2
- data/change_the_subject.gemspec +1 -1
- data/lib/change_the_subject/version.rb +1 -1
- data/lib/change_the_subject.rb +4 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 66c3b9dee5acf38f015438a825158781ed6e93e3b78023577c5d15cb822791e2
|
4
|
+
data.tar.gz: 4d06e38e6438629901918529c293bdf53a13734fbb8b93db3ff73587947bbd24
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0f20e527599332e13b1acbc79c50afae03267dc891aea05fac73d87fe5be56f83aa5d061f55ae7c1b30cf877268d97b3ebda1196937a1e7be4c31ab5bcf82e56
|
7
|
+
data.tar.gz: 3fd3a1c479d9cb6f3955a3c54f61e3fb4d06951466b1fc9a0b8184e9cabf2442b54632b19cce1f2905a010b842baa418e0dab57bf60d5b3fb28a4342435bd3ef
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
change_the_subject (0.
|
4
|
+
change_the_subject (1.0.0)
|
5
5
|
yaml
|
6
6
|
|
7
7
|
GEM
|
@@ -12,7 +12,7 @@ GEM
|
|
12
12
|
coderay (1.1.3)
|
13
13
|
diff-lcs (1.5.0)
|
14
14
|
docile (1.4.0)
|
15
|
-
json (2.10.
|
15
|
+
json (2.10.2)
|
16
16
|
language_server-protocol (3.17.0.4)
|
17
17
|
lint_roller (1.1.0)
|
18
18
|
method_source (1.0.0)
|
@@ -75,6 +75,7 @@ PLATFORMS
|
|
75
75
|
arm64-darwin-24
|
76
76
|
x86_64-darwin-20
|
77
77
|
x86_64-darwin-21
|
78
|
+
x86_64-darwin-24
|
78
79
|
|
79
80
|
DEPENDENCIES
|
80
81
|
change_the_subject!
|
data/change_the_subject.gemspec
CHANGED
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
|
|
10
10
|
|
11
11
|
spec.summary = "Provides configuration and utilities for replacing archaic subject terms with preferred subject terms"
|
12
12
|
spec.homepage = "https://github.com/pulibrary/change_the_subject"
|
13
|
-
spec.required_ruby_version = Gem::Requirement.new(">= 2.
|
13
|
+
spec.required_ruby_version = Gem::Requirement.new(">= 2.7.0")
|
14
14
|
|
15
15
|
spec.metadata["allowed_push_host"] = "https://rubygems.org"
|
16
16
|
|
data/lib/change_the_subject.rb
CHANGED
@@ -75,7 +75,8 @@ class ChangeTheSubject
|
|
75
75
|
subterms.each.with_index do |sub_term, index|
|
76
76
|
next if index.zero?
|
77
77
|
|
78
|
-
|
78
|
+
clean_subterm = sub_term.delete_suffix(".")
|
79
|
+
term_config = subdivision_term_mapping[clean_subterm]
|
79
80
|
next unless term_config
|
80
81
|
|
81
82
|
subterms[index] = term_config["replacement"]
|
@@ -107,7 +108,8 @@ class ChangeTheSubject
|
|
107
108
|
def term_matches_subterms?(term, subterms)
|
108
109
|
term_as_array = Array(term)
|
109
110
|
term_as_array.count.times.all? do |index|
|
110
|
-
|
111
|
+
clean_subterm = subterms[index].delete_suffix(".")
|
112
|
+
term_as_array[index] == clean_subterm
|
111
113
|
end
|
112
114
|
end
|
113
115
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: change_the_subject
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Max Kadel
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
- Eliot Jordan
|
11
11
|
bindir: exe
|
12
12
|
cert_chain: []
|
13
|
-
date: 2025-
|
13
|
+
date: 2025-04-03 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: yaml
|
@@ -132,7 +132,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
132
132
|
requirements:
|
133
133
|
- - ">="
|
134
134
|
- !ruby/object:Gem::Version
|
135
|
-
version: 2.
|
135
|
+
version: 2.7.0
|
136
136
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
137
137
|
requirements:
|
138
138
|
- - ">="
|