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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 90db1eecd172d4af9370b7c479c3f0014b9e78c3b21aa8b44009bfd1c90d45f3
4
- data.tar.gz: 9c80f455cecf4b0504b2fba458536130806c5bfdd45114a5f8c40ff07cd77601
3
+ metadata.gz: 66c3b9dee5acf38f015438a825158781ed6e93e3b78023577c5d15cb822791e2
4
+ data.tar.gz: 4d06e38e6438629901918529c293bdf53a13734fbb8b93db3ff73587947bbd24
5
5
  SHA512:
6
- metadata.gz: 617d527a8b31fc6e299965eef1a528df6c4613dc6f90d1463a4d37f264b1cfbc2abbec0da92a32bb3b89af14cd228ff48c77074cecc92ce6297b9f05f75fad7b
7
- data.tar.gz: c31e5453937ba27a9b09d256c0ca8132871d1a5d5d71d5b423036cf4df552d7a9a47f0b02cc1a64d23a17bb2f394fa5c31299dec1786406aef5f3a837053f7ce
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.1)
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.1)
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!
@@ -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.3.0")
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
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class ChangeTheSubject
4
- VERSION = "0.4.1"
4
+ VERSION = "1.0.0"
5
5
  end
@@ -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
- term_config = subdivision_term_mapping[sub_term]
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
- term_as_array[index] == subterms[index]
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.1
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-02-24 00:00:00.000000000 Z
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.3.0
135
+ version: 2.7.0
136
136
  required_rubygems_version: !ruby/object:Gem::Requirement
137
137
  requirements:
138
138
  - - ">="