active-fedora 9.1.0.rc1 → 9.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/History.txt +69 -0
- data/lib/active_fedora/attributes.rb +11 -10
- data/lib/active_fedora/version.rb +1 -1
- data/spec/unit/attributes_spec.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: db07402e3e8ca081253507888ffda0d81084c947
|
4
|
+
data.tar.gz: 3b1ae9595815772239fb91fa04713afdb736a61e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b8db754769fb5d0a4a93ee0b58304f92080a5d6ecec2a9e3730fdbbe623aa505af85b8c8a88d22ab9be86c93d118395c6134fe85b219b65b0bac091410a57675
|
7
|
+
data.tar.gz: 01b0a5c53e12d3426ae309fdc80af82197ede177ee617ec7da0be468e99841da6e8f0a1db14b0d231b524c3658db3a704bc6ad8dc30f8b9c01726d44ef3bc99a
|
data/History.txt
CHANGED
@@ -1,3 +1,72 @@
|
|
1
|
+
v9.1.0
|
2
|
+
2015-04-16: Use delegate_to instead of datastream in the options for property
|
3
|
+
Trying to reduce/elimnate the useage of "datastream" especially in the public
|
4
|
+
API. [Justin Coyne]
|
5
|
+
|
6
|
+
2015-04-15: Bump version to 9.1.0.rc1 [Justin Coyne]
|
7
|
+
|
8
|
+
2015-04-15: Bump version to 9.1.0.alpha [ci skip] [Justin Coyne]
|
9
|
+
|
10
|
+
2015-04-08: Fix deleting from a HABTM when the inverse_of is a has_many. Fixes
|
11
|
+
#763 [Justin Coyne]
|
12
|
+
|
13
|
+
2015-04-07: Remove a spec that is a duplicate of
|
14
|
+
integration/collection_association_spec.rb:92 [Justin Coyne]
|
15
|
+
|
16
|
+
2015-04-07: Leverage the code in AssociationRelation to find the inverse. Fixes
|
17
|
+
#760 [Justin Coyne]
|
18
|
+
|
19
|
+
2015-04-10: Make #translate_id_to_uri/uri_to_id reliable. [Trey Terrell]
|
20
|
+
|
21
|
+
2015-04-02: Find best model match in case of inheritance [Stuart Kenny]
|
22
|
+
|
23
|
+
2015-04-10: Requires 'deprecation' for ActiveFedora::File [Andrew Myers]
|
24
|
+
|
25
|
+
2015-04-06: Only set/save the inverse on a HABTM if the inverse is also HABTM
|
26
|
+
previously we were getting: [Justin Coyne]
|
27
|
+
|
28
|
+
2015-04-06: Derive a foreign_key ending with `_ids` if the inverse is a
|
29
|
+
collection [Justin Coyne]
|
30
|
+
|
31
|
+
2015-04-06: Find inverse relations when class_names have modules [Justin Coyne]
|
32
|
+
|
33
|
+
2015-04-06: Raise an error when the inverse relationship can not be found.
|
34
|
+
Previously a "SystemStackError: Stack too deep" was encountered in this
|
35
|
+
situation [Justin Coyne]
|
36
|
+
|
37
|
+
2015-04-02: Add a mechanism to set rdf_label on the ActiveTriple resource
|
38
|
+
[Justin Coyne]
|
39
|
+
|
40
|
+
2015-04-03: Add CleanConnection [Trey Terrell]
|
41
|
+
|
42
|
+
2015-04-02: The indexing hints should be inheritable [Justin Coyne]
|
43
|
+
|
44
|
+
2015-04-03: Refactor has_and_belongs_to_many_associations_spec [Justin Coyne]
|
45
|
+
|
46
|
+
2015-04-03: Remove unused sample classes [Justin Coyne]
|
47
|
+
|
48
|
+
2015-04-02: Sort versions as dates not as strings [Michael J. Giarlo]
|
49
|
+
|
50
|
+
2015-03-27: Allow property to delegate to a datastream. Ref #736 [Justin Coyne]
|
51
|
+
|
52
|
+
2015-04-01: Prevents an object from being loaded to the incorrect class. For
|
53
|
+
example, when loading a batch object it should be loaded into a Batch (and not a
|
54
|
+
File for example.) [Hector Correa]
|
55
|
+
|
56
|
+
2015-03-30: Groundskeeping: YARD cleanup [Joe Atzberger]
|
57
|
+
|
58
|
+
2015-03-27: Move the indexing logic to the model. Fixes #736 You should now add
|
59
|
+
indexing hints to has_attributes by passing a block similar to how you do it
|
60
|
+
with rdf properties. e.g.: [Justin Coyne]
|
61
|
+
|
62
|
+
2015-03-27: YARD syntax is @return, not @returns [Joe Atzberger]
|
63
|
+
|
64
|
+
2015-03-27: Last touch up on README [Joe Atzberger]
|
65
|
+
|
66
|
+
2015-03-27: README touchup [Joe Atzberger]
|
67
|
+
|
68
|
+
2015-03-27: Formatting for README [Joe Atzberger]
|
69
|
+
|
1
70
|
v9.0.6
|
2
71
|
2015-03-26: Setting type should not wipe out properties. Fixes #737 [Justin Coyne]
|
3
72
|
|
@@ -148,8 +148,12 @@ module ActiveFedora
|
|
148
148
|
end
|
149
149
|
|
150
150
|
def has_attributes(*fields, &block)
|
151
|
-
|
152
|
-
|
151
|
+
options = fields.pop
|
152
|
+
delegate_target = options.delete(:datastream)
|
153
|
+
raise ArgumentError, "You must provide a datastream to has_attributes" if delegate_target.blank?
|
154
|
+
Deprecation.warn(Attributes, "has_attributes is deprecated and will be removed in ActiveFedora 10.0. Instead use:\n property #{fields.first.inspect}, delegate_to: '#{delegate_target}', ...")
|
155
|
+
|
156
|
+
define_delegated_accessor(fields, delegate_target, options, &block)
|
153
157
|
end
|
154
158
|
|
155
159
|
# Reveal if the attribute has been declared unique
|
@@ -170,8 +174,8 @@ module ActiveFedora
|
|
170
174
|
def property name, properties={}, &block
|
171
175
|
if properties.key?(:predicate)
|
172
176
|
define_active_triple_accessor(name, properties, &block)
|
173
|
-
elsif properties.key?(:
|
174
|
-
define_delegated_accessor(name, properties.merge(multiple: true), &block)
|
177
|
+
elsif properties.key?(:delegate_to)
|
178
|
+
define_delegated_accessor([name], properties.delete(:delegate_to), properties.merge(multiple: true), &block)
|
175
179
|
else
|
176
180
|
raise "You must provide `:datastream' or `:predicate' options to property"
|
177
181
|
end
|
@@ -190,14 +194,11 @@ module ActiveFedora
|
|
190
194
|
add_attribute_indexing_config(name, &block) if block_given?
|
191
195
|
end
|
192
196
|
|
193
|
-
def define_delegated_accessor(
|
194
|
-
options = fields.pop
|
195
|
-
datastream = options.delete(:datastream).to_s
|
196
|
-
raise ArgumentError, "You must provide a datastream to has_attributes" if datastream.blank?
|
197
|
+
def define_delegated_accessor(fields, delegate_target, options, &block)
|
197
198
|
define_attribute_methods fields
|
198
199
|
fields.each do |f|
|
199
|
-
create_attribute_reader(f,
|
200
|
-
create_attribute_setter(f,
|
200
|
+
create_attribute_reader(f, delegate_target, options)
|
201
|
+
create_attribute_setter(f, delegate_target, options)
|
201
202
|
add_attribute_indexing_config(f, &block) if block_given?
|
202
203
|
end
|
203
204
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active-fedora
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 9.1.0
|
4
|
+
version: 9.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matt Zumwalt
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2015-04-
|
13
|
+
date: 2015-04-16 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rsolr
|
@@ -570,9 +570,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
570
570
|
version: 1.9.3
|
571
571
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
572
572
|
requirements:
|
573
|
-
- - "
|
573
|
+
- - ">="
|
574
574
|
- !ruby/object:Gem::Version
|
575
|
-
version:
|
575
|
+
version: '0'
|
576
576
|
requirements: []
|
577
577
|
rubyforge_project:
|
578
578
|
rubygems_version: 2.4.5
|