zizia 4.6.0.alpha.01 → 5.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e474d50c1f6b1d4e15cc79ef9546a5f747c61e03cd6d85426ce6580c8c019f22
4
- data.tar.gz: f9da12668c3657384042f5e202814094720ec63b22608d1165fa08c306d633e5
3
+ metadata.gz: 7fad0abe5c6bf1fe0cc6a0b30796ae177c2a31ed19754a993f99c63ec9be0c45
4
+ data.tar.gz: 3bb2ecfbf5631aab6977eef92fa7290992c9c5f4888205a5bd5d08b4b2556507
5
5
  SHA512:
6
- metadata.gz: 9d602fbc263f0bc0dd8d231c93c6897e275ee195c2e19f00287c7d83af05810aac2f46551de43b21cc20f6f9918cfa826bafafce3fe175f371296284940d7fc9
7
- data.tar.gz: 5b3ff29ac96a0cc5c1f820fa4c6cb184dc4c78f07f11fc078309e2b01258a197ae84d77b75cd07ca5a1a4b6febae356b312971c532a2d486cd6da71c84ab9602
6
+ metadata.gz: b25da746966933d35138caa46190a4ef52bfa3cc4ac1dbba2353faa25bb000722e49cc95e688d55cb7625fd2a21c976b5a9a12e81ca4f048e866c4a9b9003e15
7
+ data.tar.gz: f86b5f9c298a81d4e21ec5e8c4e84797aa50c9e7a9c24694a981877f2dd28bde29dd02f40a30ff3593497ad08bee871e63738840a8c69bd9df802fa750d7c7f5
data/README.md CHANGED
@@ -2,13 +2,10 @@
2
2
 
3
3
  <table width="100%">
4
4
  <tr><td>
5
- <img alt="Zizia image" src="https://camo.githubusercontent.com/87eafa4a5b6a84802eab583e532bb33881b8a7ab/68747470733a2f2f7777772e706572766572646f6e6b2e636f6d2f77696c64253230666c6f776572732f506172736e69702f476f6c64656e253230416c6578616e646572732f323030383038253230476f6c64656e253230416c6578616e646572253230285a697a69612532306175726561292532302d2532304e47532532302d253230746865253230426f6f6b2532306f6625323057696c64253230466c6f776572732e6a7067" width="500px">
6
- </td><td>
7
-
8
- Object import for Hyrax. See the <a href="https://www.rubydoc.info/gems/zizia">API documentation</a> for more
9
- information. See the <a href="https://curationexperts.github.io/zizia/">Getting Started</a> guide for a gentle introduction.
10
- <br/><br/>
5
+ <img alt="Zizia image" src="https://camo.githubusercontent.com/87eafa4a5b6a84802eab583e532bb33881b8a7ab/68747470733a2f2f7777772e706572766572646f6e6b2e636f6d2f77696c64253230666c6f776572732f506172736e69702f476f6c64656e253230416c6578616e646572732f323030383038253230476f6c64656e253230416c6578616e646572253230285a697a69612532306175726561292532302d2532304e47532532302d253230746865253230426f6f6b2532306f6625323057696c64253230466c6f776572732e6a7067"?
6
+ </td><td width="50%">
11
7
 
8
+ Object import for Hyrax.
12
9
 
