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: 1eae18af630648b13cf36a90e54570f49bc42a68
4
- data.tar.gz: c056cb8e54fb2135622898ecbf031274ed2cea60
3
+ metadata.gz: 44ee20ff8062a42b18c3793b05f06f1e0456c35c
4
+ data.tar.gz: d10a73e51fba3cb4ae49c7a130c56a662c5beb24
5
5
  SHA512:
6
- metadata.gz: 4784edcaeabe4a3038b9fe873f47a91da5fcfbff900c63f60f6bec5cdd14543143be0059259ee5299e1bfc3a37c91285f6d6aa33473899ab40559947d54fea63
7
- data.tar.gz: 8b74aee84f0ad18a5df3cce29a3dc522ed293952912f00f557d349fb8e7b377f55b1e831afc59c5cc5be759f65d6d01130451e5884def47aa509db1e3baa34a7
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/jeremyf/active_fedora-registered_attributes.png?branch=master)](https://travis-ci.org/jeremyf/active_fedora-registered_attributes)
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|
@@ -1,5 +1,5 @@
1
1
  module ActiveFedora
2
2
  module RegisteredAttributes
3
- VERSION = "0.0.7"
3
+ VERSION = "0.0.8"
4
4
  end
5
5
  end
@@ -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.7
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-06 00:00:00.000000000 Z
11
+ date: 2013-09-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: active-fedora