sufia 3.5.0 → 3.6.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.
Files changed (103) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +0 -3
  3. data/.travis.yml +4 -4
  4. data/README.md +1 -10
  5. data/SUFIA_VERSION +1 -1
  6. data/app/assets/images/audio.png +0 -0
  7. data/app/assets/javascripts/sufia/trophy.js +11 -5
  8. data/app/controllers/single_use_links_controller.rb +11 -1
  9. data/app/helpers/facets_helper.rb +3 -0
  10. data/app/helpers/sufia/facets_helper_behavior.rb +23 -0
  11. data/app/helpers/sufia_helper.rb +3 -21
  12. data/app/views/dashboard/_facet_limit.html.erb +2 -20
  13. data/app/views/dashboard/_index_partials/_thumbnail_display.html.erb +4 -2
  14. data/app/views/generic_files/_descriptions.html.erb +2 -18
  15. data/app/views/generic_files/_field_form.html.erb +7 -2
  16. data/app/views/generic_files/_media_display.html.erb +0 -16
  17. data/app/views/generic_files/_permission.html.erb +1 -17
  18. data/app/views/generic_files/_permission_form.html.erb +1 -1
  19. data/app/views/generic_files/_show_actions.html.erb +1 -8
  20. data/app/views/generic_files/_versioning.html.erb +1 -17
  21. data/app/views/generic_files/edit.html.erb +1 -17
  22. data/app/views/mailbox/index.html.erb +5 -3
  23. data/app/views/users/_activity.html.erb +3 -0
  24. data/app/views/users/_activity_log.html.erb +1 -17
  25. data/app/views/users/_contributions.html.erb +29 -0
  26. data/app/views/users/_follower_modal.html.erb +26 -0
  27. data/app/views/users/_following_modal.html.erb +26 -0
  28. data/app/views/users/_left_sidebar.html.erb +12 -0
  29. data/app/views/users/_notify_number.html.erb +0 -16
  30. data/app/views/users/_profile.html.erb +7 -0
  31. data/app/views/users/_profile_actions.html.erb +11 -0
  32. data/app/views/users/_profile_tabs.html.erb +11 -0
  33. data/app/views/users/_search_form.html.erb +1 -17
  34. data/app/views/users/_social_media_info.html.erb +20 -0
  35. data/app/views/users/_user_info.html.erb +0 -16
  36. data/app/views/users/_vitals.html.erb +4 -0
  37. data/app/views/users/edit.html.erb +1 -17
  38. data/app/views/users/index.html.erb +0 -16
  39. data/app/views/users/notifications_number.js.erb +0 -16
  40. data/app/views/users/show.html.erb +21 -58
  41. data/lib/sufia.rb +1 -3
  42. data/lib/sufia/controller.rb +0 -6
  43. data/lib/sufia/version.rb +1 -1
  44. data/spec/controllers/batch_edits_controller_spec.rb +8 -2
  45. data/spec/controllers/generic_files_controller_spec.rb +8 -28
  46. data/spec/controllers/single_use_links_controller_spec.rb +26 -2
  47. data/spec/factories/generic_files.rb +46 -0
  48. data/spec/factories/users.rb +6 -2
  49. data/spec/features/browse_dashboard_files_spec.rb +39 -0
  50. data/spec/features/browse_files_spec.rb +30 -0
  51. data/spec/features/{contact_form.rb → contact_form_spec.rb} +1 -1
  52. data/spec/features/{display_dashboard.rb → display_dashboard_spec.rb} +1 -7
  53. data/spec/features/{ingest_upload_files.rb → ingest_upload_files_spec.rb} +2 -2
  54. data/spec/features/notifications_spec.rb +20 -0
  55. data/spec/features/users_spec.rb +12 -0
  56. data/spec/helpers/sufia_helper_spec.rb +23 -0
  57. data/spec/lib/sufia/id_service_spec.rb +0 -38
  58. data/spec/support/features.rb +2 -0
  59. data/spec/support/features/session_helpers.rb +9 -1
  60. data/spec/support/fixture_helpers.rb +10 -0
  61. data/spec/views/dashboard/facet_limit.html.erb_spec.rb +15 -0
  62. data/spec/views/dashboard/index_partials/_thumbnail_display.html.erb_spec.rb +22 -0
  63. data/spec/views/generic_file/edit.html.erb_spec.rb +24 -0
  64. data/spec/views/users/show.html.erb_spec.rb +31 -0
  65. data/sufia-models/app/models/concerns/sufia/user.rb +2 -2
  66. data/sufia-models/lib/generators/sufia/models/install_generator.rb +2 -1
  67. data/sufia-models/lib/generators/sufia/models/templates/migrations/add_linkedin_to_users.rb +5 -0
  68. data/sufia-models/lib/sufia/models/generic_file/actions.rb +0 -1
  69. data/sufia-models/lib/sufia/models/version.rb +1 -1
  70. data/sufia-models/sufia-models.gemspec +3 -5
  71. data/tasks/sufia-dev.rake +0 -10
  72. metadata +43 -69
  73. data/app/views/generic_files/edit_fields/_type.html.erb +0 -12
  74. data/lib/tasks/fixtures.rake +0 -231
  75. data/spec/features/browse_dashboard_files.rb +0 -21
  76. data/spec/features/browse_files.rb +0 -31
  77. data/spec/fixtures/empty_file.txt +0 -0
  78. data/spec/fixtures/fits_datastream.xml +0 -42
  79. data/spec/fixtures/sufia/bg_header.jpg +0 -0
  80. data/spec/fixtures/sufia/sufia_test1.descMeta.txt +0 -12
  81. data/spec/fixtures/sufia/sufia_test1.foxml.erb +0 -89
  82. data/spec/fixtures/sufia/sufia_test1.txt +0 -1
  83. data/spec/fixtures/sufia/sufia_test2.descMeta.txt +0 -12
  84. data/spec/fixtures/sufia/sufia_test2.docx +0 -0
  85. data/spec/fixtures/sufia/sufia_test2.foxml.erb +0 -88
  86. data/spec/fixtures/sufia/sufia_test3.descMeta.txt +0 -12
  87. data/spec/fixtures/sufia/sufia_test3.foxml.erb +0 -91
  88. data/spec/fixtures/sufia/sufia_test3.xls +0 -0
  89. data/spec/fixtures/sufia/sufia_test4.descMeta.txt +0 -12
  90. data/spec/fixtures/sufia/sufia_test4.foxml.erb +0 -91
  91. data/spec/fixtures/sufia/sufia_test5.descMeta.txt +0 -19
  92. data/spec/fixtures/sufia/sufia_test5.foxml.erb +0 -90
  93. data/spec/fixtures/sufia/sufia_test5.txt +0 -1
  94. data/spec/fixtures/sufia/sufia_test6.descMeta.txt +0 -12
  95. data/spec/fixtures/sufia/sufia_test6.foxml.erb +0 -89
  96. data/spec/fixtures/sufia/sufia_test6.jp2 +0 -0
  97. data/spec/fixtures/sufia/sufia_test6.txt +0 -1
  98. data/spec/fixtures/sufia_generic_stub.descMeta.txt +0 -12
  99. data/spec/fixtures/sufia_generic_stub.foxml.erb +0 -79
  100. data/spec/models/unzip_job_spec.rb +0 -47
  101. data/spec/rake/sufia_fixtures_spec.rb +0 -74
  102. data/sufia-models/lib/sufia/models/jobs/unzip_job.rb +0 -38
  103. data/tasks/sufia-fixtures.rake +0 -232