13
10
  [![Gem Version](https://badge.fury.io/rb/zizia.svg)](https://badge.fury.io/rb/zizia)
14
11
  [![CircleCI](https://circleci.com/gh/curationexperts/zizia.svg?style=svg)](https://circleci.com/gh/curationexperts/zizia)
@@ -21,6 +18,38 @@ information. See the <a href="https://curationexperts.github.io/zizia/">Getting
21
18
 
22
19
  In your project's `Gemfile`, add: `gem 'zizia'`, then run `bundle install`.
23
20
 
21
+ 1. Add the engine to `routes.rb`:
22
+ ```
23
+ mount Zizia::Engine => '/'
24
+ ```
25
+
26
+ 2. Add the helpers to the `ApplicationController`
27
+
28
+ ```
29
+ helper Zizia::Engine.helpers
30
+ ```
31
+
32
+ 3. Give admin users permission to import in your `Ability.custom_permissions`:
33
+
34
+ ```
35
+ can :manage, Zizia::CsvImport if current_user.admin?
36
+ can :manage, Zizia::CsvImportDetail if current_user.admin?
37
+ ```
38
+
39
+ 4. Add links to `/csv_imports/new` and `/importer_documentation/csv` in the Hyrax dashboard.
40
+
41
+ 5. In your Rails application's `application.css` and `application.js` include Zizia's assets:
42
+
43
+ ```
44
+ *= require zizia/application
45
+ ```
46
+
47
+ 6. Run `rake db:migrate`
48
+
49
+ The `spec/dummy` folder in this application is a complete Hyrax application with Zizia installed.
50
+ You can use that as an example for adding this to your current Hyrax application or copy that
51
+ to create a new application with Zizia installed.
52
+
24
53
  To do a basic Hyrax import, first ensure that a [work type is registered](http://www.rubydoc.info/github/samvera/hyrax/Hyrax/Configuration#register_curation_concern-instance_method)
25
54
  with your `Hyrax` application. Then write a class like this:
26
55
 
@@ -57,34 +86,6 @@ environment variables called `IMPORT_PATH`. If `IMPORT_PATH` is not set, `HyraxR
57
86
  To input any kind of file other than CSV, you need to provide a `Parser` (out of the box, we support simple CSV import with `CsvParser`). We will be writing guides about
58
87
  how to support custom mappers (for metadata outside of Hyrax's core and basic metadata fields).
59
88
 
60
- ## Hyrax User Interface
61
-
62
- Zizia can be installed as a Rails Engine in a Hyrax application. To use the Zizia UI in Hyrax:
63
-
64
- 1. Add the engine to `routes.rb`:
65
- ```
66
- mount Zizia::Engine => '/'
67
- ```
68
-
69
- 2. Add the helpers to the `ApplicationController`
70
-
71
- ```
72
- helper Zizia::Engine.helpers
73
- ```
74
-
75
- 3. Give admin users permission to import in your `Ability.custom_permissions`:
76
-
77
- ```
78
- can :manage, Zizia::CsvImport if current_user.admin?
79
- ```
80
-
81
- 4. Add links to `/csv_imports/new` and `/importer_documentation/csv` in the Hyrax dashboard
82
-
83
- The `spec/dummy` folder in this application is a complete Hyrax application with Zizia installed.
84
- You can use that as an example for adding this to your current Hyrax application or copy that
85
- to create a new application with Zizia installed.
86
-
87
-
88
89
  ## Development
89
90
 
90
91
  ```sh
@@ -94,9 +95,3 @@ cd zizia
94
95
  bundle install
95
96
  bundle exec rake ci
96
97
  ```
97
-
98
- ### RSpec Support
99
-
100
- This gem ships with RSpec shared examples and other support tools intended to ease testing and ensure
101
- interoperability of client code. These can be included by adding `require 'zizia/spec'` to a
102
- `spec_helper.rb` or `rails_helper.rb` file in your application's test suite.
@@ -0,0 +1,44 @@
1
+ .bullet {
2
+ background: black;
3
+ color: white;
4
+ border-radius: 0.8em;
5
+ -moz-border-radius: 0.8em;
6
+ -webkit-border-radius: 0.8em;
7
+ display: inline-block;
8
+ font-weight: bold;
9
+ line-height: 1.6em;
10
+ margin-right: 5px;
11
+ text-align: center;
12
+ width: 1.6em;
13
+ }
14
+
15
+ .well {
16
+ margin-bottom: 0.25em;
17
+ min-height: 5em;
18
+ h4 {
19
+ margin-top: 0;
20
+ .bullet {
21
+ float: left;
22
+ background: white;
23
+ color: black;
24
+ border: 1px solid #e3e3e3;
25
+ }
26
+ }
27
+ }
28
+
29
+ .no-collection {
30
+ background: #f7ecb5;
31
+ }
32
+
33
+ .step {
34
+ margin-top: -1em;
35
+ margin-bottom: .5em;
36
+ }
37
+
38
+ .zizia .btn {
39
+ width: 60%;
40
+ }
41
+
42
+ .zizia h3 {
43
+ margin-bottom: 1.5em;
44
+ }
@@ -1,5 +1,6 @@
1
1
  @import 'file_upload';
2
2
  @import 'field_guide';
3
+ @import 'new';
3
4
 
4
5
  .btn {
5
6
  white-space:normal !important;
@@ -17,7 +17,7 @@ has_model: "-- system field - not directly editable --"
17
17
  head: "-- system field - not directly editable --"
18
18
  identifier: "A unique handle identifying the work. An example would be a DOI for a journal article, or an ISBN or OCLC number for a book. Example: LC-U9-12470B-17"
19
19
  import_url: "-- system field - not directly editable --"
20
- keywords: "Words or phrases you select to describe what the work is about. Example: New Orleans or Music "
20
+ keyword: "Words or phrases you select to describe what the work is about. Example: New Orleans or Music "
21
21
  label: "-- system field - not directly editable --"
22
22
  language: "The language of the source content being described. Example: English"
23
23
  license: "Licensing and distribution information governing access to the work. This field is a URI. You can choose rights statements from this vocabulary (https://github.com/curationexperts/tenejo/blob/master/config/authorities/licenses.yml). Example: http://creativecommons.org/licenses/by/3.0/us/"
@@ -1,3 +1,3 @@
1
1
  <div class="actions">
2
- <%= form.submit 'Preview Import', class: "btn btn-primary btn-lg" %>
3
- </div>
2
+ <span class="glyphicon glyphicon-square-checkbox"></span><%= form.submit 'Preview Import', class: "btn btn-default btn-lg glyphicon glyphicon-square-checkbox" %>
3
+ </div>
@@ -1,3 +1 @@
1
- <div class="form-group">
2
- <%= form.select :fedora_collection_id, options_for_select(collections_for_select), {}, class: "form-control", id: "fedora_collection_id" %>
3
- </div>
1
+ <%= form.select :fedora_collection_id, options_for_select(collections_for_select), {}, class: "form-control", id: "fedora_collection_id" %>
@@ -1,3 +1,3 @@
1
1
  <%= form.file_field :manifest, required: true, id: 'file-upload', class: "file-upload form-control", onchange: "Zizia.displayUploadedFile()" %>
2
- <label for="file-upload" class="btn btn-lg btn-primary"><span class="glyphicon glyphicon-upload"></span> Upload Your CSV</label>
2
+ <label for="file-upload" class="btn btn-lg btn-default"><span class="glyphicon glyphicon-upload"></span> Upload Your CSV</label>
3
3
  <div id="file-upload-display"></div>
@@ -1,83 +1,101 @@
1
1
  <%= form_with(model: csv_import, local: true, html: { multipart: true }, url: preview_csv_import_path) do |form| %>
2
+ <%= form.hidden_field :manifest_cache %>
2
3
  <div class="panel panel-default">
3
4
  <div class="panel-body">
4
- <div class="row">
5
- <div class="col-md-8">
6
- <h2> Getting Started </h2>
7
- </div>
8
- </div>
9
5
  <div class="row">
10
6
  <div class="col-md-4">
11
- <div class="well well-lg">
12
- <p><b>Read the CSV Field Guide</b> to learn what is required in your CSV.</p>
7
+ <h3><span class="bullet">1</span> Prepare Your Content</h3>
8
+ <div class="well well-sm">
9
+ <h4><span class="bullet">A</span></h4>
10
+ <div class="step">
11
+ <b>Read the Metadata Field Guide</b> to learn what fields are available for import.
12
+ </div>
13
13
  <div class="text-center">
14
- <a href="/importer_documentation/guide" class="btn btn-default btn-lg"><i class="glyphicon glyphicon-book"></i> CSV Field Guide</a>
14
+ <a href="/importer_documentation/guide" class="btn btn-default btn-lg"><i class="glyphicon glyphicon-book"></i> Field Guide</a>
15
15
  </div>
16
16
  </div>
17
- </div>
18
- <div class="col-md-4">
19
- <div class="well well-lg">
20
- <p><b>Download a CSV template</b> to get started.</b></p>
17
+ <div class="well well-sm">
18
+ <h4><span class="bullet">B</span></h4>
19
+ <div class="step">
20
+ <b>Download a CSV template</b> and start filling in your metadata.
21
+ </div>
21
22
  <div class="text-center">
22
- <a href="/importer_documentation/csv" data-turbolinks="false" class="btn btn-default btn-lg"><i class="glyphicon glyphicon-list"></i> Download an Import Template</a>
23
+ <a href="/importer_documentation/csv" data-turbolinks="false" class="btn btn-default btn-lg"><i class="glyphicon glyphicon-list"></i> Import Template</a>
23
24
  </div>
24
25
  </div>
26
+ <div class="well well-sm">
27
+ <h4><span class="bullet">C</span></h4>
28
+ <div class="step">
29
+ <b>Upload your files</b> over SFTP, using a tool like <a href="https://filezilla-project.org">FileZilla</a> to transfer files.
30
+ </div>
31
+ </div>
25
32
  </div>
26
- </div>
27
- <hr/>
28
-
29
- <% if collections? %>
30
- <div class="row">
31
- <div class="col-md-8">
32
- <h2> Upload Your CSV </h2>
33
- </div>
34
- </div>
35
- <div class="row">
36
- <div class="col-md-4">
37
- <div class="well well-lg">
38
- <p> <b>Upload a CSV</b> that has your content. </p>
39
- <div class="text-center">
40
- <%= render "file_upload", form: form %>
33
+ <div class="col-md-4">
34
+ <h3><span class="bullet">2</span> Upload Your Files</h3>
35
+ <% if collections? %>
36
+ <div class="well well-sm">
37
+ <h4><span class="bullet">A</span></h4>
38
+ <div class="step">
39
+ <b>Upload a CSV</b> that lists the metadata and files you want to import.
41
40
  </div>
41
+ <div class="text-center">
42
+ <%= render "file_upload", form: form %>
43
+ </div>
42
44
  </div>
43
- </div>
44
- <div class="col-md-4">
45
- <div class="well well-lg">
46
- <p> <b>Choose a collection</b>. All imports need to be associated with a collection. </p>
47
- <div class="text-center">
48
- <%= render "collection_selection", form: form %>
45
+ <div class="well well-sm">
46
+ <h4><span class="bullet">B</span></h4>
47
+ <div class="step">
48
+ <b>Choose a collection</b> that you'd like your new works to be associated with.
49
49
  </div>
50
+ <div class="text-center">
51
+ <%= render "collection_selection", form: form %>
52
+ </div>
50
53
  </div>
51
- </div>
52
- <div class="col-md-4">
53
- <div class="well well-lg">
54
- <p> <b>Import Behavior</b>. Choose how you would like existing IDs to be handled.</p>
55
- <div class="text-center">
56
- <%= render "update_actor_stack", form: form %>
54
+ <div class="well well-sm">
55
+ <h4><span class="bullet">C</span></h4>
56
+ <div class="step">
57
+ <b>Select update behavior.</b> New works will always be added to the repository. Existing works can be overwritten, updated,
58
+ or ignored.
57
59
  </div>
60
+ <div class="text-center">
61
+ <%= render "update_actor_stack", form: form %>
62
+ </div>
58
63
  </div>
59
- </div>
60
- <div class="col-md-4">
61
- <div class="well well-lg">
62
- <p> <b>Preview your import</b> before starting the process. </p>
63
- <div class="text-center">
64
- <%= render "actions", form: form %>
64
+ <div class="well well-sm">
65
+ <h4><span class="bullet">D</span></h4>
66
+ <div class="step">
67
+ <b>Preview your import</b> and start the import if everything looks good.
68
+ or overwritten
65
69
  </div>
70
+ <div class="text-center">
71
+ <%= render "actions", form: form %>
72
+ </div>
66
73
  </div>
67
- </div>
74
+ <% else %>
75
+ <div class="well well-sm no-collection ">
76
+ <h4><span class="bullet">A</span></h4>
77
+ <div class="step">
78
+ You must <a href="/dashboard/collections">create a collection</a> before importing content.
79
+ </div>
80
+ </div>
81
+ <% end %>
68
82
  </div>
69
-
70
- <div class="row">
71
- <div class="col-md-4">
72
- <%= render "error", csv_import: csv_import %>
73
- </div>
74
- <div class="col-md-4">
83
+ <div class="col-md-4">
84
+ <h3><span class="bullet">3</span> Monitor Your Progress</h3>
85
+ <div class="well well-sm">
86
+ <h4><span class="bullet">A</span></h4>
87
+ <div class="step">
88
+ <b>Check the status</b> of batches that have been submitted for import.
89
+ </div>
90
+ <div class="text-center">
91
+ <a href="/csv_import_details/index" class="btn btn-default btn-lg"><i class="glyphicon glyphicon-roundabout"></i> Import History</a>
92
+ </div>
75
93
  </div>
76
94
  </div>
77
-
78
-
79
- <%= form.hidden_field :manifest_cache %>
80
- <% else %>
81
- <%= render 'no_collection' %>
82
- <% end %>
95
+ </div> <!-- row -->
96
+ <div class="row">
97
+ <%= render "error", csv_import: csv_import %>
98
+ </div> <!-- row -->
99
+ </div> <!-- panel-body -->
100
+ </div> <!-- panel -->
83
101
  <% end %>
@@ -1,5 +1,4 @@
1
- <div class="form-group">
2
- <%= form.select :update_actor_stack, options_for_select([['Update metadata for any existing IDs', 'HyraxMetadataOnly'],
3
- ['Only create works for new IDs', 'HyraxOnlyNew' ],
4
- ['Update metadata and files or create new works as required', 'HyraxDelete']]), {}, class: "form-control", id: "update_actor_stack_id" %>
5
- </div>
1
+ <%= form.select :update_actor_stack, options_for_select([['Overwrite All Files & Metadata', 'HyraxDelete'],
2
+ ['Update Existing Metadata, create new works', 'HyraxMetadataOnly'],
3
+ ['Ignore Existing Works, new works only', 'HyraxOnlyNew' ]]), {}, class: "form-control", id: "update_actor_stack_id" %>
4
+
@@ -1,3 +1,5 @@
1
1
  <%= javascript_include_tag 'zizia/application' %>
2
- <h2><span class="glyphicon glyphicon-cloud-upload"></span> Begin Your CSV Import </h2>
3
- <%= render 'form', csv_import: @csv_import %>
2
+ <div id="zizia_new" class="zizia">
3
+ <h2><span class="glyphicon glyphicon-cloud-upload"></span> Batch Import </h2>
4
+ <%= render 'form', csv_import: @csv_import %>
5
+ </div>
@@ -48,7 +48,7 @@
48
48
  </div>
49
49
  <div>
50
50
  <b>Required on Edit Form:</b>
51
- <%= detail[:required_on_form] %>
51
+ <%= true_false_to_yes_no(detail[:required_on_form]) %>
52
52
  </div>
53
53
  <div class=metadata_usage>
54
54
  <b>Usage:</b>
@@ -31,7 +31,7 @@ module Zizia
31
31
  ##
32
32
  # @return [Enumerable<Symbol>] The fields the mapper can process.
33
33
  def fields
34
- core_fields + basic_fields + [:visibility]
34
+ core_fields + basic_fields + [:visibility, :files]
35
35
  end
36
36
 
37
37
  # Properties defined with `multiple: false` in
@@ -131,18 +131,21 @@ module Zizia
131
131
  end
132
132
 
133
133
  # Properties defined in Hyrax::CoreMetadata
134
- # Note that date_uploaded is NOT set here, even though it is defined in
135
- # Hyrax::CoreMetadata. Hyrax expects to set date_uploaded itself, and
136
- # sending a metadata value for that field interferes with Hyrax expected
137
- # behavior.
134
+ # Note that depositor, date_uploaded and date_modified are NOT set here,
135
+ # even though they are defined in Hyrax::CoreMetadata.
136
+ # Hyrax expects to set these fields itself, and
137
+ # sending a metadata value for these fields interferes with
138
+ # Hyrax expected behavior.
138
139
  def core_fields
139
- [:depositor, :title, :date_modified]
140
+ [:title]
140
141
  end
141
142
 
142
143
  # Properties defined in Hyrax::BasicMetadata
144
+ # System related fields like :relative_path, and :import_url
145
+ # are not included here because we don't expect users to directly
146
+ # import them.
143
147
  def basic_fields
144
- [:label, :relative_path, :import_url,
145
- :resource_type, :creator, :contributor,
148
+ [:resource_type, :creator, :contributor,
146
149
  :description, :keyword, :license,
147
150
  :rights_statement, :publisher, :date_created,
148
151
  :subject, :language, :identifier,
data/lib/zizia/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Zizia
4
- VERSION = '4.6.0.alpha.01'
4
+ VERSION = '5.0.0'
5
5
  end
@@ -41,8 +41,10 @@ RSpec.describe 'Importing records from a CSV file', :perform_jobs, :clean, type:
41
41
  visit '/csv_imports/new'
42
42
  expect(page).to have_content 'Testing Collection'
43
43
  expect(page).not_to have_content '["Testing Collection"]'
44
- select 'Testing Collection', from: "csv_import[fedora_collection_id]"
44
+
45
45
  # Fill in and submit the form
46
+ select 'Testing Collection', from: "csv_import[fedora_collection_id]"
47
+ select 'Update Existing Metadata, create new works', from: "csv_import[update_actor_stack]"
46
48
  attach_file('csv_import[manifest]', csv_file, make_visible: true)
47
49
 
48
50
  expect(page).to have_content('You sucessfully uploaded this CSV: all_fields.csv')
@@ -104,6 +106,7 @@ RSpec.describe 'Importing records from a CSV file', :perform_jobs, :clean, type:
104
106
  expect(page).to have_content 'Testing Collection'
105
107
  expect(page).not_to have_content '["Testing Collection"]'
106
108
  select 'Testing Collection', from: "csv_import[fedora_collection_id]"
109
+ select 'Update Existing Metadata, create new works', from: "csv_import[update_actor_stack]"
107
110
 
108
111
  # Fill in and submit the form
109
112
  attach_file('csv_import[manifest]', csv_metadata_update_file, make_visible: true)
@@ -159,7 +162,7 @@ RSpec.describe 'Importing records from a CSV file', :perform_jobs, :clean, type:
159
162
  expect(page).not_to have_content '["Testing Collection"]'
160
163
  select 'Testing Collection', from: "csv_import[fedora_collection_id]"
161
164
 
162
- select 'Only create works for new IDs', from: 'csv_import[update_actor_stack]'
165
+ select 'Ignore Existing Works, new works only', from: 'csv_import[update_actor_stack]'
163
166
  # Fill in and submit the form
164
167
  attach_file('csv_import[manifest]', csv_only_new_file, make_visible: true)
165
168
 
@@ -206,7 +209,7 @@ RSpec.describe 'Importing records from a CSV file', :perform_jobs, :clean, type:
206
209
  expect(page).not_to have_content '["Testing Collection"]'
207
210
  select 'Testing Collection', from: "csv_import[fedora_collection_id]"
208
211
 
209
- select 'Update metadata and files or create new works as required', from: 'csv_import[update_actor_stack]'
212
+ select 'Overwrite All Files & Metadata', from: 'csv_import[update_actor_stack]'
210
213
  # Fill in and submit the form
211
214
  attach_file('csv_import[manifest]', csv_complete_update_file, make_visible: true)
212
215
 
@@ -9,6 +9,7 @@ shared_context 'with a work type' do
9
9
  class Work < ActiveFedora::Base
10
10
  attr_accessor :visibility
11
11
  attr_accessor :based_near_attributes
12
+ attr_accessor :files
12
13
  include ::Hyrax::CoreMetadata
13
14
  include ::Hyrax::BasicMetadata
14
15
  end
@@ -7,13 +7,12 @@ describe Zizia::HyraxBasicMetadataMapper do
7
7
 
8
8
  # Properties defined in Hyrax::CoreMetadata
9
9
  let(:core_fields) do
10
- [:depositor, :title, :date_modified]
10
+ [:title]
11
11
  end
12
12
 
13
13
  # Properties defined in Hyrax::BasicMetadata
14
14
  let(:basic_fields) do
15
- [:label, :relative_path, :import_url,
16
- :resource_type, :creator, :contributor,
15
+ [:resource_type, :creator, :contributor,
17
16
  :description, :keyword, :license,
18
17
  :rights_statement, :publisher, :date_created,
19
18
  :subject, :language, :identifier, :based_near,
@@ -21,7 +20,7 @@ describe Zizia::HyraxBasicMetadataMapper do
21
20
  end
22
21
 
23
22
  let(:tenejo_fields) do
24
- [:visibility]
23
+ [:visibility, :files]
25
24
  end
26
25
 
27
26
  it_behaves_like 'a Zizia::Mapper' do
@@ -35,8 +34,7 @@ describe Zizia::HyraxBasicMetadataMapper do
35
34
  context 'with metadata, but some missing fields' do
36
35
  before { mapper.metadata = metadata }
37
36
  let(:metadata) do
38
- { 'depositor' => 'someone@example.org',
39
- 'title' => 'A Title',
37
+ { 'title' => 'A Title',
40
38
  'language' => 'English' }
41
39
  end
42
40
 
@@ -44,16 +42,12 @@ describe Zizia::HyraxBasicMetadataMapper do
44
42
  expect(metadata).to include('title')
45
43
  expect(mapper).to respond_to(:title)
46
44
 
47
- expect(metadata).not_to include('label')
48
- expect(mapper).to respond_to(:label)
45
+ expect(metadata).not_to include('source')
46
+ expect(mapper).to respond_to(:source)
49
47
  end
50
48
 
51
49
  it 'returns single values for single-value fields' do
52
- expect(mapper.depositor).to eq 'someone@example.org'
53
- expect(mapper.date_modified).to eq nil
54
- expect(mapper.label).to eq nil
55
- expect(mapper.relative_path).to eq nil
56
- expect(mapper.import_url).to eq nil
50
+ expect(mapper.visibility).to eq 'restricted'
57
51
  end
58
52
 
59
53
  it 'returns array values for multi-value fields' do
@@ -91,12 +85,7 @@ describe Zizia::HyraxBasicMetadataMapper do
91
85
  { 'Title' => 'A Title',
92
86
  'Related URL' => 'http://example.com',
93
87
  'Abstract or Summary' => 'desc1|~|desc2',
94
- 'visiBILITY' => 'open',
95
- 'Depositor' => 'someone@example.org',
96
- 'DATE_modified' => 'mod date',
97
- 'laBel' => 'label',
98
- 'relative_PATH' => 'rel path',
99
- 'import_URL' => 'imp url' }
88
+ 'visiBILITY' => 'open' }
100
89
  end
101
90
 
102
91
  it 'matches the correct fields' do
@@ -105,11 +94,6 @@ describe Zizia::HyraxBasicMetadataMapper do
105
94
  expect(mapper.description).to eq ['desc1', 'desc2']
106
95
  expect(mapper.creator).to eq []
107
96
  expect(mapper.visibility).to eq 'open'
108
- expect(mapper.depositor).to eq 'someone@example.org'
109
- expect(mapper.date_modified).to eq 'mod date'
110
- expect(mapper.label).to eq 'label'
111
- expect(mapper.relative_path).to eq 'rel path'
112
- expect(mapper.import_url).to eq 'imp url'
113
97
  end
114
98
  end
115
99
 
@@ -184,7 +168,7 @@ describe Zizia::HyraxBasicMetadataMapper do
184
168
  end
185
169
 
186
170
  it 'doesn\'t raise an error for missing fields' do
187
- expect(mapper.depositor).to eq nil
171
+ expect(mapper.source).to eq []
188
172
  end
189
173
  end
190
174
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zizia
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.6.0.alpha.01
4
+ version: 5.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Data Curation Experts
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-10-15 00:00:00.000000000 Z
11
+ date: 2019-10-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: active-fedora
@@ -656,6 +656,7 @@ files:
656
656
  - app/assets/javascripts/zizia/zizia.js
657
657
  - app/assets/stylesheets/zizia/_field_guide.scss
658
658
  - app/assets/stylesheets/zizia/_file_upload.scss
659
+ - app/assets/stylesheets/zizia/_new.scss
659
660
  - app/assets/stylesheets/zizia/application.css
660
661
  - app/assets/stylesheets/zizia/zizia.scss
661
662
  - app/config/zizia/usage.yml
@@ -1546,9 +1547,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
1546
1547
  version: 2.3.4
1547
1548
  required_rubygems_version: !ruby/object:Gem::Requirement
1548
1549
  requirements:
1549
- - - ">"
1550
+ - - ">="
1550
1551
  - !ruby/object:Gem::Version
1551
- version: 1.3.1
1552
+ version: '0'
1552
1553
  requirements: []
1553
1554
  rubygems_version: 3.0.6
1554
1555
  signing_key: