hydra-head 4.0.0.rc3 → 4.0.0.rc4
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +5 -4
- data/Gemfile.lock +5 -7
- data/app/models/ability.rb +28 -24
- data/app/models/generic_content.rb +1 -4
- data/app/models/generic_image.rb +1 -5
- data/app/models/hydra/datastream/properties.rb +19 -0
- data/hydra-head.gemspec +3 -3
- data/lib/hydra-head/version.rb +1 -1
- data/test_support/etc/Gemfile +3 -4
- data/vendor/cache/{active-fedora-4.0.0.rc18.gem → active-fedora-4.0.0.rc19.gem} +0 -0
- metadata +39 -39
- data/vendor/cache/sqlite3-ruby-1.3.3.gem +0 -0
data/Gemfile
CHANGED
@@ -6,8 +6,9 @@ gemspec
|
|
6
6
|
# For rvm users:
|
7
7
|
# bundle config build.ruby-debug-base19 --with-ruby-include=$rvm_path/src/ruby-1.9.3-p0
|
8
8
|
group :test do
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
9
|
+
# gem 'linecache19', '>= 0.5.13'
|
10
|
+
# gem 'ruby-debug-base19', '>= 0.11.26'
|
11
|
+
# gem 'ruby-debug19'
|
12
|
+
gem 'cucumber-rails', '>=1.2.0', :require=>false
|
13
13
|
|
14
|
+
end
|
data/Gemfile.lock
CHANGED
@@ -1,16 +1,15 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
hydra-head (4.0.0.
|
4
|
+
hydra-head (4.0.0.rc4)
|
5
5
|
RedCloth (= 4.2.9)
|
6
|
-
active-fedora (~> 4.0.0.
|
6
|
+
active-fedora (~> 4.0.0.rc19)
|
7
7
|
blacklight (~> 3.3.1)
|
8
8
|
block_helpers
|
9
9
|
cancan
|
10
10
|
devise
|
11
11
|
rails (~> 3.2.1)
|
12
12
|
sanitize
|
13
|
-
solrizer-fedora (>= 1.2.5)
|
14
13
|
|
15
14
|
GEM
|
16
15
|
remote: http://rubygems.org/
|
@@ -29,7 +28,7 @@ GEM
|
|
29
28
|
rack-cache (~> 1.1)
|
30
29
|
rack-test (~> 0.6.1)
|
31
30
|
sprockets (~> 2.1.2)
|
32
|
-
active-fedora (4.0.0.
|
31
|
+
active-fedora (4.0.0.rc19)
|
33
32
|
activeresource (>= 3.0.0)
|
34
33
|
activesupport (>= 3.0.0)
|
35
34
|
equivalent-xml
|
@@ -259,8 +258,6 @@ GEM
|
|
259
258
|
rack (~> 1.0)
|
260
259
|
tilt (~> 1.1, != 1.3.0)
|
261
260
|
sqlite3 (1.3.5)
|
262
|
-
sqlite3-ruby (1.3.3)
|
263
|
-
sqlite3 (>= 1.3.3)
|
264
261
|
stomp (1.2.2)
|
265
262
|
term-ansicolor (1.0.7)
|
266
263
|
thor (0.14.6)
|
@@ -289,5 +286,6 @@ DEPENDENCIES
|
|
289
286
|
jettywrapper (>= 1.0.4)
|
290
287
|
mocha
|
291
288
|
rspec-rails
|
292
|
-
|
289
|
+
solrizer-fedora (>= 1.2.5)
|
290
|
+
sqlite3
|
293
291
|
yard
|
data/app/models/ability.rb
CHANGED
@@ -18,34 +18,38 @@ class Ability
|
|
18
18
|
if @user.is_being_superuser?(session)
|
19
19
|
can :manage, :all
|
20
20
|
else
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
21
|
+
hydra_default_permissions
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
def hydra_default_permissions
|
26
|
+
can :edit, String do |pid|
|
27
|
+
@response, @permissions_solr_document = get_permissions_solr_response_for_doc_id(pid)
|
28
|
+
test_edit
|
29
|
+
end
|
25
30
|
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
can :edit, SolrDocument do |obj|
|
32
|
-
test_edit
|
33
|
-
end
|
31
|
+
can :edit, ActiveFedora::Base do |obj|
|
32
|
+
@response, @permissions_solr_document = get_permissions_solr_response_for_doc_id(obj.pid)
|
33
|
+
test_edit
|
34
|
+
end
|
34
35
|
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
end
|
36
|
+
can :edit, SolrDocument do |obj|
|
37
|
+
test_edit
|
38
|
+
end
|
39
39
|
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
end
|
44
|
-
|
45
|
-
can :read, SolrDocument do |obj|
|
46
|
-
test_read
|
47
|
-
end
|
40
|
+
can :read, String do |pid|
|
41
|
+
@response, @permissions_solr_document = get_permissions_solr_response_for_doc_id(pid)
|
42
|
+
test_read
|
48
43
|
end
|
44
|
+
|
45
|
+
can :read, ActiveFedora::Base do |obj|
|
46
|
+
@response, @permissions_solr_document = get_permissions_solr_response_for_doc_id(obj.pid)
|
47
|
+
test_read
|
48
|
+
end
|
49
|
+
|
50
|
+
can :read, SolrDocument do |obj|
|
51
|
+
test_read
|
52
|
+
end
|
49
53
|
end
|
50
54
|
|
51
55
|
private
|
@@ -7,10 +7,7 @@ class GenericContent < ActiveFedora::Base
|
|
7
7
|
has_metadata :name => "descMetadata", :type => Hydra::Datastream::ModsGenericContent
|
8
8
|
|
9
9
|
# A place to put extra metadata values
|
10
|
-
has_metadata :name => "properties", :type =>
|
11
|
-
m.field 'collection', :string
|
12
|
-
m.field 'depositor', :string
|
13
|
-
end
|
10
|
+
has_metadata :name => "properties", :type => Hydra::Datastream::Properties
|
14
11
|
|
15
12
|
# adds helpful methods for basic hydra objects.
|
16
13
|
# FIXME: redundate with GenericContent include above??
|
data/app/models/generic_image.rb
CHANGED
@@ -51,11 +51,7 @@ class GenericImage < ActiveFedora::Base
|
|
51
51
|
has_metadata :name => "descMetadata", :type => Hydra::Datastream::ModsImage
|
52
52
|
|
53
53
|
# A place to put extra metadata values
|
54
|
-
has_metadata :name => "properties", :type =>
|
55
|
-
m.field 'collection', :string
|
56
|
-
m.field 'depositor', :string
|
57
|
-
m.field 'title', :string
|
58
|
-
end
|
54
|
+
has_metadata :name => "properties", :type => Hydra::Datastream::Properties
|
59
55
|
|
60
56
|
def initialize( attrs={} )
|
61
57
|
super
|
@@ -0,0 +1,19 @@
|
|
1
|
+
module Hydra::Datastream
|
2
|
+
class Properties < ActiveFedora::NokogiriDatastream
|
3
|
+
set_terminology do |t|
|
4
|
+
t.root(:path=>"fields", :xmlns => '', :namespace_prefix => nil)
|
5
|
+
|
6
|
+
t.collection :xmlns => '', :namespace_prefix => nil
|
7
|
+
t.depositor :xmlns => '', :namespace_prefix => nil
|
8
|
+
t.title :xmlns => '', :namespace_prefix => nil
|
9
|
+
end
|
10
|
+
|
11
|
+
def self.xml_template
|
12
|
+
builder = Nokogiri::XML::Builder.new do |xml|
|
13
|
+
xml.fields
|
14
|
+
end
|
15
|
+
|
16
|
+
builder.doc
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
data/hydra-head.gemspec
CHANGED
@@ -15,14 +15,14 @@ Gem::Specification.new do |s|
|
|
15
15
|
s.add_dependency "rails", '~> 3.2.1'
|
16
16
|
s.add_dependency "blacklight", '~>3.3.1'
|
17
17
|
s.add_dependency "devise"
|
18
|
-
s.add_dependency "active-fedora", '~>4.0.0.
|
18
|
+
s.add_dependency "active-fedora", '~>4.0.0.rc19'
|
19
19
|
s.add_dependency 'RedCloth', '=4.2.9'
|
20
|
-
s.
|
20
|
+
s.add_development_dependency 'solrizer-fedora', '>=1.2.5'
|
21
21
|
s.add_dependency 'block_helpers'
|
22
22
|
s.add_dependency 'sanitize'
|
23
23
|
s.add_dependency 'cancan'
|
24
24
|
|
25
|
-
s.add_development_dependency 'sqlite3
|
25
|
+
s.add_development_dependency 'sqlite3'
|
26
26
|
|
27
27
|
s.add_development_dependency 'yard'
|
28
28
|
s.add_development_dependency 'jettywrapper', ">=1.0.4"
|
data/lib/hydra-head/version.rb
CHANGED
data/test_support/etc/Gemfile
CHANGED
@@ -5,9 +5,7 @@ source 'http://rubygems.org'
|
|
5
5
|
|
6
6
|
gem "rails", '~> 3.2.2'
|
7
7
|
|
8
|
-
|
9
|
-
gem 'sqlite3-ruby', :require => 'sqlite3'
|
10
|
-
#gem 'sqlite3'
|
8
|
+
gem 'sqlite3'
|
11
9
|
|
12
10
|
gem 'blacklight', '~>3.3.0'
|
13
11
|
|
@@ -21,10 +19,11 @@ gem 'cancan'
|
|
21
19
|
group :development, :test do
|
22
20
|
gem 'rspec-rails'
|
23
21
|
gem 'mocha'
|
24
|
-
gem 'cucumber-rails'
|
22
|
+
gem 'cucumber-rails', :require => false
|
25
23
|
gem 'capybara'
|
26
24
|
gem 'factory_girl'
|
27
25
|
gem 'rest-client'
|
26
|
+
gem 'solrizer-fedora', '>=1.2.5'
|
28
27
|
end
|
29
28
|
|
30
29
|
# Gems used only for assets and not required
|
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hydra-head
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.0.0.
|
4
|
+
version: 4.0.0.rc4
|
5
5
|
prerelease: 6
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,11 +10,11 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2012-03-
|
13
|
+
date: 2012-03-30 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rails
|
17
|
-
requirement: &
|
17
|
+
requirement: &70283600038780 !ruby/object:Gem::Requirement
|
18
18
|
none: false
|
19
19
|
requirements:
|
20
20
|
- - ~>
|
@@ -22,10 +22,10 @@ dependencies:
|
|
22
22
|
version: 3.2.1
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
|
-
version_requirements: *
|
25
|
+
version_requirements: *70283600038780
|
26
26
|
- !ruby/object:Gem::Dependency
|
27
27
|
name: blacklight
|
28
|
-
requirement: &
|
28
|
+
requirement: &70283600038160 !ruby/object:Gem::Requirement
|
29
29
|
none: false
|
30
30
|
requirements:
|
31
31
|
- - ~>
|
@@ -33,10 +33,10 @@ dependencies:
|
|
33
33
|
version: 3.3.1
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
|
-
version_requirements: *
|
36
|
+
version_requirements: *70283600038160
|
37
37
|
- !ruby/object:Gem::Dependency
|
38
38
|
name: devise
|
39
|
-
requirement: &
|
39
|
+
requirement: &70283600037660 !ruby/object:Gem::Requirement
|
40
40
|
none: false
|
41
41
|
requirements:
|
42
42
|
- - ! '>='
|
@@ -44,21 +44,21 @@ dependencies:
|
|
44
44
|
version: '0'
|
45
45
|
type: :runtime
|
46
46
|
prerelease: false
|
47
|
-
version_requirements: *
|
47
|
+
version_requirements: *70283600037660
|
48
48
|
- !ruby/object:Gem::Dependency
|
49
49
|
name: active-fedora
|
50
|
-
requirement: &
|
50
|
+
requirement: &70283600037020 !ruby/object:Gem::Requirement
|
51
51
|
none: false
|
52
52
|
requirements:
|
53
53
|
- - ~>
|
54
54
|
- !ruby/object:Gem::Version
|
55
|
-
version: 4.0.0.
|
55
|
+
version: 4.0.0.rc19
|
56
56
|
type: :runtime
|
57
57
|
prerelease: false
|
58
|
-
version_requirements: *
|
58
|
+
version_requirements: *70283600037020
|
59
59
|
- !ruby/object:Gem::Dependency
|
60
60
|
name: RedCloth
|
61
|
-
requirement: &
|
61
|
+
requirement: &70283600036420 !ruby/object:Gem::Requirement
|
62
62
|
none: false
|
63
63
|
requirements:
|
64
64
|
- - =
|
@@ -66,21 +66,21 @@ dependencies:
|
|
66
66
|
version: 4.2.9
|
67
67
|
type: :runtime
|
68
68
|
prerelease: false
|
69
|
-
version_requirements: *
|
69
|
+
version_requirements: *70283600036420
|
70
70
|
- !ruby/object:Gem::Dependency
|
71
71
|
name: solrizer-fedora
|
72
|
-
requirement: &
|
72
|
+
requirement: &70283600035840 !ruby/object:Gem::Requirement
|
73
73
|
none: false
|
74
74
|
requirements:
|
75
75
|
- - ! '>='
|
76
76
|
- !ruby/object:Gem::Version
|
77
77
|
version: 1.2.5
|
78
|
-
type: :
|
78
|
+
type: :development
|
79
79
|
prerelease: false
|
80
|
-
version_requirements: *
|
80
|
+
version_requirements: *70283600035840
|
81
81
|
- !ruby/object:Gem::Dependency
|
82
82
|
name: block_helpers
|
83
|
-
requirement: &
|
83
|
+
requirement: &70283600035380 !ruby/object:Gem::Requirement
|
84
84
|
none: false
|
85
85
|
requirements:
|
86
86
|
- - ! '>='
|
@@ -88,10 +88,10 @@ dependencies:
|
|
88
88
|
version: '0'
|
89
89
|
type: :runtime
|
90
90
|
prerelease: false
|
91
|
-
version_requirements: *
|
91
|
+
version_requirements: *70283600035380
|
92
92
|
- !ruby/object:Gem::Dependency
|
93
93
|
name: sanitize
|
94
|
-
requirement: &
|
94
|
+
requirement: &70283600034820 !ruby/object:Gem::Requirement
|
95
95
|
none: false
|
96
96
|
requirements:
|
97
97
|
- - ! '>='
|
@@ -99,10 +99,10 @@ dependencies:
|
|
99
99
|
version: '0'
|
100
100
|
type: :runtime
|
101
101
|
prerelease: false
|
102
|
-
version_requirements: *
|
102
|
+
version_requirements: *70283600034820
|
103
103
|
- !ruby/object:Gem::Dependency
|
104
104
|
name: cancan
|
105
|
-
requirement: &
|
105
|
+
requirement: &70283600034300 !ruby/object:Gem::Requirement
|
106
106
|
none: false
|
107
107
|
requirements:
|
108
108
|
- - ! '>='
|
@@ -110,10 +110,10 @@ dependencies:
|
|
110
110
|
version: '0'
|
111
111
|
type: :runtime
|
112
112
|
prerelease: false
|
113
|
-
version_requirements: *
|
113
|
+
version_requirements: *70283600034300
|
114
114
|
- !ruby/object:Gem::Dependency
|
115
|
-
name: sqlite3
|
116
|
-
requirement: &
|
115
|
+
name: sqlite3
|
116
|
+
requirement: &70283600062900 !ruby/object:Gem::Requirement
|
117
117
|
none: false
|
118
118
|
requirements:
|
119
119
|
- - ! '>='
|
@@ -121,10 +121,10 @@ dependencies:
|
|
121
121
|
version: '0'
|
122
122
|
type: :development
|
123
123
|
prerelease: false
|
124
|
-
version_requirements: *
|
124
|
+
version_requirements: *70283600062900
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
126
|
name: yard
|
127
|
-
requirement: &
|
127
|
+
requirement: &70283600062380 !ruby/object:Gem::Requirement
|
128
128
|
none: false
|
129
129
|
requirements:
|
130
130
|
- - ! '>='
|
@@ -132,10 +132,10 @@ dependencies:
|
|
132
132
|
version: '0'
|
133
133
|
type: :development
|
134
134
|
prerelease: false
|
135
|
-
version_requirements: *
|
135
|
+
version_requirements: *70283600062380
|
136
136
|
- !ruby/object:Gem::Dependency
|
137
137
|
name: jettywrapper
|
138
|
-
requirement: &
|
138
|
+
requirement: &70283600061760 !ruby/object:Gem::Requirement
|
139
139
|
none: false
|
140
140
|
requirements:
|
141
141
|
- - ! '>='
|
@@ -143,10 +143,10 @@ dependencies:
|
|
143
143
|
version: 1.0.4
|
144
144
|
type: :development
|
145
145
|
prerelease: false
|
146
|
-
version_requirements: *
|
146
|
+
version_requirements: *70283600061760
|
147
147
|
- !ruby/object:Gem::Dependency
|
148
148
|
name: rspec-rails
|
149
|
-
requirement: &
|
149
|
+
requirement: &70283600061260 !ruby/object:Gem::Requirement
|
150
150
|
none: false
|
151
151
|
requirements:
|
152
152
|
- - ! '>='
|
@@ -154,10 +154,10 @@ dependencies:
|
|
154
154
|
version: '0'
|
155
155
|
type: :development
|
156
156
|
prerelease: false
|
157
|
-
version_requirements: *
|
157
|
+
version_requirements: *70283600061260
|
158
158
|
- !ruby/object:Gem::Dependency
|
159
159
|
name: mocha
|
160
|
-
requirement: &
|
160
|
+
requirement: &70283600060660 !ruby/object:Gem::Requirement
|
161
161
|
none: false
|
162
162
|
requirements:
|
163
163
|
- - ! '>='
|
@@ -165,10 +165,10 @@ dependencies:
|
|
165
165
|
version: '0'
|
166
166
|
type: :development
|
167
167
|
prerelease: false
|
168
|
-
version_requirements: *
|
168
|
+
version_requirements: *70283600060660
|
169
169
|
- !ruby/object:Gem::Dependency
|
170
170
|
name: cucumber-rails
|
171
|
-
requirement: &
|
171
|
+
requirement: &70283600059920 !ruby/object:Gem::Requirement
|
172
172
|
none: false
|
173
173
|
requirements:
|
174
174
|
- - ! '>='
|
@@ -176,10 +176,10 @@ dependencies:
|
|
176
176
|
version: 1.2.0
|
177
177
|
type: :development
|
178
178
|
prerelease: false
|
179
|
-
version_requirements: *
|
179
|
+
version_requirements: *70283600059920
|
180
180
|
- !ruby/object:Gem::Dependency
|
181
181
|
name: factory_girl
|
182
|
-
requirement: &
|
182
|
+
requirement: &70283600059280 !ruby/object:Gem::Requirement
|
183
183
|
none: false
|
184
184
|
requirements:
|
185
185
|
- - ! '>='
|
@@ -187,7 +187,7 @@ dependencies:
|
|
187
187
|
version: '0'
|
188
188
|
type: :development
|
189
189
|
prerelease: false
|
190
|
-
version_requirements: *
|
190
|
+
version_requirements: *70283600059280
|
191
191
|
description: ! 'Hydra-Head is a Rails Engine containing the core code for a Hydra
|
192
192
|
application. The full hydra stack includes: Blacklight, Fedora, Solr, active-fedora,
|
193
193
|
solrizer, and om'
|
@@ -339,6 +339,7 @@ files:
|
|
339
339
|
- app/models/hydra/datastream/mods_dataset.rb
|
340
340
|
- app/models/hydra/datastream/mods_generic_content.rb
|
341
341
|
- app/models/hydra/datastream/mods_image.rb
|
342
|
+
- app/models/hydra/datastream/properties.rb
|
342
343
|
- app/models/hydra/datastream/rights_metadata.rb
|
343
344
|
- app/models/image_asset.rb
|
344
345
|
- app/models/mods_asset.rb
|
@@ -651,7 +652,7 @@ files:
|
|
651
652
|
- vendor/cache/RedCloth-4.2.9.gem
|
652
653
|
- vendor/cache/actionmailer-3.2.2.gem
|
653
654
|
- vendor/cache/actionpack-3.2.2.gem
|
654
|
-
- vendor/cache/active-fedora-4.0.0.
|
655
|
+
- vendor/cache/active-fedora-4.0.0.rc19.gem
|
655
656
|
- vendor/cache/activemodel-3.2.2.gem
|
656
657
|
- vendor/cache/activerecord-3.2.2.gem
|
657
658
|
- vendor/cache/activeresource-3.2.2.gem
|
@@ -734,7 +735,6 @@ files:
|
|
734
735
|
- vendor/cache/solrizer-fedora-1.2.5.gem
|
735
736
|
- vendor/cache/sprockets-2.1.2.gem
|
736
737
|
- vendor/cache/sqlite3-1.3.5.gem
|
737
|
-
- vendor/cache/sqlite3-ruby-1.3.3.gem
|
738
738
|
- vendor/cache/stomp-1.2.2.gem
|
739
739
|
- vendor/cache/term-ansicolor-1.0.7.gem
|
740
740
|
- vendor/cache/thor-0.14.6.gem
|
Binary file
|