active_fedora-registered_attributes 0.0.8 → 0.0.9
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: 64e2aa1b00396f7cfaa25cc4bf7c51f9671d2e2a
|
4
|
+
data.tar.gz: 81972ac8de00f48abce49f866a302655b54c3d37
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f7ac68d6a97f6a1a5a5de59ec4582e5172d485561e9195fbe242dafb94f578b3c35c8f6ac713d9d7c218d4dae1def6bf272a487c25fb7da61274496a574d10b7
|
7
|
+
data.tar.gz: 93a8318b5b91907136bf965b320e3674a8e636e5c0daa2399c38ab7f41dcf054b977377b97400ca9af8823f0d394c4c807dad9d4d65328f98ee3d71b898b5f19
|
@@ -22,6 +22,10 @@ module ActiveFedora
|
|
22
22
|
private :attribute_registry
|
23
23
|
|
24
24
|
module ClassMethods
|
25
|
+
def registered_attribute_names
|
26
|
+
attribute_registry.keys.collect(&:to_sym)
|
27
|
+
end
|
28
|
+
|
25
29
|
def attribute(attribute_name, options ={})
|
26
30
|
self.attribute_registry ||= AttributeRegistry.new(self)
|
27
31
|
self.attribute_registry.register(attribute_name, options) do |attribute|
|
@@ -77,6 +77,17 @@ describe 'ActiveFedora::RegisteredAttributes' do
|
|
77
77
|
end
|
78
78
|
subject { MockDelegateAttribute.new() }
|
79
79
|
|
80
|
+
describe '.registered_attribute_names' do
|
81
|
+
let(:expected_attribute_names) {
|
82
|
+
[:title, :description, :creator, :file_names, :locations, :created_on, :not_in_the_datastream, :modified_on]
|
83
|
+
}
|
84
|
+
it {
|
85
|
+
expect(MockDelegateAttribute.registered_attribute_names).to eq(
|
86
|
+
expected_attribute_names
|
87
|
+
)
|
88
|
+
}
|
89
|
+
end
|
90
|
+
|
80
91
|
describe '#editable_attributes' do
|
81
92
|
let(:expected_attribute_names) {
|
82
93
|
[ :title, :description, :creator, :file_names, :locations, :created_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.9
|
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-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: active-fedora
|