Skip to content

Instantly share code, notes, and snippets.

View elrayle's full-sized avatar

E. Lynette Rayle elrayle

View GitHub Profile
@elrayle
elrayle / rspec_hyrax_master.log
Created August 7, 2017 18:41
Failures running rspec for hyrax on master branch. ruby: 2.3.1 rails: 5.0.5
$ rrs
Randomized with seed 44955
........................................................................................................................................................................................................................You're running an old version of PhantomJS, update to >= 2.1.1 for a better experience.
FF.....................................................................................................................................................................................F.....*........................................................................................................DEPRECATION WARNING: Method any? is deprecated and will be removed in Rails 5.1, as `ActionController::Parameters` no longer inherits from hash. Using this deprecated behavior exposes potential security problems. If you continue to use this method you may be creating a security vulnerability in your app that can be exploited. Instead, consider using one of these documented methods which ar
@elrayle
elrayle / ldf.json
Last active February 27, 2017 17:55
proposed json version of the current yml configuration
{
"term": {
"url": {
"@context": "http://www.w3.org/ns/hydra/context.jsonld",
"@type": "IriTemplate",
"template": "http://example.org/ldf/dataset/{?sub_auth}?subject={?term_id}",
"variableRepresentation": "BasicRepresentation",
"mapping": [
{
"@type": "IriTemplateMapping",
@elrayle
elrayle / ldf.yml
Created February 24, 2017 15:16
Example configuration that would allow an LDF server to be accessed via linked_data branch of QA
# API documentation:
# http://example.org/ldf/dataset/lcnames?subject=http://id.loc.gov/authorities/names/n79065220.html
term:
url: http://example.org/ldf/dataset/__SUB_AUTH__?subject=__TERM_ID__
term_id: URI # valid values: ID | URI
language: en
results:
id_predicate: http://id.loc.gov/vocabulary/identifiers/lccn
label_predicate: http://www.w3.org/2004/02/skos/core#prefLabel
altlabel_predicate: http://www.w3.org/2004/02/skos/core#altLabel
@elrayle
elrayle / projecthydra-template-7.3.0.rc1.rb
Created February 10, 2017 14:13
projecthydra/sufia/master/template.rb for Sufia 7.3.0.rc1
gem 'sufia', '7.3.0.rc1'
gem 'flipflop', github: 'jcoyne/flipflop', branch: 'hydra'
run 'bundle install'
generate 'sufia:install', '-f'
# Support Rails 4.2 and 5.0
begin
rails_command 'db:migrate'
<?xml version="1.0" encoding="utf-8" ?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:skos="http://www.w3.org/2004/02/skos/core#">
<skos:Concept rdf:about="http://aims.fao.org/aos/agrovoc/c_9513">
<skosxl:prefLabel>
<skosxl:Label rdf:about="http://aims.fao.org/aos/agrovoc/xl_en_1299487482019">
<skos:notation rdf:datatype="http://aims.fao.org/aos/agrovoc/AgrovocCode">9513</skos:notation>
</skosxl:Label>
</skosxl:prefLabel>
pp recent_document
#<SolrDocument:0x007f884b1096b0
@_source=
{"system_create_dtsi"=>"2017-01-25T22:53:07Z",
"system_modified_dtsi"=>Started GET "/users/notifications_number" for ::1 at 2017-01-26 11:27:28 -0500
"2017-01-25T22:53:15Z",Processing by UsersController#notifications_number as JSON
"has_model_ssim"=>["ReleaseWork"],
"id"=>"bc386j20b",
"accessControl_ssim"=>["b5d9c793-0591-4ab3-8ea4-09bd575f36be"],
$ rails new my_app -m https://raw.githubusercontent.com/projecthydra/sufia/master/template.rb
create
create README.md
create Rakefile
create config.ru
create .gitignore
create Gemfile
create app
create app/assets/config/manifest.js
create app/assets/javascripts/application.js
@elrayle
elrayle / anno_override_hasBody.rb
Last active August 2, 2016 16:43
Problems and potential workarounds for annotation's body being nil
# defined in Annotation
# NOTE: No class defined, so holds URI string only
property :hasBody, :predicate => RDF::Vocab::OA.hasBody
# in PRY
generic_annotation = Annotation.new(uri_or_str)
body_uri = generic_annotation.hasBody
body = ActiveTriples::Resource(body_uri)
body.statements # => []
Error
cannot load such file -- open3
/cul/web/cals-che-repo-dev.library.cornell.edu/rails-app/agriknowledge/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in `require'
/cul/web/cals-che-repo-dev.library.cornell.edu/rails-app/agriknowledge/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in `block in require'
/cul/web/cals-che-repo-dev.library.cornell.edu/rails-app/agriknowledge/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:238:in `block in load_dependency'
/cul/web/cals-che-repo-dev.library.cornell.edu/rails-app/agriknowledge/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:647:in `new_constants_in'
/cul/web/cals-che-repo-dev.library.cornell.edu/rails-app/agriknowledge/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:238:in `load_dependency'
/cul/web/cals-che-repo-dev.library.cornell.edu/ra