This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class BarHistory2 < ActiveFedora::Base | |
include ActiveModel::Dirty | |
has_metadata 'xmlish', :type=>BarStream2 | |
delegate_to 'xmlish', [:donkey, :cow] | |
after_save :clear_changed_attributes | |
define_attribute_methods [:donkey, :cow] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/avalon/batch_ingest.rb b/lib/avalon/batch_ingest.rb | |
index 62d7c6d..9b2cc62 100644 | |
--- a/lib/avalon/batch_ingest.rb | |
+++ b/lib/avalon/batch_ingest.rb | |
@@ -56,16 +56,18 @@ module Avalon | |
base_errors = [] | |
email_address = package.manifest.email || Avalon::Configuration['email']['notification'] | |
current_user = User.where(username: email_address).first || User.where(email: email_address).first | |
- ability = Ability.new current_user | |
- ability.instance_variable_set("@user", current_user) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
it "should be able to change group name when authenticated and authorized" do | |
login_as('policy_editor') | |
new_group_name = Faker::Lorem.word | |
post 'update', group_name: new_group_name, new_user: "", id: group.name | |
new_group = Admin::Group.find(new_group_name) | |
new_group.should_not be_nil | |
p group.inspect | |
p new_group.inspect |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd avalon-installer-flat | |
vagrant halt | |
cd .. | |
git clone git@github.com:avalonmediasystem/avalon-installer.git | |
cd avalon-installer | |
git checkout r2 | |
git submodule update --init | |
cp -r ../avalon-installer-flat/.vagrant . | |
cp ../avalon-installer-flat/avalon-install.yml . | |
vagrant up |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
** [out :: mallorn.dlib.indiana.edu] An error has occurred, all later migrations canceled: | |
** [out :: mallorn.dlib.indiana.edu] | |
** [out :: mallorn.dlib.indiana.edu] undefined method `gsub' for 0:Fixnum | |
** [out :: mallorn.dlib.indiana.edu] /var/www/avalon/shared/gems/ruby/1.9.1/gems/om-3.0.3/lib/om/xml/term_value_operators.rb:165:in `block (2 levels) in insert_from_template' | |
** [out :: mallorn.dlib.indiana.edu] /var/www/avalon/shared/gems/ruby/1.9.1/gems/om-3.0.3/lib/om/xml/term_value_operators.rb:164:in `each' | |
** [out :: mallorn.dlib.indiana.edu] /var/www/avalon/shared/gems/ruby/1.9.1/gems/om-3.0.3/lib/om/xml/term_value_operators.rb:164:in `block in insert_from_template' | |
** [out :: mallorn.dlib.indiana.edu] /var/www/avalon/shared/gems/ruby/1.9.1/gems/nokogiri-1.6.0/lib/nokogiri/xml/builder.rb:293:in `initialize' | |
** [out :: mallorn.dlib.indiana.edu] /var/www/avalon/shared/gems/ruby/1.9.1/gems/nokogiri-1.6.0/lib/nokogiri/xml/builder.rb:254:in `new' | |
** [out :: mallorn.dlib.indiana.edu] /var/www/avalon/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'spec_helper' | |
describe 'fedora_solr_sync_issues' do | |
describe 'master files no longer in fedora but still in solr' do | |
let!(:master_file) {FactoryGirl.create(:master_file)} | |
after do | |
ActiveFedora::SolrService.instance.conn.delete_by_id(master_file.pid) | |
ActiveFedora::SolrService.instance.conn.commit | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cap deploy matterhorn HOSTS=pawpaw.dlib.indiana.edu production SCM_BRANCH=release/2.0.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Hydra::RoleManagement::Engine.routes.draw do | |
#role_users POST /roles/:role_id/users(.:format) user_roles#create | |
# role_user DELETE /roles/:role_id/users/:id(.:format) user_roles#destroy | |
# roles GET /roles(.:format) roles#index | |
# POST /roles(.:format) roles#create | |
# new_role GET /roles/new(.:format) roles#new | |
# edit_role GET /roles/:id/edit(.:format) roles#edit | |
# role GET /roles/:id(.:format) roles#show | |
# PUT /roles/:id(.:format) roles#update |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
lockdir=~/ | |
searchdir=$1 | |
if [ -e ${lockdir}/.stripChaptersCronJob.lock ] | |
then | |
exit | |
fi | |
touch ${lockdir}/.stripChaptersCronJob.lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'nokogiri' | |
require 'open-uri' | |
require 'base64' | |
filename = ARGV[0] | |
f = File.new filename | |
doc = Nokogiri::XML::Document.parse f | |
f.close | |
#Get rid of Audit trail | |
doc.xpath("//foxml:datastream[@ID='AUDIT']").each {|n| n.remove()} |