Skip to content

Commit

Permalink
Update DOI checker language
Browse files Browse the repository at this point in the history
  • Loading branch information
xuanxu committed Sep 8, 2024
1 parent ee69a62 commit 4c6a73e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/lib/doi_checker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ def acm_105555_prefix(entry)
if entry.has_field?('doi') && entry.doi.include?("10.5555/")
{ validity: :invalid, msg: "#{entry.doi} is INVALID - 10.5555 is a known broken prefix, replace with https://dl.acm.org/doi/{doi} in the {url} field" }
elsif entry.has_field?('url') && entry.url.include?("https://dl.acm.org/doi/10.5555")
{ validity: :skip, msg: "#{entry.url} - correctly put 10.5555 prefixed doi in the url field, editor should ensure this resolves" }
{ validity: :skip, msg: "#{entry.url} - non-DOI with 10.5555 correctly placed in the url field, editor should ensure this resolves" }
else
false
end
Expand Down
2 changes: 1 addition & 1 deletion spec/doi_checker_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@
entry = BibTeX::Entry.new(url: "https://dl.acm.org/doi/10.5555/2827719.2827740")
validity = subject.handle_special_case(entry)
expect(validity[:validity]).to eq(:skip)
expect(validity[:msg]).to eq("https://dl.acm.org/doi/10.5555/2827719.2827740 - correctly put 10.5555 prefixed doi in the url field, editor should ensure this resolves")
expect(validity[:msg]).to eq("https://dl.acm.org/doi/10.5555/2827719.2827740 - non-DOI with 10.5555 correctly placed in the url field, editor should ensure this resolves")
end

it "should handle special cases separately from normal DOI checking" do
Expand Down

0 comments on commit 4c6a73e

Please sign in to comment.