Skip to content

Instantly share code, notes, and snippets.

View elrayle's full-sized avatar

E. Lynette Rayle elrayle

View GitHub Profile
#! /bin/bash
FCREPO_VERSION="4.6.0"
case $1 in
-h )
echo '-----------------------------'
echo 'fcrepo_wrapper startup script'
echo '-----------------------------'
echo 'This script starts fedora using fcrepo_wrapper for either ad hoc development through .internal_test app generated by `rake engine_cart:generate`'
#! /bin/bash
ACTION="install"
case $1 in
-h )
echo '---------------------------'
echo 'solr_wrapper startup script'
echo '---------------------------'
echo 'This script starts solr_wrapper for either ad hoc development through .internal_test app generated by `rake engine_cart:generate`'
echo 'or for testing through rspec tests.'
echo ''
@elrayle
elrayle / ValkyrieTransitionHelper.md
Last active October 2, 2019 00:41
Use Cases for ValkyrieTransitionHelper methods...

All of the methods in this class are transitional and should be removed when the transition process is complete. Having these in use will make identifying dregs and cleaning them up easier. A search for any of these methods will identify parts of the code that are still in transition or haven't really begun to transition.

.to_active_fedora

When one method A has been changed to Valkyrie and method A calls method B passing a model object and method B has not been converted to Valkyrie and is expecting to receive an ActiveFedora object, the .to_active_fedora method allows you to pass the received object not knowing its class and receive back an ActiveFedora object.

Example

@elrayle
elrayle / performance.log
Created August 13, 2019 18:06
LD4L cache + QA performance stats
Time to receive data from authority: 0.103025719s
Time to convert data to json: 0.000191946s
Time to receive data from authority: 2.724987608s
Time to convert data to json: 0.106657066s
Time to receive data from authority: 4.05569521s
Time to convert data to json: 0.243359592s
Time to receive data from authority: 1.298240215s
@elrayle
elrayle / ascii_tree_error_spec.rb
Created March 25, 2019 02:05
Spec to demonstrate ascii tree error parsing complex ldpath for ldpath.rb issue #4
require 'spec_helper'
require 'byebug'
describe 'ldpath_program' do
let(:program) { ldpath_program(ldpath) }
let(:prefixes) do
{
"madsrdf" => "http://www.loc.gov/mads/rdf/v1#",
"rdfs" => "http://www.w3.org/2000/01/rdf-schema#",
"skos" => "http://www.w3.org/2004/02/skos/core#"
@elrayle
elrayle / use_context_only_spec.rb
Last active March 25, 2019 02:05
Spec to demonstrate context + network call to get results for ldpath.rb issue #3
require 'spec_helper'
require 'byebug'
describe 'ldpath_program' do
let(:program) { ldpath_program(ldpath) }
let(:prefixes) do
{
"madsrdf" => "http://www.loc.gov/mads/rdf/v1#",
"schema" => "http://www.w3.org/2000/01/rdf-schema#"
}
@elrayle
elrayle / relationships.md
Created March 13, 2019 22:31
Proposed refactor of relationships in Hyrax

Hyrax Models

  • Collection
  • Work
  • FileSet
  • File

These are currently created by including...

  • CollectionBehavior
@elrayle
elrayle / gist:db74b3a1baa50649ac337ab0f1ec9307
Created March 1, 2019 15:13
Full results for ShareVDE Cornell data query for q=twain & maxRecords=2
$ curl 'http://services.ld4l.org/ld4l_services/cornell_share_vde_work_batch.jsp?query=twain&maxRecords=2'
<http://share-vde.org/sharevde/rdfBibframe/Work/1635833> <http://vivoweb.org/ontology/core#rank> "1" .
<http://share-vde.org/sharevde/rdfBibframe/Work/1635833> http://www.loc.gov/mads/rdf/v1#authoritativeLabel Interpersonal relations--Fiction. .
<http://share-vde.org/sharevde/rdfBibframe/Work/1635833> http://www.loc.gov/mads/rdf/v1#elementValue http://share-vde.org/sharevde/rdfBibframe/GenreForm/c3f11f42-7a06-3004-ada7-bc1c37c5a3e1 .
<http://share-vde.org/sharevde/rdfBibframe/Work/1635833> http://www.loc.gov/mads/rdf/v1#elementValue http://share-vde.org/sharevde/rdfBibframe/Topic/8c1b435c-f54c-391e-92cd-8715f823e53d .
<http://share-vde.org/sharevde/rdfBibframe/Work/1635833> http://www.w3.org/1999/02/22-rdf-syntax-ns#type http://id.loc.gov/ontologies/bibframe/Topic .
<http://share-vde.org/sharevde/rdfBibframe/Work/1635833> http://www.w3.org/2000/01/rdf-schema#label Interpersonal relations--Fiction. .
<http
@elrayle
elrayle / fedgo
Created January 31, 2019 20:13
`fedgo` OR `fedgo -t`
#! /bin/bash
FCREPO_VERSION="4.6.0"
case $1 in
-h )
echo '-----------------------------'
echo 'fcrepo_wrapper startup script'
echo '-----------------------------'
echo 'This script starts fedora using fcrepo_wrapper for either ad hoc development through .internal_test app generated by `rake engine_cart:generate`'
@elrayle
elrayle / solrgo
Created January 31, 2019 20:11
solrgo bash scribe -- use `solrgo` to start for use with hyrax app -- use `solrgo -t` to start for use with hyrax tests
#! /bin/bash
ACTION="install"
case $1 in
-h )
echo '---------------------------'
echo 'solr_wrapper startup script'
echo '---------------------------'
echo 'This script starts solr_wrapper for either ad hoc development through .internal_test app generated by `rake engine_cart:generate`'
echo 'or for testing through rspec tests.'
echo ''