Skip to content

Commit

Permalink
update .travis.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
nabeta committed Nov 11, 2015
1 parent 2d3b543 commit 69ff824
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 13 deletions.
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ env:
- DB=mysql
- DB=postgresql
matrix:
allow_failures:
- rvm: 1.9.3
exclude:
- gemfile: gemfiles/rails_4.2_ndl.gemfile
- gemfile: gemfiles/rails_4.2_nii.gemfile
Expand Down
26 changes: 13 additions & 13 deletions lib/enju_loc/loc_search.rb
Original file line number Diff line number Diff line change
Expand Up @@ -211,21 +211,21 @@ def get_mods_titles(doc)
type = e.attributes["type"].try(:content)
case type
when "alternative", "translated", "abbreviated", "uniform"
title_alternatives << e.at('./mods:title', NS).content
else
nonsort = e.at('./mods:nonSort', NS).try(:content)
original_title << nonsort if nonsort
original_title << e.at('./mods:title', NS).try(:content)
subtitle = e.at('./mods:subTitle', NS).try(:content)
original_title << " : #{ subtitle }" if subtitle
partnumber = e.at('./mods:partNumber', NS).try(:content)
partname = e.at('./mods:partName', NS).try(:content)
partname = [ partnumber, partname ].compact.join( ": " )
original_title << ". #{ partname }" unless partname.blank?
title_alternatives << e.at('./mods:title', NS).content
else
nonsort = e.at('./mods:nonSort', NS).try(:content)
original_title << nonsort if nonsort
original_title << e.at('./mods:title', NS).try(:content)
subtitle = e.at('./mods:subTitle', NS).try(:content)
original_title << " : #{ subtitle }" if subtitle
partnumber = e.at('./mods:partNumber', NS).try(:content)
partname = e.at('./mods:partName', NS).try(:content)
partname = [ partnumber, partname ].compact.join( ": " )
original_title << ". #{ partname }" unless partname.blank?
end
end
{ :original_title => original_title, :title_alternative => title_alternatives.join( " ; " ) }
end
{ :original_title => original_title, :title_alternative => title_alternatives.join( " ; " ) }
end

def get_mods_language(doc)
language = doc.at('//mods:language/mods:languageTerm[@authority="iso639-2b"]', NS).try(:content)
Expand Down

0 comments on commit 69ff824

Please sign in to comment.