zizia 4.5.4.alpha.01 → 4.6.0.alpha.01

Sign up to get free protection for your applications and to get access to all the features.
Files changed (33) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -9
  3. data/app/assets/stylesheets/zizia/_field_guide.scss +10 -0
  4. data/app/assets/stylesheets/zizia/zizia.scss +1 -0
  5. data/app/config/zizia/usage.yml +39 -0
  6. data/app/controllers/zizia/csv_import_details_controller.rb +3 -0
  7. data/app/controllers/zizia/metadata_details_controller.rb +3 -0
  8. data/app/helpers/zizia/metadata_details_helper.rb +22 -0
  9. data/app/lib/zizia/metadata_details.rb +45 -13
  10. data/app/lib/zizia/metadata_usage.rb +3 -3
  11. data/app/views/zizia/metadata_details/show.html.erb +21 -10
  12. data/lib/zizia/version.rb +1 -1
  13. data/spec/controllers/metadata_details_spec.rb +18 -2
  14. data/spec/dummy/app/assets/stylesheets/application.css +1 -0
  15. data/spec/dummy/app/models/ability.rb +2 -0
  16. data/spec/dummy/public/assets/.sprockets-manifest-6a791b26afc0064d45ad6c9c7834c971.json +1 -1
  17. data/spec/dummy/public/assets/application-2ccde71ce94afc831e097399d88f233e622dcde6c13b1e55328492cbd74652e1.css +20020 -0
  18. data/spec/dummy/public/assets/application-2ccde71ce94afc831e097399d88f233e622dcde6c13b1e55328492cbd74652e1.css.gz +0 -0
  19. data/spec/dummy/public/assets/application-c2d24435e1dfeb4513665fe5fcf77c4d82a771af39242801a0de2c9d11420110.css +20026 -0
  20. data/spec/dummy/public/assets/application-c2d24435e1dfeb4513665fe5fcf77c4d82a771af39242801a0de2c9d11420110.css.gz +0 -0
  21. data/spec/dummy/public/assets/application-cd56066ec179de033c8cb72c47bce15d0bb303f8ae84e40b1f9bb458c69f1984.js +91589 -0
  22. data/spec/dummy/public/assets/application-cd56066ec179de033c8cb72c47bce15d0bb303f8ae84e40b1f9bb458c69f1984.js.gz +0 -0
  23. data/spec/dummy/public/assets/browse_everything-9a6b1be24c1637c3d3f401209ba92f08bdfb31283b7535e3fc00767f7fd33f30.css +12766 -0
  24. data/spec/dummy/public/assets/browse_everything-9a6b1be24c1637c3d3f401209ba92f08bdfb31283b7535e3fc00767f7fd33f30.css.gz +0 -0
  25. data/spec/dummy/public/assets/zizia/application-1a6b5ed6492ec1d1f55182cb261f6a41ca34efc8f0718afdb8c69691de071e87.css +60 -0
  26. data/spec/dummy/public/assets/zizia/application-1a6b5ed6492ec1d1f55182cb261f6a41ca34efc8f0718afdb8c69691de071e87.css.gz +0 -0
  27. data/spec/dummy/public/assets/zizia/application-a0041cb295da9e33e213c36cdb7974af70df2bdf636cdca13f10122ac35a78ec.css +54 -0
  28. data/spec/dummy/public/assets/zizia/application-a0041cb295da9e33e213c36cdb7974af70df2bdf636cdca13f10122ac35a78ec.css.gz +0 -0
  29. data/spec/dummy/spec/system/csv_import_details_page_spec.rb +18 -1
  30. data/spec/dummy/spec/system/import_from_csv_spec.rb +1 -2
  31. data/spec/dummy/spec/system/metadata_details_page_spec.rb +16 -2
  32. metadata +17 -4
  33. data/app/config/usage.yml +0 -31
