active-fedora 11.5.0 → 11.5.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/active-fedora.gemspec +1 -1
- data/lib/active_fedora/attributes/property_builder.rb +1 -1
- data/lib/active_fedora/version.rb +1 -1
- data/spec/unit/attributes_spec.rb +6 -0
- metadata +11 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 14275b6ec2b5836760ce47c632554e20160063d6
|
4
|
+
data.tar.gz: 9d3d7a2259a002ec20c0759d71d4b472bd01ef3e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 68fc369d036b028c650996cdcd4f9d603f1fc52f3c86f91883b15804514e9b31cb11733d5d9dc8d81a1dbbbd3043abb973a3a45427cc20a236eefe6042b8dca2
|
7
|
+
data.tar.gz: 738d06eb6a8230daeeb2db7bca772107846ba0cf1684bd25b47e8404f44d6cd689cbd4dfbb16d14d50e705c38a2282db5f1f3c3ec70806d95396b94d7db518e4
|
data/active-fedora.gemspec
CHANGED
@@ -18,7 +18,7 @@ Gem::Specification.new do |s|
|
|
18
18
|
s.add_dependency 'solrizer', '>= 3.4', '< 5'
|
19
19
|
s.add_dependency "activesupport", '>= 4.2.4', '< 6'
|
20
20
|
s.add_dependency "activemodel", '>= 4.2', '< 6'
|
21
|
-
s.add_dependency "active-triples", '
|
21
|
+
s.add_dependency "active-triples", '>= 0.11.0', '< 2.0.0'
|
22
22
|
s.add_dependency "deprecation"
|
23
23
|
s.add_dependency "ldp", '~> 0.7.0'
|
24
24
|
s.add_dependency "ruby-progressbar", '~> 1.0'
|
@@ -45,7 +45,7 @@ module ActiveFedora::Attributes
|
|
45
45
|
def self.define_singular_writers(mixin, name)
|
46
46
|
mixin.class_eval <<-CODE, __FILE__, __LINE__ + 1
|
47
47
|
def #{name}=(value)
|
48
|
-
if value.respond_to?(:each)
|
48
|
+
if value.respond_to?(:each) && !(value.respond_to?(:term?) && value.term?)
|
49
49
|
raise ArgumentError, "You attempted to set the property `#{name}' of \#{id} to an enumerable value. However, this property is declared as singular."
|
50
50
|
end
|
51
51
|
set_value(:#{name}, value)
|
@@ -133,11 +133,17 @@ describe ActiveFedora::Base do
|
|
133
133
|
expect { history.title = nil }.not_to raise_error
|
134
134
|
end
|
135
135
|
|
136
|
+
it "allow setting to multiple properties with unintended legacy behavior" do
|
137
|
+
expect { history.title = '' }.not_to raise_error
|
138
|
+
expect { history.title = ActiveTriples::Resource.new }.not_to raise_error
|
139
|
+
end
|
140
|
+
|
136
141
|
it "does not allow an enumerable to a unique attribute writer" do
|
137
142
|
expect { history.abstract = "Low" }.not_to raise_error
|
138
143
|
expect { history.abstract = ["Low"]
|
139
144
|
}.to raise_error ArgumentError, "You attempted to set the property `abstract' of test:123 to an enumerable value. However, this property is declared as singular."
|
140
145
|
expect { history.abstract = nil }.not_to raise_error
|
146
|
+
expect { history.abstract = ActiveTriples::Resource.new }.not_to raise_error
|
141
147
|
end
|
142
148
|
end
|
143
149
|
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: 11.5.
|
4
|
+
version: 11.5.2
|
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: 2017-
|
13
|
+
date: 2017-11-08 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rsolr
|
@@ -96,16 +96,22 @@ dependencies:
|
|
96
96
|
name: active-triples
|
97
97
|
requirement: !ruby/object:Gem::Requirement
|
98
98
|
requirements:
|
99
|
-
- - "
|
99
|
+
- - ">="
|
100
100
|
- !ruby/object:Gem::Version
|
101
101
|
version: 0.11.0
|
102
|
+
- - "<"
|
103
|
+
- !ruby/object:Gem::Version
|
104
|
+
version: 2.0.0
|
102
105
|
type: :runtime
|
103
106
|
prerelease: false
|
104
107
|
version_requirements: !ruby/object:Gem::Requirement
|
105
108
|
requirements:
|
106
|
-
- - "
|
109
|
+
- - ">="
|
107
110
|
- !ruby/object:Gem::Version
|
108
111
|
version: 0.11.0
|
112
|
+
- - "<"
|
113
|
+
- !ruby/object:Gem::Version
|
114
|
+
version: 2.0.0
|
109
115
|
- !ruby/object:Gem::Dependency
|
110
116
|
name: deprecation
|
111
117
|
requirement: !ruby/object:Gem::Requirement
|
@@ -729,7 +735,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
729
735
|
version: '0'
|
730
736
|
requirements: []
|
731
737
|
rubyforge_project:
|
732
|
-
rubygems_version: 2.
|
738
|
+
rubygems_version: 2.6.13
|
733
739
|
signing_key:
|
734
740
|
specification_version: 4
|
735
741
|
summary: A convenience libary for manipulating documents in the Fedora Repository.
|