hydra-collections 4.0.0.beta3 → 4.0.0.beta4
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1ceb4a9d6d1e049d7daf97c5a3dda2a716f9b66c
|
4
|
+
data.tar.gz: a525a022ac1de20217e618b8b2e15de8adfda38b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aa9e0366c41a64ac3c7f327108d8e16c9fec65e40e531f2ef5f605faafb4d0a675cd1a703ee9f99e49ce6197aa419cb6006659524b6653e69e0f4cb1c8dfab7a
|
7
|
+
data.tar.gz: e8e608cf8aee67d07eb4d68e8ea74cdfb3b18ed9ef843d4c995305873f75143853d6b2e59553e00427b142ba7358fc0898f2215f4c1963c6c13984e313b228aa
|
@@ -88,7 +88,7 @@ module Hydra
|
|
88
88
|
|
89
89
|
def update
|
90
90
|
process_member_changes
|
91
|
-
@collection.update_attributes(
|
91
|
+
@collection.update_attributes(collection_params.except(:members))
|
92
92
|
if @collection.save
|
93
93
|
after_update
|
94
94
|
else
|
@@ -120,6 +120,12 @@ module Hydra
|
|
120
120
|
|
121
121
|
protected
|
122
122
|
|
123
|
+
def collection_params
|
124
|
+
params.require(:collection).permit(:part_of, :contributor, :creator, :title,
|
125
|
+
:description, :publisher, :date_created, :subject, :language, :rights,
|
126
|
+
:resource_type, :identifier, :based_near, :tag, :related_url, :members)
|
127
|
+
end
|
128
|
+
|
123
129
|
# Queries Solr for members of the collection.
|
124
130
|
# Populates @response and @member_docs similar to Blacklight Catalog#index populating @response and @documents
|
125
131
|
def query_collection_members
|
@@ -69,18 +69,6 @@ module Hydra
|
|
69
69
|
after_save :update_all_members
|
70
70
|
end
|
71
71
|
|
72
|
-
def terms_for_editing
|
73
|
-
terms_for_display - [:date_modified, :date_uploaded]
|
74
|
-
end
|
75
|
-
|
76
|
-
def terms_for_display
|
77
|
-
[
|
78
|
-
:part_of, :contributor, :creator, :title, :description, :publisher,
|
79
|
-
:date_created, :date_uploaded, :date_modified, :subject, :language, :rights,
|
80
|
-
:resource_type, :identifier, :based_near, :tag, :related_url
|
81
|
-
]
|
82
|
-
end
|
83
|
-
|
84
72
|
def update_all_members
|
85
73
|
self.members.collect { |m| update_member(m) }
|
86
74
|
end
|
@@ -143,14 +143,6 @@ describe Collection, :type => :model do
|
|
143
143
|
expect(subject.reload.description).to eq "description"
|
144
144
|
end
|
145
145
|
|
146
|
-
it "should have the expected display terms" do
|
147
|
-
expect(subject.terms_for_display).to eq([:part_of, :contributor, :creator, :title, :description, :publisher, :date_created, :date_uploaded, :date_modified, :subject, :language, :rights, :resource_type, :identifier, :based_near, :tag, :related_url])
|
148
|
-
end
|
149
|
-
|
150
|
-
it "should have the expected edit terms" do
|
151
|
-
expect(subject.terms_for_editing).to eq([:part_of, :contributor, :creator, :title, :description, :publisher, :date_created, :subject, :language, :rights, :resource_type, :identifier, :based_near, :tag, :related_url])
|
152
|
-
end
|
153
|
-
|
154
146
|
describe "#destroy" do
|
155
147
|
before do
|
156
148
|
subject.members = [gf1, gf2]
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hydra-collections
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.0.0.
|
4
|
+
version: 4.0.0.beta4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Carolyn Cole
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-12-
|
11
|
+
date: 2014-12-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: blacklight
|