@@ -0,0 +1,60 @@
1
+ /* line 1, /home/bess/projects/zizia/app/assets/stylesheets/zizia/_file_upload.scss */
2
+ .file-upload {
3
+ width: 0.1px;
4
+ height: 0.1px;
5
+ opacity: 0;
6
+ overflow: hidden;
7
+ position: absolute;
8
+ z-index: -1;
9
+ }
10
+
11
+ /* line 10, /home/bess/projects/zizia/app/assets/stylesheets/zizia/_file_upload.scss */
12
+ .file-upload + label {
13
+ margin-bottom: 1em;
14
+ }
15
+
16
+ /* line 14, /home/bess/projects/zizia/app/assets/stylesheets/zizia/_file_upload.scss */
17
+ .file-upload:focus + label {
18
+ outline: 1px dotted #000;
19
+ outline: -webkit-focus-ring-color auto 5px;
20
+ }
21
+
22
+ /* line 1, /home/bess/projects/zizia/app/assets/stylesheets/zizia/_field_guide.scss */
23
+ .system-field {
24
+ display: none;
25
+ }
26
+
27
+ /* line 2, /home/bess/projects/zizia/app/assets/stylesheets/zizia/_field_guide.scss */
28
+ .field-guide-intro {
29
+ margin-top: 1em;
30
+ margin-bottom: 1em;
31
+ font-size: large;
32
+ }
33
+
34
+ /* line 7, /home/bess/projects/zizia/app/assets/stylesheets/zizia/_field_guide.scss */
35
+ .delimiter {
36
+ font-weight: 800;
37
+ font-family: monospace;
38
+ }
39
+
40
+ /* line 4, /home/bess/projects/zizia/app/assets/stylesheets/zizia/zizia.scss */
41
+ .btn {
42
+ white-space: normal !important;
43
+ word-wrap: break-word;
44
+ }
45
+ /*
46
+ * This is a manifest file that'll be compiled into application.css, which will include all the files
47
+ * listed below.
48
+ *
49
+ * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
50
+ * or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path.
51
+ *
52
+ * You're free to add application-wide styles to this file and they'll appear at the bottom of the
53
+ * compiled file so the styles you add here take precedence over styles defined in any other CSS/SCSS
54
+ * files in this directory. Styles in this file should be added after the last require_* statement.
55
+ * It is generally better to create a new file per style scope.
56
+ *
57
+
58
+
59
+ */
60
+
@@ -0,0 +1,54 @@
1
+ /* line 1, /home/bess/projects/zizia/app/assets/stylesheets/zizia/_file_upload.scss */
2
+ .file-upload {
3
+ width: 0.1px;
4
+ height: 0.1px;
5
+ opacity: 0;
6
+ overflow: hidden;
7
+ position: absolute;
8
+ z-index: -1;
9
+ }
10
+
11
+ /* line 10, /home/bess/projects/zizia/app/assets/stylesheets/zizia/_file_upload.scss */
12
+ .file-upload + label {
13
+ margin-bottom: 1em;
14
+ }
15
+
16
+ /* line 14, /home/bess/projects/zizia/app/assets/stylesheets/zizia/_file_upload.scss */
17
+ .file-upload:focus + label {
18
+ outline: 1px dotted #000;
19
+ outline: -webkit-focus-ring-color auto 5px;
20
+ }
21
+
22
+ /* line 1, /home/bess/projects/zizia/app/assets/stylesheets/zizia/_field_guide.scss */
23
+ .system-field {
24
+ display: none;
25
+ }
26
+
27
+ /* line 2, /home/bess/projects/zizia/app/assets/stylesheets/zizia/_field_guide.scss */
28
+ .field-guide-intro {
29
+ margin-top: 1em;
30
+ margin-bottom: 1em;
31
+ font-size: large;
32
+ }
33
+
34
+ /* line 4, /home/bess/projects/zizia/app/assets/stylesheets/zizia/zizia.scss */
35
+ .btn {
36
+ white-space: normal !important;
37
+ word-wrap: break-word;
38
+ }
39
+ /*
40
+ * This is a manifest file that'll be compiled into application.css, which will include all the files
41
+ * listed below.
42
+ *
43
+ * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
44
+ * or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path.
45
+ *
46
+ * You're free to add application-wide styles to this file and they'll appear at the bottom of the
47
+ * compiled file so the styles you add here take precedence over styles defined in any other CSS/SCSS
48
+ * files in this directory. Styles in this file should be added after the last require_* statement.
49
+ * It is generally better to create a new file per style scope.
50
+ *
51
+
52
+
53
+ */
54
+
@@ -1,18 +1,35 @@
1
1
  require 'rails_helper'
2
+ include Warden::Test::Helpers
2
3
 
