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 +4 -4
- data/Gemfile.lock +1 -1
- data/lib/change_the_subject/version.rb +1 -1
- data/lib/change_the_subject.rb +4 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 93cad4e4c4fc10fafc073f181fd64028c92643ad831f00b76bada3dbb24d4d1d
|
4
|
+
data.tar.gz: e8dc2a999190acd425a95f2408508deaed5c1e33b21e37bc276146f5aefe9657
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4e668dedab45f7025b30885d6ce4d9d2a4e0235803bad93dc5279adfed3ba3f83d46991663b4a97f69b04bb025debad812fb51122b9995309ba9e0baa5043a14
|
7
|
+
data.tar.gz: e29810fb3a61075ff3305e32569aec5ca88c026133164b6d2a95846df431df8a9d4e403d4da9d3bb3925a918768088e572dff315a183d1fafcfbf808399a4d01
|
data/Gemfile.lock
CHANGED
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.
|
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-
|
13
|
+
date: 2025-03-25 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: yaml
|