Bring tests from jupiter into oaisys with required changes/additions#58
Bring tests from jupiter into oaisys with required changes/additions#58ConnorSheremeta wants to merge 14 commits intomainfrom
Conversation
There was a problem hiding this comment.
I suspect that we can setup the tests with a simpler dummy application.
Starting here:
# test/dummy/config/initializers/dummy.rb
Rails.application.config.after_initialize do
Oaisys::Engine.config.oai_dc_model = Item
Oaisys::Engine.config.oai_etdms_model = Thesis
Oaisys::Engine.config.top_level_sets_model = Community
Oaisys::Engine.config.set_model = Collection
end
Then we can use the model generator to create the Item, Thesis, Collection and Community.
For example the Thesis needs all of the things for the OaiEtdms serializer
rails g model Thesis title:string creator:string subject:string description:string contributor:string date:date type:string language:string rights:string publisher:string degree_name:string degree_level:string discipline:string institution:string member_of_paths:json
Then we can move the resulting files into the dummy application and finish setting up the model
class Thesis < ActiveRecord::Base
acts_as_rdfable formats: :oai_etdms
singleton_class.send(:alias_method, :public_items, :all)
end
We might have to setup a couple more details like kaminari for pagination (page) and uuids for the id.
Keep going with only the minimum for the other models.
|
|
||
| def bad_verb | ||
| bad_verb = params.permit(:verb).to_h[:verb] | ||
| bad_verb = params.permit(:verb, :subdomain).to_h[:verb] |
There was a problem hiding this comment.
Is this a bug in the current release?
oaisys.gemspec
Outdated
| spec.summary = 'OAI-PMH engine' | ||
| spec.description = "Jupiter's engine for Open Archives Initiative Protocol for Metadata Harvesting" | ||
| spec.license = 'MIT' | ||
| spec.required_ruby_version = '2.6.6' |
There was a problem hiding this comment.
| @@ -0,0 +1,107 @@ | |||
| require 'test_helper' | |||
|
|
|||
| class OaisysListSetsTest < ActionDispatch::IntegrationTest | |||
There was a problem hiding this comment.
This looks like it works without any changes to the Dummy application!
pgwillia
left a comment
There was a problem hiding this comment.
I suspect that we can setup the tests with a simpler dummy application.
Starting here:
# test/dummy/config/initializers/dummy.rb Rails.application.config.after_initialize do Oaisys::Engine.config.oai_dc_model = Item Oaisys::Engine.config.oai_etdms_model = Thesis Oaisys::Engine.config.top_level_sets_model = Community Oaisys::Engine.config.set_model = Collection endThen we can use the model generator to create the Item, Thesis, Collection and Community.
For example the Thesis needs all of the things for the OaiEtdms serializer
rails g model Thesis title:string creator:string subject:string description:string contributor:string date:date type:string language:string rights:string publisher:string degree_name:string degree_level:string discipline:string institution:string member_of_paths:jsonThen we can move the resulting files into the dummy application and finish setting up the model
class Thesis < ActiveRecord::Base acts_as_rdfable formats: :oai_etdms singleton_class.send(:alias_method, :public_items, :all) endWe might have to setup a couple more details like kaminari for pagination (
page) and uuids for the id.Keep going with only the minimum for the other models.
I feel like there might still be some extra stuff in the dummy application. What is important to oaisys about the search exporters, validations, and depositable and doiable behaviours?
| id: yarn-cache | ||
| run: echo "::set-output name=dir::$(yarn cache dir)" | ||
|
|
||
| - name: Setup redis |
| gem 'aasm' # state-machine management | ||
| gem 'paper_trail' # Track object changes |
There was a problem hiding this comment.
Are these necessary for oaisys?
| @@ -0,0 +1,5 @@ | |||
| module Digitization | |||
No description provided.