active_fedora-registered_attributes 0.0.7 → 0.0.8
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: 44ee20ff8062a42b18c3793b05f06f1e0456c35c
|
4
|
+
data.tar.gz: d10a73e51fba3cb4ae49c7a130c56a662c5beb24
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 77950925403fb05659b5d0c0844bada4bf9c03b7ef5d588b8d1eb2b135c2cae2ef97701120c72dae38643add2425160940a808f8af153217890a4248dbb01f8c
|
7
|
+
data.tar.gz: 36affb95a79ac5d4f6251ef79cec7157daeec989ed8116ced1adb42523f0087310028b14ef2581ce49e38130c5edbc91a62d49ce9e56fffbd161c14648f61a52
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# ActiveFedora::RegisteredAttributes
|
2
2
|
|
3
|
-
[![Build Status](https://travis-ci.org/
|
3
|
+
[![Build Status](https://travis-ci.org/projecthydra/active_fedora-registered_attributes.png?branch=master)](https://travis-ci.org/projecthydra/active_fedora-registered_attributes)
|
4
4
|
|
5
5
|
An ActiveFedora extension for consolidating the attribute definitions for an object.
|
6
6
|
|
@@ -50,6 +50,14 @@ module ActiveFedora
|
|
50
50
|
apply_defaults
|
51
51
|
end
|
52
52
|
|
53
|
+
def terms_for_editing
|
54
|
+
editable_attributes.collect(&:name)
|
55
|
+
end
|
56
|
+
|
57
|
+
def terms_for_display
|
58
|
+
displayable_attributes.collect(&:name)
|
59
|
+
end
|
60
|
+
|
53
61
|
protected
|
54
62
|
def apply_defaults(defaults=attribute_defaults)
|
55
63
|
defaults.each do |name, value|
|
@@ -84,6 +84,7 @@ describe 'ActiveFedora::RegisteredAttributes' do
|
|
84
84
|
it 'is all of the attributes that are editable' do
|
85
85
|
actual_editable_attributes = subject.editable_attributes.collect {|a| a.name }
|
86
86
|
expect(actual_editable_attributes).to eq(expected_attribute_names)
|
87
|
+
expect(subject.terms_for_editing).to eq(expected_attribute_names)
|
87
88
|
end
|
88
89
|
end
|
89
90
|
|
@@ -94,6 +95,7 @@ describe 'ActiveFedora::RegisteredAttributes' do
|
|
94
95
|
it 'is all of the attributes that are displayable' do
|
95
96
|
actual_displayable_attributes = subject.displayable_attributes.collect {|a| a.name }
|
96
97
|
expect(actual_displayable_attributes).to eq(expected_attribute_names)
|
98
|
+
expect(subject.terms_for_display).to eq(expected_attribute_names)
|
97
99
|
end
|
98
100
|
end
|
99
101
|
|
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.8
|
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-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: active-fedora
|