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: 44ee20ff8062a42b18c3793b05f06f1e0456c35c
4
- data.tar.gz: d10a73e51fba3cb4ae49c7a130c56a662c5beb24
3
+ metadata.gz: 64e2aa1b00396f7cfaa25cc4bf7c51f9671d2e2a
4
+ data.tar.gz: 81972ac8de00f48abce49f866a302655b54c3d37
5
5
  SHA512:
6
- metadata.gz: 77950925403fb05659b5d0c0844bada4bf9c03b7ef5d588b8d1eb2b135c2cae2ef97701120c72dae38643add2425160940a808f8af153217890a4248dbb01f8c
7
- data.tar.gz: 36affb95a79ac5d4f6251ef79cec7157daeec989ed8116ced1adb42523f0087310028b14ef2581ce49e38130c5edbc91a62d49ce9e56fffbd161c14648f61a52
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|
@@ -1,5 +1,5 @@
1
1
  module ActiveFedora
2
2
  module RegisteredAttributes
3
- VERSION = "0.0.8"
3
+ VERSION = "0.0.9"
4
4
  end
5
5
  end
@@ -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.8
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-09 00:00:00.000000000 Z
11
+ date: 2013-09-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: active-fedora