3
4
  RSpec.describe 'viewing the csv import detail page' do
4
- let(:user) { FactoryBot.create(:user) }
5
5
  let(:csv_import) { FactoryBot.create(:csv_import) }
6
6
  let(:csv_import_detail) { FactoryBot.create(:csv_import_detail) }
7
+ let(:user) { FactoryBot.create(:admin) }
7
8
 
8
9
  it 'displays the metadata when you visit the page' do
9
10
  user.save
10
11
  csv_import.user_id = user.id
11
12
  csv_import.save
12
13
  csv_import_detail.save
14
+ login_as user
15
+
13
16
  visit ('/csv_import_details/index')
14
17
  expect(page).to have_content('CSV Imports ID')
15
18
  click_on '1'
16
19
  expect(page).to have_content('Total Size')
17
20
  end
21
+
22
+ it 'has the dashboard layout' do
23
+ user.save
24
+ csv_import.user_id = user.id
25
+ csv_import.save
26
+ csv_import_detail.save
27
+ login_as user
28
+
29
+ visit ('/csv_import_details/index')
30
+ expect(page).to have_content('Your activity')
31
+ visit ('csv_import_details/show/1')
32
+ expect(page).to have_content('About the Import')
33
+ expect(page).to have_content('Your activity')
34
+ end
18
35
  end
@@ -240,11 +240,10 @@ RSpec.describe 'Importing records from a CSV file', :perform_jobs, :clean, type:
240
240
  expect(work.title.first).to match(/Interior/)
241
241
  expect(work.file_sets.first.label).to eq('cat.jpg')
242
242
 
243
-
244
243
  # Viewing additional details after an import
245
244
  visit "/csv_import_details/index"
246
245
  expect(page).to have_content('Total Size')
247
- find(:xpath, '//*[@id="content-wrapper"]/table/tbody/tr[2]/td[1]/a').click
246
+ find(:xpath, '//*[@id="content-wrapper"]/div[2]/table/tbody/tr[2]/td[1]/a').click
248
247
  expect(page).to have_content('dog.jpg')
249
248
  expect(page).to have_content('5.74 MB')
250
249
  end
@@ -6,7 +6,21 @@ RSpec.describe 'Viewing the field guide' do
6
6
  it 'renders correctly' do
7
7
  visit('/importer_documentation/guide')
8
8
  expect(page).to have_content('title')
9
- expect(page).to have_content('The name of the resource being described. The title may either be transcribed from the resource itself, or it may need to be created.')
10
- expect(page).to have_content('-- system field - not directly editable --')
9
+ expect(page).to have_content('A name to aid in identifying a work.')
10
+ expect(page).not_to have_content('-- system field - not directly editable --')
11
+ end
12
+ it 'labels system fields and they are not visible' do
13
+ visit('/importer_documentation/guide')
14
+ expect(page.first('div.system-field', visible: false).class).to eq Capybara::Node::Element
15
+ end
16
+
17
+ it 'uses yes/no instead of true/false for multiple values' do
18
+ visit('/importer_documentation/guide')
19
+ expect(page).to have_content('Multiple values accepted: yes')
20
+ end
21
+
22
+ it 'displays the configured delimiter' do
23
+ visit('/importer_documentation/guide')
24
+ expect(page).to have_content('|~|')
11
25
  end
12
26
  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.5.4.alpha.01
4
+ version: 4.6.0.alpha.01
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-04 00:00:00.000000000 Z
11
+ date: 2019-10-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: active-fedora
@@ -654,10 +654,11 @@ files:
654
654
  - app/assets/javascripts/zizia/DisplayUploadedFile.es6
655
655
  - app/assets/javascripts/zizia/application.js
656
656
  - app/assets/javascripts/zizia/zizia.js
657
+ - app/assets/stylesheets/zizia/_field_guide.scss
657
658
  - app/assets/stylesheets/zizia/_file_upload.scss
658
659
  - app/assets/stylesheets/zizia/application.css
659
660
  - app/assets/stylesheets/zizia/zizia.scss
660
- - app/config/usage.yml
661
+ - app/config/zizia/usage.yml
661
662
  - app/controllers/zizia/csv_import_details_controller.rb
662
663
  - app/controllers/zizia/csv_imports_controller.rb
663
664
  - app/controllers/zizia/importer_documentation_controller.rb
