ddr-models 3.0.0.beta.14 → 3.0.0.beta.15
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: 14943b8a93dfd78febae156714765420b016dee7
|
4
|
+
data.tar.gz: 13cf8eebacb6de43bdacd42e8a9a71d5a1f56778
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 436617c3ea26cf27beccac23a40621dfc8989502de7304de1c12eb8b202cc998f1c600bfd33929731462d84897cd11b653b4cd833d638c7a1ee15e9b08341c6d
|
7
|
+
data.tar.gz: 3c531b502c04226ab9dfa17e6ac5aa94990287546a972a911cdd3569938fb353d1c683c69eb7f6045be7b513dc6ad93f452c28395384cf59e117812a00347b90
|
data/lib/ddr/models/version.rb
CHANGED
data/spec/auth/ability_spec.rb
CHANGED
@@ -57,21 +57,37 @@ module Ddr::Auth
|
|
57
57
|
end
|
58
58
|
|
59
59
|
describe "Collection abilities" do
|
60
|
-
|
61
|
-
allow(Ddr::Auth).to receive(:collection_creators_group) { "collection_creators" }
|
62
|
-
end
|
63
|
-
describe "when the user is a collection creator" do
|
60
|
+
describe "collection creation" do
|
64
61
|
before do
|
65
|
-
allow(
|
62
|
+
allow(Ddr::Auth).to receive(:collection_creators_group) { "collection_creators" }
|
63
|
+
end
|
64
|
+
describe "when the user is a collection creator" do
|
65
|
+
before do
|
66
|
+
allow(auth_context).to receive(:member_of?).with("collection_creators") { true }
|
67
|
+
end
|
68
|
+
it { should be_able_to(:create, Collection) }
|
69
|
+
end
|
70
|
+
|
71
|
+
describe "when the user is not a collection creator" do
|
72
|
+
before do
|
73
|
+
allow(auth_context).to receive(:member_of?).with("collection_creators") { false }
|
74
|
+
end
|
75
|
+
it { should_not be_able_to(:create, Collection) }
|
66
76
|
end
|
67
|
-
it { should be_able_to(:create, Collection) }
|
68
77
|
end
|
69
78
|
|
70
|
-
describe "
|
71
|
-
|
72
|
-
|
79
|
+
describe "metadata ingest" do
|
80
|
+
let(:coll) { Collection.new }
|
81
|
+
describe "ingest_metadata" do
|
82
|
+
describe "when the collection can be edited" do
|
83
|
+
before { subject.can :update, coll }
|
84
|
+
it { should be_able_to(:ingest_metadata, coll) }
|
85
|
+
end
|
86
|
+
describe "when the collection cannot be edited" do
|
87
|
+
before { subject.cannot :update, coll }
|
88
|
+
it { should_not be_able_to(:ingest_metadata, coll) }
|
89
|
+
end
|
73
90
|
end
|
74
|
-
it { should_not be_able_to(:create, Collection) }
|
75
91
|
end
|
76
92
|
end
|
77
93
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ddr-models
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.0.beta.
|
4
|
+
version: 3.0.0.beta.15
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jim Coble
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-
|
12
|
+
date: 2016-03-01 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|