@@ -1,12 +0,0 @@
1
- <%# convert class variable to a local variable if the local hasn't been set %>
2
- <% generic_file = @generic_file unless generic_file %>
3
-
4
- <div class="control-group">
5
- <%= f.label :resource_type, "Resource Types", :class=>"control-label", :for=>"resource_type" %>
6
- <div class="controls">
7
- <p class="help-block">You may select multiple types to apply<p>
8
- <%= f.select "resource_type", options_for_select(Sufia.config.resource_types.keys, generic_file.resource_type), {}, {:multiple=>true, :size=>7} %>
9
- <%= help_icon(:resource_type) %>
10
- </div>
11
- </div><!-- /control-group -->
12
-
@@ -1,231 +0,0 @@
1
- # sufia-fixtures
2
- #
3
- # This was extracted from the original Hydra version in
4
- # ~/rvm/gems/<rails version>@sufia/bundler/gems/lib/railties
5
- # It has been changed to read all files out of a directory and pass those as fixtures.
6
- # Any _ in the file name will be modified to a : for the id, since colons are not valid in a file name.
7
- # The files should be named id_[fixture id] which should relates to the id within the foxml sufia:[fixture id] where
8
- # [fixture id] is some alpha numeric id ('test1')
9
- #
10
- # There are 2 sets of data needed to attach to a sufia fixture, 1 the data file, and 2 the metadata.
11
- # It is important that the meta-data contains the appropriate id, or solor will not index it!
12
- #
13
- # Usage: rake sufia:fixtures:create [DIR=<fixture dir>] [FIXTURE_ID=<fixture id>] [FIXTURE_TITLE=<fixture title>] [FIXTURE_USER=<fixture user>]
14
- # <fixture dir> is an optional directory under spec/fixtures to find the fixtures to load
15
- # DEFAULT: sufia
16
- # <fixture id> is the id given to this fixture with fedora and solr.
17
- # This must be unique and any old files will be overwritten.
18
- # DEFAULT: sufia
19
- # <fixture title> is the title given to the fixture in fedora and solor,
20
- # along with being put in the description and subject by default.
21
- # DEFAULT: sufia test
22
- # <fixture user> is the user given to the fixture in fedora and solor,
23
- # along with being put in the contributor and rights.
24
- # DEFAULT: archivist1
25
- #
26
- #
27
- # Creates new fixture files including the erb, descMeta, and text for loading into sufia.
28
- # The Files are named based on the sufia: id_<fixture id>.foxml.erb, id_<fixture id>.descMeta.txt, and id_<fixture id>.txt
29
- # The foxml.erb file references the descMeta.txt and .txt file. You can edit the erb to point to other data and/or edit the
30
- # .descMeta.txt and/or .txt file to contain the data you wish.
31
- #
32
- # *** Please note that the id must be changed in the file name, foxml.erb, and descMeta.txt if you change it after creation. ***
33
- #
34
- # rake sufia:fixtures:generate [DIR=<fixture dir>]
35
- # <fixture dir> is an optional directory under spec/fixtures to find the fixtures to load
36
- # DEFAULT: sufia
37
- #
38
- # Creates foxml.xml files from the foxml.erb files doing any erb substitutions within the erb file.
39
- # This task is mostly used to put the appropriate Rails.root into the foxml.xml file so that
40
- # the data and meta-data files can be located on load.
41
- #
42
- # rake sufia:fixtures:delete [DIR=<fixture dir>]
43
- # <fixture dir> is an optional directory under spec/fixtures to find the fixtures to load
44
- # DEFAULT: sufia
45
- #
46
- # Remove any fixtures defined by .xml.foxml files in Rais.root/spec/fixtures/<fixture dir> from fedora and solr.
47
- #
48
- # rake sufia:fixtures:load [DIR=<fixture dir>]
49
- # <fixture dir> is an optional directory under spec/fixtures to find the fixtures to load
50
- # DEFAULT: sufia
51
- #
52
- # load any fixtures defined by .xml.foxml files in Rais.root/spec/fixtures/<fixture dir> into fedora and solr.
53
- #
54
- # rake sufia:fixtures:refresh [DIR=<fixture dir>]
55
- # <fixture dir> is an optional directory under spec/fixtures to find the fixtures to load
56
- # DEFAULT: sufia
57
- #
58
- # delete then load any fixtures defined by .xml.foxml files in Rais.root/spec/fixtures/<fixture dir> into fedora and solr.
59
- #
60
- # Example meta-data:
61
- #
62
- # <info:fedora/sufia:[fixture id]> <http://purl.org/dc/terms/publisher> "archivist1" .
63
- # <info:fedora/sufia:[fixture id]> <http://purl.org/dc/terms/description> "MP3 Description" .
64
- # <info:fedora/sufia:[fixture id]> <http://purl.org/dc/terms/created> "04/12/2012" .
65
- # <info:fedora/sufia:[fixture id]> <http://purl.org/dc/terms/contributor> "archivist1" .
66
- # <info:fedora/sufia:[fixture id]> <http://purl.org/dc/terms/title> "MP3" .
67
- # <info:fedora/sufia:[fixture id]> <http://purl.org/dc/terms/relation> "test" .
68
- # <info:fedora/sufia:[fixture id]> <http://purl.org/dc/terms/subject> "MP3 Test" .
69
- # <info:fedora/sufia:[fixture id]> <http://purl.org/dc/terms/language> "En" .
70
- # <info:fedora/sufia:[fixture id]> <http://xmlns.com/foaf/0.1/based_near> "State College" .
71
- # <info:fedora/sufia:[fixture id]> <http://purl.org/dc/terms/rights> "archivist1" .
72
- # <info:fedora/sufia:[fixture id]> <http://purl.org/dc/terms/creator> "archivist1" .
73
- # <info:fedora/sufia:[fixture id]> <http://purl.org/dc/terms/identifier> "Test" .
74
- #
75
- # Example foxml: (note the ID needs to be unique) (the binary data in the xml below was generated using base64 on the text)
76
- # <?xml version="1.0" encoding="UTF-8"?>
77
- # <foxml:digitalObject PID="sufia:[fixture id]" VERSION="1.1" xmlns:foxml="info:fedora/fedora-system:def/foxml#"
78
- # xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="info:fedora/fedora-system:def/foxml# http://www.fedora.info/definitions/1/0/foxml1-1.xsd">
79
- # <foxml:objectProperties>
80
- # <foxml:property NAME="info:fedora/fedora-system:def/model#state" VALUE="Active"/>
81
- # <foxml:property NAME="info:fedora/fedora-system:def/model#label" VALUE="testFixture2.txt"/>
82
- # <foxml:property NAME="info:fedora/fedora-system:def/model#ownerId" VALUE="fedoraAdmin"/>
83
- # </foxml:objectProperties>
84
- # <foxml:datastream CONTROL_GROUP="X" ID="DC" STATE="A" VERSIONABLE="true">
85
- # <foxml:datastreamVersion FORMAT_URI="http://www.openarchives.org/OAI/2.0/oai_dc/"
86
- # ID="DC1.0" LABEL="Dublin Core Record for this object" MIMETYPE="text/xml" SIZE="377">
87
- # <foxml:xmlContent>
88
- # <oai_dc:dc xmlns:dc="http://purl.org/dc/elements/1.1/"
89
- # xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/"
90
- # xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/oai_dc/ http://www.openarchives.org/OAI/2.0/oai_dc.xsd">
91
- # <dc:title>testFixture2.txt</dc:title>
92
- # <dc:identifier>sufia:[fixture id]</dc:identifier>
93
- # </oai_dc:dc>
94
- # </foxml:xmlContent>
95
- # </foxml:datastreamVersion>
96
- # </foxml:datastream>
97
- # <foxml:datastream CONTROL_GROUP="M" ID="descMetadata" STATE="A" VERSIONABLE="true">
98
- # <foxml:datastreamVersion ID="descMetadata.0" LABEL="" MIMETYPE="text/plain">
99
- # <foxml:binaryContent> PGluZm86ZmVkb3JhL2lkOnRlc3QyPiA8aHR0cDovL3B1cmwub3JnL2RjL3Rlcm1zL3B1Ymxpc2hl
100
- # cj4gIkNBQyIgLgo8aW5mbzpmZWRvcmEvaWQ6dGVzdDI+IDxodHRwOi8vcHVybC5vcmcvZGMvdGVy
101
- # bXMvZGVzY3JpcHRpb24+ICJUZXN0IEZpeHR1cmUgMiIgLgo8aW5mbzpmZWRvcmEvaWQ6dGVzdDI+
102
- # IDxodHRwOi8vcHVybC5vcmcvZGMvdGVybXMvY3JlYXRlZD4gIjQvNi8yMDEyIiAuCjxpbmZvOmZl
103
- # ZG9yYS9pZDp0ZXN0Mj4gPGh0dHA6Ly9wdXJsLm9yZy9kYy90ZXJtcy9jb250cmlidXRvcj4gIkNB
104
- # QyIgLgo8aW5mbzpmZWRvcmEvaWQ6dGVzdDI+IDxodHRwOi8vcHVybC5vcmcvZGMvdGVybXMvdGl0
105
- # bGU+ICJUZXN0IEZpeHR1cmUgMiAoVGl0bGUpIiAuCjxpbmZvOmZlZG9yYS9pZDp0ZXN0Mj4gPGh0
106
- # dHA6Ly9wdXJsLm9yZy9kYy90ZXJtcy9yZWxhdGlvbj4gInRlc3QiIC4KPGluZm86ZmVkb3JhL2lk
107
- # OnRlc3QyPiA8aHR0cDovL3B1cmwub3JnL2RjL3Rlcm1zL3N1YmplY3Q+ICJUZXN0aW5nIEZpeHR1
108
- # cmUgMiIgLgo8aW5mbzpmZWRvcmEvaWQ6dGVzdDI+IDxodHRwOi8vcHVybC5vcmcvZGMvdGVybXMv
109
- # bGFuZ3VhZ2U+ICJFbiIgLgo8aW5mbzpmZWRvcmEvaWQ6dGVzdDI+IDxodHRwOi8veG1sbnMuY29t
110
- # L2ZvYWYvMC4xL2Jhc2VkX25lYXI+ICJTdGF0ZSBDb2xsZWdlIiAuCjxpbmZvOmZlZG9yYS9pZDp0
111
- # ZXN0Mj4gPGh0dHA6Ly9wdXJsLm9yZy9kYy90ZXJtcy9yaWdodHM+ICJjYWMiIC4KPGluZm86ZmVk
112
- # b3JhL2lkOnRlc3QyPiA8aHR0cDovL3B1cmwub3JnL2RjL3Rlcm1zL2NyZWF0b3I+ICJDQUMiIC4K
113
- # PGluZm86ZmVkb3JhL2lkOnRlc3QyPiA8aHR0cDovL3B1cmwub3JnL2RjL3Rlcm1zL2lkZW50aWZp
114
- # ZXI+ICJmaXh0dXJlIiAuCg==
115
- # </foxml:binaryContent>
116
- # </foxml:datastreamVersion>
117
- # </foxml:datastream>
118
- # <foxml:datastream CONTROL_GROUP="X" ID="RELS-EXT" STATE="A" VERSIONABLE="true">
119
- # <foxml:datastreamVersion ID="RELS-EXT.0"
120
- # LABEL="Fedora Object-to-Object Relationship Metadata" MIMETYPE="application/rdf+xml" SIZE="286">
121
- # <foxml:xmlContent>
122
- # <rdf:RDF xmlns:ns0="info:fedora/fedora-system:def/model#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
123
- # <rdf:Description rdf:about="info:fedora/sufia:[fixture id]">
124
- # <ns0:hasModel rdf:resource="info:fedora/afmodel:GenericFile"/>
125
- # </rdf:Description>
126
- # </rdf:RDF>
127
- # </foxml:xmlContent>
128
- # </foxml:datastreamVersion>
129
- # </foxml:datastream>
130
- # <foxml:datastream CONTROL_GROUP="M" ID="content" STATE="A" VERSIONABLE="true">
131
- # <foxml:datastreamVersion ID="content.0" LABEL="testFixture2.txt"
132
- # MIMETYPE="text/plain" >
133
- # <foxml:binaryContent> VGhpcyBpcyBhIHRlc3QgZml4dHVyZS4gCkJpbmFyeSBkYXRhIGZvciBmaXh0dXJlIDIuCg== </foxml:binaryContent>
134
- # </foxml:datastreamVersion>
135
- # </foxml:datastream>
136
- # <foxml:datastream CONTROL_GROUP="X" ID="rightsMetadata" STATE="A" VERSIONABLE="true">
137
- # <foxml:datastreamVersion ID="rightsMetadata.0" LABEL="" MIMETYPE="text/xml" SIZE="582">
138
- # <foxml:xmlContent>
139
- # <rightsMetadata version="0.1" xmlns="http://hydra-collab.stanford.edu/schemas/rightsMetadata/v1">
140
- # <copyright>
141
- # <human/>
142
- # <machine>
143
- # <uvalicense>no</uvalicense>
144
- # </machine>
145
- # </copyright>
146
- # <access type="discover">
147
- # <human/>
148
- # <machine/>
149
- # </access>
150
- # <access type="read">
151
- # <human/>
152
- # <machine/>
153
- # </access>
154
- # <access type="edit">
155
- # <human/>
156
- # <machine>
157
- # <person>cam156@psu.edu</person>
158
- # </machine>
159
- # </access>
160
- # <embargo>
161
- # <human/>
162
- # <machine/>
163
- # </embargo>
164
- # </rightsMetadata>
165
- # </foxml:xmlContent>
166
- # </foxml:datastreamVersion>
167
- # </foxml:datastream>
168
- # </foxml:digitalObject>
169
- #
170
- #
171
- #
172
-
173
- require 'active_fedora'
174
-
175
- SUFIA_TEST_NS = 'sufia' #this must be the same as id_namespace in the test applications config
176
- namespace :sufia do
177
- namespace :fixtures do
178
- @localDir = File.expand_path("../../../spec/fixtures", __FILE__)
179
- @dir = ENV["FIXTURE_DIR"] || 'sufia'
180
-
181
- desc "Load default Sufia Hydra fixtures"
182
- task :load => :environment do
183
- dir = File.join(@localDir, @dir)
184
- loader = ActiveFedora::FixtureLoader.new(dir)
185
- fixtures = find_fixtures(@dir)
186
- fixtures.each do |fixture|
187
- puts "Fixture is #{fixture}"
188
- loader.import_and_index(fixture)
189
- puts "Loaded '#{fixture}'"
190
- # Rake::Task["repo:load"].reenable
191
- # Rake::Task["repo:load"].invoke
192
- end
193
- raise "No fixtures found; you may need to generate from erb, use: rake sufia:fixtures:generate" if fixtures.empty?
194
- end
195
-
196
- desc "Remove default Sufia Hydra fixtures"
197
- task :delete do
198
- ENV["dir"] = File.join(@localDir, @dir)
199
- fixtures = find_fixtures(@dir)
200
- fixtures.each do |fixture|
201
- ENV["pid"] = fixture
202
- Rake::Task["repo:delete"].reenable
203
- Rake::Task["repo:delete"].invoke
204
- end
205
- end
206
-
207
- desc "Refresh default Sufia Hydra fixtures"
208
- task :refresh => [:delete, :load]
209
-
210
- desc "Fix fixtures so they work with Cucumber [KLUDGE]"
211
- task :fix do
212
- puts "Attempting to fix fixtures that break cuke"
213
- ## Kludgy workarounds to get past lack of depositor in fixtures
214
- # First, create a user record
215
- User.create(email: 'archivist1@example.com')#, display_name: 'Captain Archivist')
216
- # Then, set this user as the depositor of test4 to appease this damn failing cuke
217
- gf = GenericFile.find('sufia:test4')
218
- gf.apply_depositor_metadata('archivist1@example.com')
219
- gf.save
220
- end
221
-
222
- private
223
-
224
- def find_fixtures(dir)
225
- Dir.glob(File.join(@localDir, dir, '*.foxml.xml')).map do |fixture_file|
226
- File.basename(fixture_file, '.foxml.xml').gsub('_',':')
227
- end
228
- end
229
-
230
- end
231
- end
@@ -1,21 +0,0 @@
1
- require 'spec_helper'
2
-
3
- describe "Browse Dashboard files" do
4
-
5
- before do
6
- sign_in :user_with_fixtures
7
- end
8
-
9
- it "should show me some files (from the fixtures)" do
10
- click_link "dashboard"
11
- click_link "more Keywords"
12
- click_link "keyf"
13
- page.should have_content "Test mp3"
14
- end
15
-
16
- it "should allow me to edit files (from the fixtures)" do
17
- click_link "dashboard"
18
- click_link "Edit File"
19
- page.should have_content "Edit Test mp3"
20
- end
21
- end
@@ -1,31 +0,0 @@
1
- require 'spec_helper'
2
-
3
- describe "Browse files" do
4
-
5
- describe "when not logged in" do
6
- it "should let us browse some of the fixtures" do
7
- visit '/'
8
- click_link "more Keywords"
9
- click_link "test"
10
- # TODO this used to be 1 - 4 of 4, but now we get 5. WTF?
11
- # It looks to me like sufia:sufia1, sufia:test3, sufia:test4, sufia:test5, sufia:test6 all should match
12
- page.should have_content "1 - 5 of 5"
13
- click_link "Test Document PDF"
14
- page.should have_content "Download"
15
- page.should_not have_content "Edit"
16
- end
17
-
18
- end
19
-
20
- describe "when logged in" do
21
- before do
22
- sign_in :user
23
- end
24
- it "should let us browse some of the fixtures and see the edit link"do
25
- click_link "more Keywords"
26
- click_link "test"
27
- click_link "Test Document PDF"
28
- page.should_not have_content "Edit"
29
- end
30
- end
31
- end
File without changes
@@ -1,42 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <fits xmlns="http://hul.harvard.edu/ois/xml/ns/fits/fits_output" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://hul.harvard.edu/ois/xml/ns/fits/fits_output http://hul.harvard.edu/ois/xml/xsd/fits/fits_output.xsd" version="0.6.0" timestamp="1/25/12 11:04 AM">
3
- <identification>
4
- <identity format="Portable Document Format" mimetype="application/pdf" toolname="FITS" toolversion="0.6.0">
5
- <tool toolname="Jhove" toolversion="1.5" />
6
- <tool toolname="file utility" toolversion="5.04" />
7
- <tool toolname="Exiftool" toolversion="7.74" />
8
- <tool toolname="Droid" toolversion="3.0" />
9
- <tool toolname="NLNZ Metadata Extractor" toolversion="3.4GA" />
10
- <tool toolname="ffident" toolversion="0.2" />
11
- <version toolname="Jhove" toolversion="1.5">1.3</version>
12
- <externalIdentifier toolname="Droid" toolversion="3.0" type="puid">fmt/17</externalIdentifier>
13
- </identity>
14
- </identification>
15
- <fileinfo>
16
- <size toolname="Jhove" toolversion="1.5">63019</size>
17
- <creatingApplicationName toolname="NLNZ Metadata Extractor" toolversion="3.4GA" status="SINGLE_RESULT">Mac OS X 10.6.2 Quartz PDFContext/Safari</creatingApplicationName>
18
- <lastmodified toolname="Exiftool" toolversion="7.74" status="SINGLE_RESULT">2010:02:23 16:13:40-05:00</lastmodified>
19
- <filepath toolname="OIS File Information" toolversion="0.1" status="SINGLE_RESULT">/home/mjg/Downloads/C4L-survey.pdf</filepath>
20
- <filename toolname="OIS File Information" toolversion="0.1" status="SINGLE_RESULT">/home/mjg/Downloads/C4L-survey.pdf</filename>
21
- <md5checksum toolname="OIS File Information" toolversion="0.1" status="SINGLE_RESULT">61ab9e435458b0eb78b1055b52f70c79</md5checksum>
22
- <fslastmodified toolname="OIS File Information" toolversion="0.1" status="SINGLE_RESULT">1266959620000</fslastmodified>
23
- </fileinfo>
24
- <filestatus>
25
- <well-formed toolname="Jhove" toolversion="1.5" status="SINGLE_RESULT">true</well-formed>
26
- <valid toolname="Jhove" toolversion="1.5" status="SINGLE_RESULT">true</valid>
27
- </filestatus>
28
- <metadata>
29
- <document>
30
- <title toolname="NLNZ Metadata Extractor" toolversion="3.4GA" status="SINGLE_RESULT">LimeSurvey - Code4Lib 2010 Feedback</title>
31
- <author toolname="NLNZ Metadata Extractor" toolversion="3.4GA" status="SINGLE_RESULT">Eric Celeste</author>
32
- <pageCount toolname="Jhove" toolversion="1.5">6</pageCount>
33
- <isTagged toolname="Jhove" toolversion="1.5">no</isTagged>
34
- <hasOutline toolname="Jhove" toolversion="1.5">no</hasOutline>
35
- <hasAnnotations toolname="Jhove" toolversion="1.5" status="SINGLE_RESULT">no</hasAnnotations>
36
- <isRightsManaged toolname="Exiftool" toolversion="7.74" status="SINGLE_RESULT">no</isRightsManaged>
37
- <isProtected toolname="Exiftool" toolversion="7.74">no</isProtected>
38
- <hasForms toolname="NLNZ Metadata Extractor" toolversion="3.4GA" status="SINGLE_RESULT">no</hasForms>
39
- </document>
40
- </metadata>
41
- </fits>
42
-
Binary file
@@ -1,12 +0,0 @@
1
- <info:fedora/sufia:test1> <http://purl.org/dc/terms/publisher> "archivist1" .
2
- <info:fedora/sufia:test1> <http://purl.org/dc/terms/description> "Test Document Text Description" .
3
- <info:fedora/sufia:test1> <http://purl.org/dc/terms/created> "4/11/2012" .
4
- <info:fedora/sufia:test1> <http://purl.org/dc/terms/contributor> "archivist1" .
5
- <info:fedora/sufia:test1> <http://purl.org/dc/terms/title> "Test Document Text" .
6
- <info:fedora/sufia:test1> <http://purl.org/dc/terms/relation> "test" .
7
- <info:fedora/sufia:test1> <http://purl.org/dc/terms/subject> "Plain Text Test" .
8
- <info:fedora/sufia:test1> <http://purl.org/dc/terms/language> "En" .
9
- <info:fedora/sufia:test1> <http://xmlns.com/foaf/0.1/based_near> "State College" .
10
- <info:fedora/sufia:test1> <http://purl.org/dc/terms/rights> "archivist1@example.com" .
11
- <info:fedora/sufia:test1> <http://purl.org/dc/terms/creator> "archivist1@example.com" .
12
- <info:fedora/sufia:test1> <http://purl.org/dc/terms/identifier> "Test" .
@@ -1,89 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <foxml:digitalObject PID="sufia:test1" VERSION="1.1" xmlns:foxml="info:fedora/fedora-system:def/foxml#"
3
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="info:fedora/fedora-system:def/foxml# http://www.fedora.info/definitions/1/0/foxml1-1.xsd">
4
- <foxml:objectProperties>
5
- <foxml:property NAME="info:fedora/fedora-system:def/model#state" VALUE="Active"/>
6
- <foxml:property NAME="info:fedora/fedora-system:def/model#label" VALUE="Test Data 1.txt"/>
7
- <foxml:property NAME="info:fedora/fedora-system:def/model#ownerId" VALUE="fedoraAdmin"/>
8
- </foxml:objectProperties>
9
- <foxml:datastream CONTROL_GROUP="X" ID="DC" STATE="A" VERSIONABLE="true">
10
- <foxml:datastreamVersion FORMAT_URI="http://www.openarchives.org/OAI/2.0/oai_dc/"
11
- ID="DC1.0" LABEL="Dublin Core Record for this object" MIMETYPE="text/xml">
12
- <foxml:xmlContent>
13
- <oai_dc:dc xmlns:dc="http://purl.org/dc/elements/1.1/"
14
- xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/"
15
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/oai_dc/ http://www.openarchives.org/OAI/2.0/oai_dc.xsd">
16
- <dc:title>Test Data 1.txt</dc:title>
17
- <dc:identifier>sufia:test1</dc:identifier>
18
- </oai_dc:dc>
19
- </foxml:xmlContent>
20
- </foxml:datastreamVersion>
21
- </foxml:datastream>
22
- <foxml:datastream CONTROL_GROUP="M" ID="descMetadata" STATE="A" VERSIONABLE="true">
23
- <foxml:datastreamVersion ID="descMetadata.0" LABEL="" MIMETYPE="text/plain">
24
- <foxml:contentLocation REF="file:<%=@localDir%>/sufia/sufia_test1.descMeta.txt" TYPE="URL"/>
25
- </foxml:datastreamVersion>
26
- </foxml:datastream>
27
- <foxml:datastream ID="properties" STATE="A" CONTROL_GROUP="X" VERSIONABLE="true">
28
- <foxml:datastreamVersion ID="properties.0" LABEL="" CREATED="2012-08-24T16:08:36.120Z" MIMETYPE="text/xml" SIZE="86">
29
- <foxml:xmlContent>
30
- <fields>
31
- <depositor>archivist1</depositor>
32
- <relative_path/>
33
- </fields>
34
- </foxml:xmlContent>
35
- </foxml:datastreamVersion>
36
- </foxml:datastream>
37
-
38
- <foxml:datastream CONTROL_GROUP="X" ID="RELS-EXT" STATE="A" VERSIONABLE="true">
39
- <foxml:datastreamVersion ID="RELS-EXT.0"
40
- LABEL="Fedora Object-to-Object Relationship Metadata" MIMETYPE="application/rdf+xml" SIZE="286">
41
- <foxml:xmlContent>
42
- <rdf:RDF xmlns:ns0="info:fedora/fedora-system:def/model#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
43
- <rdf:Description rdf:about="info:fedora/sufia:test1">
44
- <ns0:hasModel rdf:resource="info:fedora/afmodel:GenericFile"/>
45
- </rdf:Description>
46
- </rdf:RDF>
47
- </foxml:xmlContent>
48
- </foxml:datastreamVersion>
49
- </foxml:datastream>
50
- <foxml:datastream CONTROL_GROUP="M" ID="content" STATE="A" VERSIONABLE="true">
51
- <foxml:datastreamVersion ID="content.0" LABEL="Test Data 1"
52
- MIMETYPE="text/plain" SIZE="25">
53
- <foxml:contentLocation REF="file:<%=@localDir%>/sufia/sufia_test1.txt" TYPE="URL"/>
54
- </foxml:datastreamVersion>
55
- </foxml:datastream>
56
- <foxml:datastream CONTROL_GROUP="X" ID="rightsMetadata" STATE="A" VERSIONABLE="true">
57
- <foxml:datastreamVersion CREATED="2012-04-06T13:41:37.093Z" ID="rightsMetadata.0" LABEL="" MIMETYPE="text/xml" SIZE="582">
58
- <!--foxml:contentDigest DIGEST="37420e9d0d9e81ccf834494450a649d5" TYPE="MD5"/-->
59
- <foxml:xmlContent>
60
- <rightsMetadata version="0.1" xmlns="http://hydra-collab.stanford.edu/schemas/rightsMetadata/v1">
61
- <copyright>
62
- <human/>
63
- <machine>
64
- <uvalicense>no</uvalicense>
65
- </machine>
66
- </copyright>
67
- <access type="discover">
68
- <human/>
69
- <machine/>
70
- </access>
71
- <access type="read">
72
- <human/>
73
- <machine/>
74
- </access>
75
- <access type="edit">
76
- <human/>
77
- <machine>
78
- <person>archivist1@example.com</person>
79
- </machine>
80
- </access>
81
- <embargo>
82
- <human/>
83
- <machine/>
84
- </embargo>
85
- </rightsMetadata>
86
- </foxml:xmlContent>
87
- </foxml:datastreamVersion>
88
- </foxml:datastream>
89
- </foxml:digitalObject>