Skip to content

Commit

Permalink
Fix ISSN comparison, add ISSN exceptions (for Frontiers subjournals).
Browse files Browse the repository at this point in the history
  • Loading branch information
rmzelle committed Dec 12, 2012
1 parent b782afd commit b5fb944
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
ISSN = Hash.new { |h,k| h[k] = [] }

# These styles are ignored when checking for duplicate ISSNs
ISSN_FILTER = %w{
ISSN_FILTER = %w{ 1662-453X 1663-9812 1664-042X 1664-0640 1664-1078 1664-2295
1664-2392 1664-302X 1664-3224 1664-462X 1664-8021 2234-943X
}

def load_style(path)
Expand All @@ -21,13 +22,13 @@ def load_style(path)
begin
if style.info.has_issn?
[style.info.issn].flatten(1).each do |issn|
ISSN[issn.to_s] << id unless ISSN_FILTER.include?(issn)
ISSN[issn.to_s] << id unless ISSN_FILTER.include?(issn.to_s)
end
end

if style.info.has_eissn?
[style.info.eissn].flatten(1).each do |issn|
ISSN[issn.to_s] << id unless ISSN_FILTER.include?(issn)
ISSN[issn.to_s] << id unless ISSN_FILTER.include?(issn.to_s)
end
end
rescue
Expand Down

0 comments on commit b5fb944

Please sign in to comment.