Skip to content
This repository has been archived by the owner on Dec 19, 2018. It is now read-only.

Commit

Permalink
Use Stanford::Mods::Normalizer
Browse files Browse the repository at this point in the history
  • Loading branch information
jcoyne committed Mar 15, 2018
1 parent 83a3c92 commit b255d2e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ gem "grape"
gem 'modsulator'
gem "bundler"
gem 'honeybadger', '~> 2.0'
gem 'stanford-mods-normalizer'

group :test do
gem "equivalent-xml", '>= 0.6.0' # For ignoring_attr_values() with arguments
Expand Down
7 changes: 5 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ GEM
rack (2.0.4)
rack-accept (0.4.5)
rack (>= 0.4)
rack-test (0.8.2)
rack-test (0.8.3)
rack (>= 1.0, < 3)
rake (12.3.0)
roo (2.5.1)
Expand Down Expand Up @@ -111,6 +111,8 @@ GEM
sshkit (1.16.0)
net-scp (>= 1.1.2)
net-ssh (>= 2.8.0)
stanford-mods-normalizer (0.1.0)
nokogiri (~> 1.8)
term-ansicolor (1.6.0)
tins (~> 1.0)
thor (0.19.4)
Expand Down Expand Up @@ -141,6 +143,7 @@ DEPENDENCIES
rack-test
rake
rspec (>= 3.0)
stanford-mods-normalizer

BUNDLED WITH
1.16.0
1.16.1
4 changes: 1 addition & 3 deletions lib/modsulator_app.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
require 'json'
require 'modsulator'
require 'modsulator/normalizer'

module Spreadsheet

class ModsulatorAPI < Grape::API

version 'v1', :using => :path
Expand Down Expand Up @@ -46,7 +44,7 @@ class ModsulatorAPI < Grape::API
xml = input_file.read
input_file.close
header 'Content-Type', 'application/xml'
normalizer = Normalizer.new
normalizer = Stanford::Mods::Normalizer.new
normalizer.normalize_xml_string(xml)
end
end
Expand Down

0 comments on commit b255d2e

Please sign in to comment.