active_fedora-registered_attributes 0.0.9 → 0.0.10
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: acf6fedf5ef07e0c6ee4980fa4b55e1c20e6d14d
|
4
|
+
data.tar.gz: ea3d14821d8eff5005d19546e10df8cc736ca732
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 07a2a2ad776d9ea8b7bdd82e53038e8dcfdbe96f13e84fd8a140685e114bba196144fb794d8b8d22f2c9641c198ba0b708d6d604a71983cf2593a50e2c0db05a
|
7
|
+
data.tar.gz: 8ea7bd3745875363039529543b0c5e09bbf62d38893db8729da25c6954a8882a7091919b601df9358540b29e508f064765af784c7ab9a3e30c1f34df72756a8b
|
@@ -26,6 +26,14 @@ module ActiveFedora
|
|
26
26
|
attribute_registry.keys.collect(&:to_sym)
|
27
27
|
end
|
28
28
|
|
29
|
+
def editable_attributes
|
30
|
+
attribute_registry.editable_attributes
|
31
|
+
end
|
32
|
+
|
33
|
+
def displayable_attributes
|
34
|
+
attribute_registry.displayable_attributes
|
35
|
+
end
|
36
|
+
|
29
37
|
def attribute(attribute_name, options ={})
|
30
38
|
self.attribute_registry ||= AttributeRegistry.new(self)
|
31
39
|
self.attribute_registry.register(attribute_name, options) do |attribute|
|
@@ -99,6 +99,20 @@ describe 'ActiveFedora::RegisteredAttributes' do
|
|
99
99
|
end
|
100
100
|
end
|
101
101
|
|
102
|
+
describe '.editable_attributes' do
|
103
|
+
it 'delegates to the .attribute_registry' do
|
104
|
+
expected_editable_attributes = MockDelegateAttribute.attribute_registry.editable_attributes
|
105
|
+
expect(MockDelegateAttribute.editable_attributes).to eq expected_editable_attributes
|
106
|
+
end
|
107
|
+
end
|
108
|
+
|
109
|
+
describe '.displayable_attributes' do
|
110
|
+
it 'delegates to the .attribute_registry' do
|
111
|
+
expected_displayable_attributes = MockDelegateAttribute.attribute_registry.displayable_attributes
|
112
|
+
expect(MockDelegateAttribute.displayable_attributes).to eq expected_displayable_attributes
|
113
|
+
end
|
114
|
+
end
|
115
|
+
|
102
116
|
describe '#displayable_attributes' do
|
103
117
|
let(:expected_attribute_names) {
|
104
118
|
[ :title, :description, :creator, :file_names, :created_on, :modified_on ]
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active_fedora-registered_attributes
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jeremy Friesen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-09-
|
11
|
+
date: 2013-09-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: active-fedora
|