With these classes:
class CodexMetadata < ActiveFedora::OmDatastream
set_terminology do |t|
t.root(path: "fields")
t.title
t.author
end
With a gemfile like this: | |
source 'https://rubygems.org' | |
gem 'nokogiri', '~> 1.6.3.1' | |
.... | |
And a model defined like this | |
class Record < ActiveRecord::Base | |
def to_pbcore_xml |
<?xml version="1.0" encoding="UTF-8"?> | |
<mods:mods xmlns:mods="http://www.loc.gov/mods/v3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xlink="http://www.w3.org/1999/xlink" xsi:schemaLocation="http://www.loc.gov/mods/v3 http://www.loc.gov/standards/mods/v3/mods-3-4.xsd"> | |
<mods:titleInfo usage="primary"> | |
<mods:title>Unidentified man on Flying A Studios lot</mods:title> | |
</mods:titleInfo> | |
<mods:name usage="primary" type="corporate" authority="naf" authorityURI="http://id.loc.gov/authorities/names" valueURI="http://id.loc.gov/authorities/names/n87914041"> | |
<mods:namePart>American Film Manufacturing Company</mods:namePart> | |
<mods:role> | |
<mods:roleTerm type="text" authority="marcrelator" authorityURI="http://id.loc.gov/vocabulary/relators" valueURI="http://id.loc.gov/vocabulary/relators/cre">Creator</mods:roleTerm> | |
</mods:role> |
With these classes:
class CodexMetadata < ActiveFedora::OmDatastream
set_terminology do |t|
t.root(path: "fields")
t.title
t.author
end
MARKs-MB:sufia-centos mark$ git pull | |
remote: Counting objects: 53, done. | |
remote: Compressing objects: 100% (23/23), done. | |
remote: Total 53 (delta 17), reused 4 (delta 4), pack-reused 26 | |
Unpacking objects: 100% (53/53), done. | |
From https://github.com/acozine/sufia-centos | |
* [new branch] java8 -> origin/java8 | |
deaccf5..0837488 master -> origin/master | |
Already up-to-date. | |
MARKs-MB:sufia-centos mark$ git checkout java8 |
MARKs-MB:sufia-centos mark$ git checkout master | |
M vanilla.yml | |
Switched to branch 'master' | |
Your branch is behind 'origin/master' by 14 commits, and can be fast-forwarded. | |
(use "git pull" to update your local branch) | |
MARKs-MB:sufia-centos mark$ git pull | |
Updating deaccf5..1504cba | |
Fast-forward | |
README.md | 14 +++++++--- | |
adrl-prod.yml | 26 ++++++++++++++++++ |
TASK: [services | install zip utility] **************************************** | |
ok: [hydra-head] | |
TASK: [services | download fits zip] ****************************************** | |
ok: [hydra-head] | |
TASK: [services | unpack fits] ************************************************ | |
ok: [hydra-head] | |
TASK: [services | make fits executable] *************************************** |
- name: provision production centos 7 host for ADRL 2.0 | |
hosts: vanilla-hosts | |
remote_user: centos | |
vars: | |
server_name: hydra.local | |
rails_secret_key_base: 8b392d82866851f73cc415a65bf7e6dd630cc0e64298d65b4ad47a9f51ca33575ae8a4ae02584527c193cb2dff7a8ecf1abca6dc6efc3030442c11ec916fa098 | |
capistrano_user: deploy | |
capistrano_group: deploy | |
install_user: ucsb | |
install_group: ucsb |
# Simple Role Syntax | |
# ================== | |
# Supports bulk-adding hosts to roles, the primary server in each group | |
# is considered to be the first unless any hosts have the primary | |
# property set. Don't declare `role :all`, it's a meta role. | |
set :stage, :vmware | |
set :rails_env, 'production' | |
server '172.16.243.137', user: 'deploy', roles: [:web, :app, :db, :resque_pool] | |
# Extended Server Syntax |
MARKs-MB:sufia-centos mark$ ansible-playbook adrl-prod.yml | |
PLAY [provision production centos 7 host for ADRL 2.0] ************************ | |
GATHERING FACTS *************************************************************** | |
ok: [hydra-head] | |
TASK: [generic-centos | format volume for /opt] ******************************* | |
ok: [hydra-head] |
MARKs-MB:alexandria-v2 mark$ bundle exec cap vmware deploy | |
INFO [1193ee70] Running /usr/bin/env mkdir -p /tmp/alexandria-v2/ as deploy@172.16.243.137 | |
DEBUG [1193ee70] Command: /usr/bin/env mkdir -p /tmp/alexandria-v2/ | |
INFO [1193ee70] Finished in 0.174 seconds with exit status 0 (successful). | |
DEBUG Uploading /tmp/alexandria-v2/git-ssh.sh 0.0% | |
INFO Uploading /tmp/alexandria-v2/git-ssh.sh 100.0% | |
INFO [36364840] Running /usr/bin/env chmod +x /tmp/alexandria-v2/git-ssh.sh as deploy@172.16.243.137 | |
DEBUG [36364840] Command: /usr/bin/env chmod +x /tmp/alexandria-v2/git-ssh.sh | |
INFO [36364840] Finished in 0.018 seconds with exit status 0 (successful). | |
Please enter branch (master): |