Skip to content

Commit

Permalink
Merge branch 'main' into joss
Browse files Browse the repository at this point in the history
  • Loading branch information
xuanxu committed Oct 15, 2024
2 parents 26e0b46 + 2d07db3 commit 3004f28
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 23 deletions.
42 changes: 21 additions & 21 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -11,48 +11,50 @@ GEM
cgi (0.4.1)
charlock_holmes (0.7.9)
chronic (0.10.2)
concurrent-ruby (1.3.3)
concurrent-ruby (1.3.4)
connection_pool (2.4.1)
crack (1.0.0)
bigdecimal
rexml
diff-lcs (1.5.1)
dotenv (3.1.2)
faraday (2.10.0)
faraday-net_http (>= 2.0, < 3.2)
dotenv (3.1.4)
faraday (2.12.0)
faraday-net_http (>= 2.0, < 3.4)
json
logger
faraday-follow_redirects (0.1.0)
faraday (>= 2, < 3)
faraday-net_http (3.1.0)
faraday-net_http (3.3.0)
net-http
faraday-retry (2.2.1)
faraday (~> 2.0)
github-linguist (7.30.0)
github-linguist (8.0.1)
cgi
charlock_holmes (~> 0.7.7)
mini_mime (~> 1.0)
rugged (~> 1.0)
hashdiff (1.1.0)
hashdiff (1.1.1)
issue (1.0.2)
openssl (~> 3.2)
rack (~> 3.1)
json (2.7.2)
latex-decode (0.4.0)
licensee (9.17.1)
dotenv (>= 2, < 4)
octokit (>= 4.20, < 10.0)
reverse_markdown (>= 1, < 3)
rugged (>= 0.24, < 2.0)
thor (>= 0.19, < 2.0)
logger (1.6.0)
logger (1.6.1)
mini_mime (1.1.5)
mini_portile2 (2.8.7)
multi_json (1.15.0)
mustermann (3.0.0)
mustermann (3.0.3)
ruby2_keywords (~> 0.0.1)
net-http (0.4.1)
uri
nio4r (2.7.3)
nokogiri (1.16.6)
nokogiri (1.16.7)
mini_portile2 (~> 2.8.2)
racc (~> 1.4)
octokit (9.1.0)
Expand All @@ -61,10 +63,10 @@ GEM
ojra (1.1.1)
faraday (~> 2.9)
openssl (3.2.0)
public_suffix (6.0.0)
puma (6.4.2)
public_suffix (6.0.1)
puma (6.4.3)
nio4r (~> 2.0)
racc (1.8.0)
racc (1.8.1)
rack (3.1.7)
rack-protection (4.0.0)
base64 (>= 0.1.0)
Expand All @@ -77,15 +79,14 @@ GEM
connection_pool
reverse_markdown (2.1.1)
nokogiri
rexml (3.3.4)
strscan
rexml (3.3.7)
rspec (3.13.0)
rspec-core (~> 3.13.0)
rspec-expectations (~> 3.13.0)
rspec-mocks (~> 3.13.0)
rspec-core (3.13.0)
rspec-core (3.13.1)
rspec-support (~> 3.13.0)
rspec-expectations (3.13.1)
rspec-expectations (3.13.3)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.13.0)
rspec-mocks (3.13.1)
Expand All @@ -103,7 +104,7 @@ GEM
multi_json (~> 1.15)
rexml (~> 3.2, >= 3.2.5)
thor (~> 1.2, >= 1.2.1)
sidekiq (7.3.0)
sidekiq (7.3.2)
concurrent-ruby (< 2)
connection_pool (>= 2.3.0)
logger
Expand All @@ -121,10 +122,9 @@ GEM
rack-protection (= 4.0.0)
sinatra (= 4.0.0)
tilt (~> 2.0)
strscan (3.1.0)
thor (1.3.1)
thor (1.3.2)
tilt (2.4.0)
uri (0.13.0)
uri (0.13.1)
webmock (3.23.1)
addressable (>= 2.8.0)
crack (>= 0.3.2)
Expand Down
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 3004f28

Please sign in to comment.