@@ -957,8 +958,14 @@ files:
957
958
  - spec/dummy/public/assets/.sprockets-manifest-6a791b26afc0064d45ad6c9c7834c971.json
958
959
  - spec/dummy/public/assets/application-19a48f32b51ff0cbcf36875591de326026d5594d66e05aa640bd3ad61cc96f9e.js
959
960
  - spec/dummy/public/assets/application-19a48f32b51ff0cbcf36875591de326026d5594d66e05aa640bd3ad61cc96f9e.js.gz
961
+ - spec/dummy/public/assets/application-2ccde71ce94afc831e097399d88f233e622dcde6c13b1e55328492cbd74652e1.css
962
+ - spec/dummy/public/assets/application-2ccde71ce94afc831e097399d88f233e622dcde6c13b1e55328492cbd74652e1.css.gz
963
+ - spec/dummy/public/assets/application-c2d24435e1dfeb4513665fe5fcf77c4d82a771af39242801a0de2c9d11420110.css
964
+ - spec/dummy/public/assets/application-c2d24435e1dfeb4513665fe5fcf77c4d82a771af39242801a0de2c9d11420110.css.gz
960
965
  - spec/dummy/public/assets/application-c66e5ddf197c4624336180640f7928a84eece4ef5868c26d430e6e45c9a83ae3.css
961
966
  - spec/dummy/public/assets/application-c66e5ddf197c4624336180640f7928a84eece4ef5868c26d430e6e45c9a83ae3.css.gz
967
+ - spec/dummy/public/assets/application-cd56066ec179de033c8cb72c47bce15d0bb303f8ae84e40b1f9bb458c69f1984.js
968
+ - spec/dummy/public/assets/application-cd56066ec179de033c8cb72c47bce15d0bb303f8ae84e40b1f9bb458c69f1984.js.gz
962
969
  - spec/dummy/public/assets/audio-5133b642ee875760dbd85bfab48649d009efd4bd29db1165f891b48a90b4f37e.png
963
970
  - spec/dummy/public/assets/blacklight/gallery/view-icon-masonry-94cb2f417ca00047d6e4603644bebaa67037ef9b3efcc9c95b42229c1c571345.png
964
971
  - spec/dummy/public/assets/blacklight/gallery/view-icon-masonry@2x-da61b9e430c6b3f007aaa8073c062b147c909746c254f0adb81eaf476dc1a26d.png
@@ -975,6 +982,8 @@ files:
975
982
  - spec/dummy/public/assets/browse_everything-0bc39e0e4f7158f7de0b75f0bf1cffee0dc75901e8a0d1ab62fe57615ae92903.css.gz
976
983
  - spec/dummy/public/assets/browse_everything-771abc13184782ddcdb092a916b42013516bb8d172351e1c6415c293c556118f.js
977
984
  - spec/dummy/public/assets/browse_everything-771abc13184782ddcdb092a916b42013516bb8d172351e1c6415c293c556118f.js.gz
985
+ - spec/dummy/public/assets/browse_everything-9a6b1be24c1637c3d3f401209ba92f08bdfb31283b7535e3fc00767f7fd33f30.css
986
+ - spec/dummy/public/assets/browse_everything-9a6b1be24c1637c3d3f401209ba92f08bdfb31283b7535e3fc00767f7fd33f30.css.gz
978
987
  - spec/dummy/public/assets/collection-a38b932554788aa578debf2319e8c4ba8a7db06b3ba57ecda1391a548a4b6e0a.png
979
988
  - spec/dummy/public/assets/dataTables/back_disabled-6950463a4f9db9435b8df01fa276eaf88aa65b8913b82e979317d741305bb5d6.png
980
989
  - spec/dummy/public/assets/dataTables/back_enabled-9fd6f47b90ca92e855bdf80a0d57178af3a59c307e5c0246bb24dc781d3ae69b.png
@@ -1398,8 +1407,12 @@ files:
1398
1407
  - spec/dummy/public/assets/us_404-97e5b45f27bdb92b864434b6bfe96c248456caea17e9a18b4b671c803ea7db4d.svg
1399
1408
  - spec/dummy/public/assets/us_404-97e5b45f27bdb92b864434b6bfe96c248456caea17e9a18b4b671c803ea7db4d.svg.gz
