-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Provides support for Fedora 5 by testing both versions 4 and 5. Details: * Adds Fedora 5 compatibility flag FEDORA5_COMPAT (if set, changes behavior for Fedora 5.0) * Fixes UTC/localtime mismatch bug * Adds deprecation warnings if fedora_version is not set
- Loading branch information
Showing
15 changed files
with
377 additions
and
284 deletions.
There are no files selected for viewing
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
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# frozen_string_literal: true | ||
module FedoraHelper | ||
def fedora_adapter_config(base_path:, schema: nil, fedora_version: 4) | ||
port = fedora_version == 4 ? 8988 : 8998 | ||
opts = { | ||
base_path: base_path, | ||
connection: ::Ldp::Client.new("http://#{fedora_auth}localhost:#{port}/rest"), | ||
fedora_version: fedora_version | ||
} | ||
opts[:schema] = schema if schema | ||
opts | ||
end | ||
|
||
def fedora_auth | ||
"fedoraAdmin:fedoraAdmin@" | ||
end | ||
|
||
def wipe_fedora!(base_path:, fedora_version: 4) | ||
Valkyrie::Persistence::Fedora::MetadataAdapter.new(fedora_adapter_config(base_path: base_path, fedora_version: fedora_version)).persister.wipe! | ||
end | ||
end | ||
|
||
RSpec.configure do |config| | ||
config.before do | ||
wipe_fedora!(base_path: "test_fed", fedora_version: 4) | ||
wipe_fedora!(base_path: "test_fed", fedora_version: 5) | ||
end | ||
config.include FedoraHelper | ||
end |
This file was deleted.
Oops, something went wrong.
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
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
Oops, something went wrong.