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: 64e2aa1b00396f7cfaa25cc4bf7c51f9671d2e2a
4
- data.tar.gz: 81972ac8de00f48abce49f866a302655b54c3d37
3
+ metadata.gz: acf6fedf5ef07e0c6ee4980fa4b55e1c20e6d14d
4
+ data.tar.gz: ea3d14821d8eff5005d19546e10df8cc736ca732
5
5
  SHA512:
6
- metadata.gz: f7ac68d6a97f6a1a5a5de59ec4582e5172d485561e9195fbe242dafb94f578b3c35c8f6ac713d9d7c218d4dae1def6bf272a487c25fb7da61274496a574d10b7
7
- data.tar.gz: 93a8318b5b91907136bf965b320e3674a8e636e5c0daa2399c38ab7f41dcf054b977377b97400ca9af8823f0d394c4c807dad9d4d65328f98ee3d71b898b5f19
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|
@@ -1,5 +1,5 @@
1
1
  module ActiveFedora
2
2
  module RegisteredAttributes
3
- VERSION = "0.0.9"
3
+ VERSION = "0.0.10"
4
4
  end
5
5
  end
@@ -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.9
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-12 00:00:00.000000000 Z
11
+ date: 2013-09-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: active-fedora