- Zip up fedora-data directory:
cd /opt/
tar zcvf fedora-data.tar.gz fedora-data/
#!/usr/bin/env ruby | |
# | |
# ./dscm-to-html.rb repository_url PID | |
# | |
require 'rubygems' | |
require 'nokogiri' | |
require 'open-uri' | |
require 'erb' | |
require 'active_support' |
<add> | |
<doc> | |
<field name="id">druid:cf811xn0897</field> | |
<field name="register-object-status">completed</field> | |
<field name="submit-status">completed</field> | |
<field name="reader-approval-status">waiting</field> | |
<field name="registrar-approval-status">waiting</field> | |
<field name="start-accession-status">waiting</field> | |
<field name="register-object-attempts">1</field> |
class EtdSubmitDatastream < ActiveFedora::NokogiriDatastream | |
set_terminology do |t| | |
t.root(:path=>"workflow") { | |
t.object_id(:path=>{:attribute=>"objectId"}, :label=>"Object ID") | |
} | |
# t.process would allow you to leave off | |
# the :path, but because we called it something |
require 'rubygems' | |
require 'active-fedora' | |
require 'open-uri' | |
require File.expand_path(File.dirname(__FILE__) + '/boot') | |
class DeleteFedoraObjects | |
attr_reader :repository | |
attr_reader :workflow | |
attr_reader :registration_robot |
# Brazil maps are losing their model type upon import. I think it is because some of the | |
# values contain square brackets. It is happening during the csv_attributes method | |
context "make a Hash of the CSV values attached to their headers" do | |
context "how things work now" do | |
let(:metadata_file) { "#{fixture_path}/csv/brazil.csv" } | |
let(:csv) { ::CSV.read(metadata_file) } | |
let(:header) { csv[0] } | |
let(:body) { csv[1] } | |
it "lines up the header and body fields consitently" do | |
attrs = Importer::CSV.csv_attributes(header, body) |
=Navigating= | |
visit('/projects') | |
visit(post_comments_path(post)) | |
=Clicking links and buttons= | |
click_link('id-of-link') | |
click_link('Link Text') | |
click_button('Save') | |
click('Link Text') # Click either a link or a button | |
click('Button Value') |
# Start the app with EXPLAIN_PARTIALS=true to show locations of view partials | |
if Rails.env.development? and ENV['EXPLAIN_PARTIALS'] | |
module ActionView | |
class PartialRenderer | |
def render_with_explanation(*args) | |
rendered = render_without_explanation(*args).to_s | |
# Note: We haven't figured out how to get a path when @template is nil. | |
start_explanation = "\n<!-- START PARTIAL #{@template.inspect} -->\n" | |
end_explanation = "\n<!-- END PARTIAL #{@template.inspect} -->\n" | |
start_explanation.html_safe + rendered + end_explanation.html_safe |
require 'nokogiri' | |
require 'open-uri' | |
# Get a Nokogiri::HTML:Document for the page we're interested in... | |
doc = Nokogiri::HTML(open('http://www.google.com/search?q=tenderlove')) | |
# Do funky things with it using Nokogiri::XML::Node methods... | |
#### |
emory:bpc0v | |
emory:7t8dc | |
emory:7v24q | |
emory:bq2dn | |
emory:pg1sx | |
emory:pkn0t | |
emory:92ht9 | |
emory:br00v | |
emory:93bm1 | |
emory:r9q8n |