Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/remove original file data #208

Merged
merged 10 commits into from
Aug 20, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,4 +103,7 @@ Lint/RaiseException:
Enabled: true

Lint/StructNewOverride:
Enabled: true
Enabled: true

RSpec/MultipleMemoizedHelpers:
Enabled: false
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Changelog
All notable changes to PushmiPullyu project will be documented in this file.

PushmiPullyu is a Ruby application, whose primary job is to manage the flow of content from [Jupiter](https://github.com/ualbertalib/jupiter/) into Swift for preservation.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and releases in PushmiPullyu adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

### Removed
- Data output for original_file information

## [1.0.6] - 2018-11-29
7 changes: 1 addition & 6 deletions lib/pushmi_pullyu/aip/downloader.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ class PushmiPullyu::AIP::Downloader
filename: 'http://purl.org/dc/terms/title',
member_files: 'http://pcdm.org/models#hasFile',
member_file_sets: 'http://pcdm.org/models#hasMember',
original_file: 'http://pcdm.org/use#OriginalFile',
type: 'http://www.w3.org/1999/02/22-rdf-syntax-ns#type'
}.freeze

Expand Down Expand Up @@ -49,8 +48,6 @@ def run
file_aip_path = file_aip_paths(file_uuid)
download_and_log(file_aip_path[:fixity_remote],
file_aip_path[:fixity_local])
download_and_log(file_aip_path[:original_file_remote],
file_aip_path[:original_file_local])
download_and_log(file_aip_path[:file_set_remote],
file_aip_path[:file_set_local])
end
Expand Down Expand Up @@ -210,9 +207,7 @@ def file_aip_paths(file_set_uuid)
fixity_remote: "#{object_uri}/filesets/#{file_set_uuid}/fixity",
fixity_local: "#{file_set_paths[:logs]}/content_fixity_report.n3",
file_set_remote: "#{object_uri}/filesets/#{file_set_uuid}",
file_set_local: "#{file_set_paths[:metadata]}/file_set_metadata.n3",
original_file_remote: "#{object_uri}/filesets/#{file_set_uuid}/original_file",
original_file_local: "#{file_set_paths[:metadata]}/original_file_metadata.n3"
file_set_local: "#{file_set_paths[:metadata]}/file_set_metadata.n3"
}.freeze
end

Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Binary file not shown.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Binary file removed spec/fixtures/storage/jf/KQ/jfKQSzhKRHrnfYAVY38htiZo
Binary file not shown.
Binary file removed spec/fixtures/storage/k7/hb/k7hb4VEsfoPXTab1W5iB6yXP
Binary file not shown.
Binary file not shown.
20 changes: 10 additions & 10 deletions spec/integration/acceptance_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

RSpec.describe 'Acceptance test', type: :feature do
let(:workdir) { 'tmp/spec' }
let(:uuid) { 'f8887612-1b11-49e1-84ea-d65738fb6874' }
let(:uuid) { 'e2ec88e3-3266-4e95-8575-8b04fac2a679' }
let(:type) { 'items' }
let(:json_redis_input) do
{
Expand Down Expand Up @@ -55,8 +55,8 @@
# Download data from Jupiter, bag and tar AIP directory and cleanup after block code
VCR.use_cassette('aip_download_and_swift_upload', erb:
{
file_path_1: './spec/fixtures/storage/k7/hb/k7hb4VEsfoPXTab1W5iB6yXP',
file_path_2: './spec/fixtures/storage/jf/KQ/jfKQSzhKRHrnfYAVY38htiZo'
file_path_1: './spec/fixtures/storage/vq/hs/vqhsul2p0c9ayxzspxx19vqo05zc',
file_path_2: './spec/fixtures/storage/qb/g4/qbg4mhpud4y7xmgjd4o3la20ggl2'
}) do
PushmiPullyu::AIP.create(entity) do |aip_filename|
expect(aip_file).to eq(aip_filename)
Expand Down Expand Up @@ -85,14 +85,14 @@
#{uuid} was successfully deposited into Swift Storage!
Here are the details of this preservation event:
\tUUID: '#{uuid}'
\tTimestamp of Completion: 'Mon, 16 Mar 2020 16:33:51 GMT'
\tAIP Checksum: '0f6559d2837eca20a09c7d7390baefdf'
\tTimestamp of Completion: 'Fri, 07 Aug 2020 20:59:14 GMT'
\tAIP Checksum: 'e2676cef279c9ad09c2d8369082f92da'
\tMetadata: {"project-id"=>"#{uuid}", "aip-version"=>"1.0", "promise"=>"bronze", "project"=>"ERA"}
\tFile Details:
HEREDOC

file_details_one = <<~HEREDOC
\t\t{"fileset_uuid": "52e24eae-6d74-4891-b1f0-ab7e57b43909",
\t\t{"fileset_uuid": "4dfb117e-a1af-4c16-b6c9-9c4e2ee70981",
\t\t"details": {
\t\t\t"file_name": "image-sample.jpeg",
\t\t\t"file_type": "jpeg",
Expand All @@ -101,11 +101,11 @@
HEREDOC

file_details_two = <<~HEREDOC
\t\t{"fileset_uuid": "457e230d-8e34-4016-8987-08c3ab95460d",
\t\t{"fileset_uuid": "5d043fa7-13b1-4367-a71b-dd13c37950bb",
\t\t"details": {
\t\t\t"file_name": "theses.jpg",
\t\t\t"file_type": "jpg",
\t\t\t"file_size": 51959
\t\t\t"file_name": "image-sample2.jpeg",
\t\t\t"file_type": "jpeg",
\t\t\t"file_size": 136784
\t\t}}
HEREDOC

Expand Down
Loading