1400
1409
  - spec/dummy/public/assets/work-ff055336041c3f7d310ad69109eda4a887b16ec501f35afc0a547c4adb97ee72.png
1410
+ - spec/dummy/public/assets/zizia/application-1a6b5ed6492ec1d1f55182cb261f6a41ca34efc8f0718afdb8c69691de071e87.css
1411
+ - spec/dummy/public/assets/zizia/application-1a6b5ed6492ec1d1f55182cb261f6a41ca34efc8f0718afdb8c69691de071e87.css.gz
1401
1412
  - spec/dummy/public/assets/zizia/application-506279a2a8261b6dfdd8753ef894af0a53a1a04c7a71036110ed2ba9f437da99.js
1402
1413
  - spec/dummy/public/assets/zizia/application-506279a2a8261b6dfdd8753ef894af0a53a1a04c7a71036110ed2ba9f437da99.js.gz
1414
+ - spec/dummy/public/assets/zizia/application-a0041cb295da9e33e213c36cdb7974af70df2bdf636cdca13f10122ac35a78ec.css
1415
+ - spec/dummy/public/assets/zizia/application-a0041cb295da9e33e213c36cdb7974af70df2bdf636cdca13f10122ac35a78ec.css.gz
1403
1416
  - spec/dummy/public/assets/zizia/application-a61ffbc929539843842d2e6e212160fa843847f8ae69f706ca83535eddc24737.css
1404
1417
  - spec/dummy/public/assets/zizia/application-a61ffbc929539843842d2e6e212160fa843847f8ae69f706ca83535eddc24737.css.gz
1405
1418
  - spec/dummy/public/assets/zotero-d6a884dbda40a61ac3a10f27c39592de33ec305bdb035859db6fd5dd2f47fc73.png
@@ -1537,7 +1550,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
1537
1550
  - !ruby/object:Gem::Version
1538
1551
  version: 1.3.1
1539
1552
  requirements: []
1540
- rubygems_version: 3.0.3
1553
+ rubygems_version: 3.0.6
1541
1554
  signing_key:
1542
1555
  specification_version: 4
1543
1556
  summary: Hyrax importers.
data/app/config/usage.yml DELETED
@@ -1,31 +0,0 @@
1
- ---
2
- # Metadata usage hints
3
- # attribute: usage
4
-
5
- arkivo_checksum: "-- system field - not directly editable --"
6
- based_near: " A location that something is based near, for some broadly human notion of near."
7
- contributor: "Identifies contributors to the material; can be used very broadly if exact contributions aren't known"
8
- create_date: "-- system field - not directly editable --"
9
- creator: "Identifies the primary Creator(s) of the material"
10
- date_created: "The date the material was created"
11
- date_modified: "-- system field - not directly editable --"
12
- date_uploaded: "-- system field - not directly editable --"
13
- depositor: "-- system field - not directly editable --"
14
- description: "Free-text, summary description of the content, such as an abstract. Provides additional search terms in natural language; provides important summary information for non-textual resources such as images, audio, and video"
15
- has_model: "-- system field - not directly editable --"
16
- head: "-- system field - not directly editable --"
17
- identifier: "An unambiguous reference to the resource within a given context."
18
- keywords: "Uncontrolled keywords describing the material, often provided by content creators"
19
- language: "The language of the source content being described: applies to textual or spoken word (linguistic) content"
20
- license: "A legal document giving official permission to do something with the resource."
21
- on_behalf_of: "-- system field - not directly editable --"
22
- owner: "-- system field - not directly editable --"
23
- proxy_depositor: "-- system field - not directly editable --"
24
- publisher: "The name of the entity formally publishing the work"
25
- related_url: "The resource O may provide additional information about S. It may be possible to retrieve representations of O from the Web, but this is not required. When such representations may be retrieved, no constraints are placed on the format of those representations."
26
- resource_type: "The nature or genre of the resource."
27
- rights_statement: "Standardized rights statement from rightsstatements.org that can be used to communicate the copyright and re-use status of digital objects to the end users [DESCRIPTIVE/USER FACING]"
28
- source: "A related resource from which the described resource is derived."
29
- state: "-- system field - not directly editable --"
30
- tail: "-- system field - not directly editable --"
31
- title: "The name of the resource being described. The title may either be transcribed from the resource itself, or it may need to be created."