Skip to content

Instantly share code, notes, and snippets.

@cbeer
Created April 24, 2014 18:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cbeer/11264457 to your computer and use it in GitHub Desktop.
Save cbeer/11264457 to your computer and use it in GitHub Desktop.
fcrepo4 transactions
after do
resp = FedoraLens.connection.http.post "./fcr:tx"
loc = resp.headers['Location']
cl = Faraday.new url: loc
cl.delete "./#{@library.pid}"
cl.delete "./#{@book.pid}"
cl.delete "./#{@author.pid}"
cl.delete "./#{@publisher.pid}"
cl.delete "./#{@library2.pid}" if @library2
cl.delete "./#{@publisher2.pid}" if @publisher2
cl.post './fcr:tx/fcr:commit'
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment