change_the_subject 0.3.2 → 0.3.3

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: 4fc12151448eefb6c74b96cdf7d03425d0ac843e90da4608cf4e7567d568c238
4
- data.tar.gz: a6d7852e260bb44a45c6e022278d6d1e3ea73bd80e1ec081a316a55d053e2084
3
+ metadata.gz: 93a323c7be102c29ca27cedee07f7586bc3e88fb5829b2b4841f8e8ec903aebc
4
+ data.tar.gz: 7355143afda00985700ff78493630baff96bdc3055c46dac4d64f79aa5b0c69a
5
5
  SHA512:
6
- metadata.gz: e4b297cf2edd0feb9bf8b0fd7834a1a557ccf36b0c8c085c53544fc1879c894f2087bb479fcd18cd0d542ab0715629be9d62067ddc85d649e4b9d6646ac4c269
7
- data.tar.gz: c58101d47e8f0640d6e20a870145b8eadcf10e7334e0abfbce6ea072ee2c179a7c18bd08ebe421946b7a1cbec19e609670783600d96a33c691dad103e6225e66
6
+ metadata.gz: efb4a20422392edf75953446de51330ef54056fb24397fe6f9a7c5f42d50164f94ffe492c43a521989b4da053199feca10b81498ceb71f308f7e9aff7a7d3fe1
7
+ data.tar.gz: a15d48cf4ce21d3d8fcd35ab8ae63c5dd6b9a58370635c946e1eb0224749826ea0323cd97f786b8f3be1c967a48101f3aa8d511f8ecd5745bf5a74dc27cbd679
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- change_the_subject (0.3.2)
4
+ change_the_subject (0.3.3)
5
5
  yaml
6
6
 
7
7
  GEM
data/README.md CHANGED
@@ -1,8 +1,8 @@
1
1
  # ChangeTheSubject
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/change_the_subject`. To experiment with that code, run `bin/console` for an interactive prompt.
3
+ This gem is currently used to mask outdated Library of Congress Subject Headings in two different public access catalogs - [Princeton University Library Catalog](https://catalog.princeton.edu/) and [Princeton University Library Finding Aids](https://findingaids.princeton.edu/).
4
4
 
5
- TODO: Delete this and the text above, and describe your gem
5
+ The code for this gem started in the [bibdata codebase](https://github.com/pulibrary/bibdata), the application that prepares metadata for use by the Catalog, and you can [see the gem's earlier history there](https://github.com/pulibrary/bibdata/commits/590d2437126150d66e40393724f9e11ba95c3328/marc_to_solr/lib/change_the_subject.rb).
6
6
 
7
7
  ## Installation
8
8
 
@@ -21,8 +21,15 @@ Or install it yourself as:
21
21
  $ gem install change_the_subject
22
22
 
23
23
  ## Usage
24
+ The main api of the gem is the `ChangeTheSubject.fix` method, which takes an array of subject terms, compares them to the configuration (the default is in `config/change_the_subject.yml`), and replaces the configured terms. You can see how Bibdata uses the gem in its [traject_config.rb](https://github.com/pulibrary/bibdata/blob/main/marc_to_solr/lib/traject_config.rb).
24
25
 
25
- TODO: Write usage instructions here
26
+ ```ruby
27
+ original_subjects = ["Something problematic", "Something not problematic"]
28
+ subjects = ChangeTheSubject.fix(subject_terms: original_subjects)
29
+ # outputs ["Something not problematic from config", "Something not problematic"]
30
+ ```
31
+
32
+ The `ChangeTheSubject.fix` method also takes an optional `separators` argument, which you can [see in use in Pulfalight's implementation for eads](https://github.com/pulibrary/pulfalight/blob/main/lib/pulfalight/traject/ead2_config.rb).
26
33
 
27
34
  ## Development
28
35
 
@@ -31,5 +38,6 @@ After checking out the repo, run `bin/setup` to install dependencies. Then, run
31
38
  To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
32
39
 
33
40
  ## Contributing
41
+ The configuration for this gem is managed by the Inclusive and Reparative Metadata Working Group (IRMWG). Send questions or comments about the configuration to harmfullanguage@princeton.libanswers.com.
34
42
 
35
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/change_the_subject.
43
+ Bug reports and pull requests are welcome on GitHub at https://github.com/pulibrary/change_the_subject.
@@ -50,7 +50,7 @@
50
50
  replacement: "Enslaved children"
51
51
  rationale: "In addition to its usage by TRLN, this term falls in line with recommendations included in the community-sourced document P. Gabrielle Foreman, et al. \"Writing about Slavery/Teaching About Slavery: This Might Help\" and Archives for Black Lives in Philadelphia Anti-Racist Description Resources."
52
52
  "Indian slaves":
53
- replacement: "Enslaved indigenous peoples"
53
+ replacement: "Enslaved Indigenous peoples"
54
54
  rationale: "In addition to its usage by TRLN, this term falls in line with recommendations included in the community-sourced document P. Gabrielle Foreman, et al. \"Writing about Slavery/Teaching About Slavery: This Might Help.\" Capitalization of \"Indigenous\" appears to be preferred by those from Indigenous communities, for example see https://www.lib.sfu.ca/about/branches-depts/slc/writing/inclusive-antiracist-writing/bipoc and https://www.ictinc.ca/blog/indigenous-peoples-terminology-guidelines-for-usage. As this is a broad term, when possible, one should include the name of the community(ies) or nation(s) of the people in the record. "
55
55
  "Older slaves":
56
56
  replacement: "Enslaved older people"
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class ChangeTheSubject
4
- VERSION = "0.3.2"
4
+ VERSION = "0.3.3"
5
5
  end
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.3.2
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Max Kadel
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: exe
13
13
  cert_chain: []
14
- date: 2023-03-02 00:00:00.000000000 Z
14
+ date: 2023-07-07 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: yaml