change_the_subject 0.4.1 → 0.4.2

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: 93cad4e4c4fc10fafc073f181fd64028c92643ad831f00b76bada3dbb24d4d1d
4
+ data.tar.gz: e8dc2a999190acd425a95f2408508deaed5c1e33b21e37bc276146f5aefe9657
5
5
  SHA512:
6
- metadata.gz: 617d527a8b31fc6e299965eef1a528df6c4613dc6f90d1463a4d37f264b1cfbc2abbec0da92a32bb3b89af14cd228ff48c77074cecc92ce6297b9f05f75fad7b
7
- data.tar.gz: c31e5453937ba27a9b09d256c0ca8132871d1a5d5d71d5b423036cf4df552d7a9a47f0b02cc1a64d23a17bb2f394fa5c31299dec1786406aef5f3a837053f7ce
6
+ metadata.gz: 4e668dedab45f7025b30885d6ce4d9d2a4e0235803bad93dc5279adfed3ba3f83d46991663b4a97f69b04bb025debad812fb51122b9995309ba9e0baa5043a14
7
+ data.tar.gz: e29810fb3a61075ff3305e32569aec5ca88c026133164b6d2a95846df431df8a9d4e403d4da9d3bb3925a918768088e572dff315a183d1fafcfbf808399a4d01
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 (0.4.2)
5
5
  yaml
6
6
 
7
7
  GEM
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class ChangeTheSubject
4
- VERSION = "0.4.1"
4
+ VERSION = "0.4.2"
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: 0.4.2
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-03-25 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: yaml