active-fedora 5.6.1 → 5.6.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,6 @@
1
+ 5.6.1
2
+ Fixed delegating enumerable methods (join, [], each_with_index, to_a, etc) on an RdfNode::TermProxy
3
+
1
4
  5.6.0
2
5
  Upgrade to rubydora 1.3.0, which prevents unnecessary loading of datastream content.
3
6
  #35 fix passing :sort argument to ActiveFedora::Base#find
@@ -181,7 +181,7 @@ module ActiveFedora
181
181
 
182
182
  def construct_query
183
183
  clauses = {@reflection.options[:property] => @owner.internal_uri}
184
- clauses[:has_model] = @reflection.class_name.constantize.to_class_uri if @reflection.class_name
184
+ clauses[:has_model] = @reflection.class_name.constantize.to_class_uri if @reflection.class_name && @reflection.class_name != 'ActiveFedora::Base'
185
185
  @counter_query = @finder_query = ActiveFedora::SolrService.construct_query_for_rel(clauses)
186
186
  end
187
187
 
@@ -1,3 +1,3 @@
1
1
  module ActiveFedora
2
- VERSION = "5.6.1"
2
+ VERSION = "5.6.2"
3
3
  end
@@ -4,7 +4,7 @@ describe "When two or more relationships share the same property" do
4
4
  before do
5
5
  class Book < ActiveFedora::Base
6
6
  has_many :collections, :property=>:is_part_of, :class_name=>'Collection'
7
- has_many :people, :property=>:is_part_of#, :class_name=>'Person'
7
+ has_many :people, :property=>:is_part_of
8
8
  end
9
9
 
10
10
  class Person < ActiveFedora::Base
@@ -15,7 +15,7 @@ describe "When two or more relationships share the same property" do
15
15
  belongs_to :book, :property=>:is_part_of
16
16
  end
17
17
 
18
- @book = Book.create!#(:collections=>[@collection1, @collection2], :people=>[@person1, @person2])
18
+ @book = Book.create!
19
19
  @person1 = Person.create!(:book=>@book)
20
20
  @person2 = Person.create!(:book=>@book)
21
21
  end
@@ -31,3 +31,34 @@ describe "When two or more relationships share the same property" do
31
31
  @book.collections.should == []
32
32
  end
33
33
  end
34
+
35
+ describe "When relationship is restricted to AF::Base" do
36
+ before do
37
+ class Email < ActiveFedora::Base
38
+ has_many :attachments, :property=>:is_part_of, :class_name=>'ActiveFedora::Base'
39
+ end
40
+
41
+ class Image < ActiveFedora::Base
42
+ belongs_to :email, :property=>:is_part_of
43
+ end
44
+
45
+ class PDF < ActiveFedora::Base
46
+ belongs_to :email, :property=>:is_part_of
47
+ end
48
+
49
+ @book = Email.create!
50
+ @image = Image.create!(:email=>@book)
51
+ @pdf = PDF.create!(:email=>@book)
52
+ end
53
+ after do
54
+ Object.send(:remove_const, :Image)
55
+ Object.send(:remove_const, :PDF)
56
+ Object.send(:remove_const, :Email)
57
+ end
58
+
59
+
60
+ it "Should not restrict relationships " do
61
+ @book.reload
62
+ @book.attachments.should == [@image, @pdf]
63
+ end
64
+ 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: 5.6.1
4
+ version: 5.6.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -11,14 +11,14 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2013-02-04 00:00:00.000000000 Z
14
+ date: 2013-02-06 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: rsolr
18
18
  requirement: !ruby/object:Gem::Requirement
19
19
  none: false
20
20
  requirements:
21
- - - ">="
21
+ - - ! '>='
22
22
  - !ruby/object:Gem::Version
23
23
  version: '0'
24
24
  type: :runtime
@@ -26,7 +26,7 @@ dependencies:
26
26
  version_requirements: !ruby/object:Gem::Requirement
27
27
  none: false
28
28
  requirements:
29
- - - ">="
29
+ - - ! '>='
30
30
  - !ruby/object:Gem::Version
31
31
  version: '0'
32
32
  - !ruby/object:Gem::Dependency
@@ -34,7 +34,7 @@ dependencies:
34
34
  requirement: !ruby/object:Gem::Requirement
35
35
  none: false
36
36
  requirements:
37
- - - "~>"
37
+ - - ~>
38
38
  - !ruby/object:Gem::Version
39
39
  version: 1.8.0
40
40
  type: :runtime
@@ -42,7 +42,7 @@ dependencies:
42
42
  version_requirements: !ruby/object:Gem::Requirement
43
43
  none: false
44
44
  requirements:
45
- - - "~>"
45
+ - - ~>
46
46
  - !ruby/object:Gem::Version
47
47
  version: 1.8.0
48
48
  - !ruby/object:Gem::Dependency
@@ -50,7 +50,7 @@ dependencies:
50
50
  requirement: !ruby/object:Gem::Requirement
51
51
  none: false
52
52
  requirements:
53
- - - ">="
53
+ - - ! '>='
54
54
  - !ruby/object:Gem::Version
55
55
  version: 0.5.1
56
56
  type: :runtime
@@ -58,7 +58,7 @@ dependencies:
58
58
  version_requirements: !ruby/object:Gem::Requirement
59
59
  none: false
60
60
  requirements:
61
- - - ">="
61
+ - - ! '>='
62
62
  - !ruby/object:Gem::Version
63
63
  version: 0.5.1
64
64
  - !ruby/object:Gem::Dependency
@@ -66,7 +66,7 @@ dependencies:
66
66
  requirement: !ruby/object:Gem::Requirement
67
67
  none: false
68
68
  requirements:
69
- - - ">="
69
+ - - ! '>='
70
70
  - !ruby/object:Gem::Version
71
71
  version: 2.1.0
72
72
  type: :runtime
@@ -74,7 +74,7 @@ dependencies:
74
74
  version_requirements: !ruby/object:Gem::Requirement
75
75
  none: false
76
76
  requirements:
77
- - - ">="
77
+ - - ! '>='
78
78
  - !ruby/object:Gem::Version
79
79
  version: 2.1.0
80
80
  - !ruby/object:Gem::Dependency
@@ -82,7 +82,7 @@ dependencies:
82
82
  requirement: !ruby/object:Gem::Requirement
83
83
  none: false
84
84
  requirements:
85
- - - ">="
85
+ - - ! '>='
86
86
  - !ruby/object:Gem::Version
87
87
  version: 3.0.0
88
88
  type: :runtime
@@ -90,7 +90,7 @@ dependencies:
90
90
  version_requirements: !ruby/object:Gem::Requirement
91
91
  none: false
92
92
  requirements:
93
- - - ">="
93
+ - - ! '>='
94
94
  - !ruby/object:Gem::Version
95
95
  version: 3.0.0
96
96
  - !ruby/object:Gem::Dependency
@@ -98,7 +98,7 @@ dependencies:
98
98
  requirement: !ruby/object:Gem::Requirement
99
99
  none: false
100
100
  requirements:
101
- - - ">="
101
+ - - ! '>='
102
102
  - !ruby/object:Gem::Version
103
103
  version: 3.0.0
104
104
  type: :runtime
@@ -106,7 +106,7 @@ dependencies:
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  none: false
108
108
  requirements:
109
- - - ">="
109
+ - - ! '>='
110
110
  - !ruby/object:Gem::Version
111
111
  version: 3.0.0
112
112
  - !ruby/object:Gem::Dependency
@@ -114,7 +114,7 @@ dependencies:
114
114
  requirement: !ruby/object:Gem::Requirement
115
115
  none: false
116
116
  requirements:
117
- - - "~>"
117
+ - - ~>
118
118
  - !ruby/object:Gem::Version
119
119
  version: 3.0.0
120
120
  type: :runtime
@@ -122,7 +122,7 @@ dependencies:
122
122
  version_requirements: !ruby/object:Gem::Requirement
123
123
  none: false
124
124
  requirements:
125
- - - "~>"
125
+ - - ~>
126
126
  - !ruby/object:Gem::Version
127
127
  version: 3.0.0
128
128
  - !ruby/object:Gem::Dependency
@@ -130,7 +130,7 @@ dependencies:
130
130
  requirement: !ruby/object:Gem::Requirement
131
131
  none: false
132
132
  requirements:
133
- - - ">="
133
+ - - ! '>='
134
134
  - !ruby/object:Gem::Version
135
135
  version: '0'
136
136
  type: :runtime
@@ -138,7 +138,7 @@ dependencies:
138
138
  version_requirements: !ruby/object:Gem::Requirement
139
139
  none: false
140
140
  requirements:
141
- - - ">="
141
+ - - ! '>='
142
142
  - !ruby/object:Gem::Version
143
143
  version: '0'
144
144
  - !ruby/object:Gem::Dependency
@@ -146,7 +146,7 @@ dependencies:
146
146
  requirement: !ruby/object:Gem::Requirement
147
147
  none: false
148
148
  requirements:
149
- - - "~>"
149
+ - - ~>
150
150
  - !ruby/object:Gem::Version
151
151
  version: '1.3'
152
152
  type: :runtime
@@ -154,7 +154,7 @@ dependencies:
154
154
  version_requirements: !ruby/object:Gem::Requirement
155
155
  none: false
156
156
  requirements:
157
- - - "~>"
157
+ - - ~>
158
158
  - !ruby/object:Gem::Version
159
159
  version: '1.3'
160
160
  - !ruby/object:Gem::Dependency
@@ -162,7 +162,7 @@ dependencies:
162
162
  requirement: !ruby/object:Gem::Requirement
163
163
  none: false
164
164
  requirements:
165
- - - ">="
165
+ - - ! '>='
166
166
  - !ruby/object:Gem::Version
167
167
  version: '0'
168
168
  type: :runtime
@@ -170,7 +170,7 @@ dependencies:
170
170
  version_requirements: !ruby/object:Gem::Requirement
171
171
  none: false
172
172
  requirements:
173
- - - ">="
173
+ - - ! '>='
174
174
  - !ruby/object:Gem::Version
175
175
  version: '0'
176
176
  - !ruby/object:Gem::Dependency
@@ -178,7 +178,7 @@ dependencies:
178
178
  requirement: !ruby/object:Gem::Requirement
179
179
  none: false
180
180
  requirements:
181
- - - "~>"
181
+ - - ~>
182
182
  - !ruby/object:Gem::Version
183
183
  version: 0.3.8
184
184
  type: :runtime
@@ -186,7 +186,7 @@ dependencies:
186
186
  version_requirements: !ruby/object:Gem::Requirement
187
187
  none: false
188
188
  requirements:
189
- - - "~>"
189
+ - - ~>
190
190
  - !ruby/object:Gem::Version
191
191
  version: 0.3.8
192
192
  - !ruby/object:Gem::Dependency
@@ -194,7 +194,7 @@ dependencies:
194
194
  requirement: !ruby/object:Gem::Requirement
195
195
  none: false
196
196
  requirements:
197
- - - ">="
197
+ - - ! '>='
198
198
  - !ruby/object:Gem::Version
199
199
  version: '0'
200
200
  type: :runtime
@@ -202,7 +202,7 @@ dependencies:
202
202
  version_requirements: !ruby/object:Gem::Requirement
203
203
  none: false
204
204
  requirements:
205
- - - ">="
205
+ - - ! '>='
206
206
  - !ruby/object:Gem::Version
207
207
  version: '0'
208
208
  - !ruby/object:Gem::Dependency
@@ -210,7 +210,7 @@ dependencies:
210
210
  requirement: !ruby/object:Gem::Requirement
211
211
  none: false
212
212
  requirements:
213
- - - ">="
213
+ - - ! '>='
214
214
  - !ruby/object:Gem::Version
215
215
  version: '0'
216
216
  type: :development
@@ -218,7 +218,7 @@ dependencies:
218
218
  version_requirements: !ruby/object:Gem::Requirement
219
219
  none: false
220
220
  requirements:
221
- - - ">="
221
+ - - ! '>='
222
222
  - !ruby/object:Gem::Version
223
223
  version: '0'
224
224
  - !ruby/object:Gem::Dependency
@@ -226,7 +226,7 @@ dependencies:
226
226
  requirement: !ruby/object:Gem::Requirement
227
227
  none: false
228
228
  requirements:
229
- - - ">="
229
+ - - ! '>='
230
230
  - !ruby/object:Gem::Version
231
231
  version: '0'
232
232
  type: :development
@@ -234,7 +234,7 @@ dependencies:
234
234
  version_requirements: !ruby/object:Gem::Requirement
235
235
  none: false
236
236
  requirements:
237
- - - ">="
237
+ - - ! '>='
238
238
  - !ruby/object:Gem::Version
239
239
  version: '0'
240
240
  - !ruby/object:Gem::Dependency
@@ -242,7 +242,7 @@ dependencies:
242
242
  requirement: !ruby/object:Gem::Requirement
243
243
  none: false
244
244
  requirements:
245
- - - ">="
245
+ - - ! '>='
246
246
  - !ruby/object:Gem::Version
247
247
  version: '0'
248
248
  type: :development
@@ -250,7 +250,7 @@ dependencies:
250
250
  version_requirements: !ruby/object:Gem::Requirement
251
251
  none: false
252
252
  requirements:
253
- - - ">="
253
+ - - ! '>='
254
254
  - !ruby/object:Gem::Version
255
255
  version: '0'
256
256
  - !ruby/object:Gem::Dependency
@@ -258,7 +258,7 @@ dependencies:
258
258
  requirement: !ruby/object:Gem::Requirement
259
259
  none: false
260
260
  requirements:
261
- - - ">="
261
+ - - ! '>='
262
262
  - !ruby/object:Gem::Version
263
263
  version: 1.2.0
264
264
  type: :development
@@ -266,7 +266,7 @@ dependencies:
266
266
  version_requirements: !ruby/object:Gem::Requirement
267
267
  none: false
268
268
  requirements:
269
- - - ">="
269
+ - - ! '>='
270
270
  - !ruby/object:Gem::Version
271
271
  version: 1.2.0
272
272
  - !ruby/object:Gem::Dependency
@@ -274,7 +274,7 @@ dependencies:
274
274
  requirement: !ruby/object:Gem::Requirement
275
275
  none: false
276
276
  requirements:
277
- - - ">="
277
+ - - ! '>='
278
278
  - !ruby/object:Gem::Version
279
279
  version: 2.9.0
280
280
  type: :development
@@ -282,7 +282,7 @@ dependencies:
282
282
  version_requirements: !ruby/object:Gem::Requirement
283
283
  none: false
284
284
  requirements:
285
- - - ">="
285
+ - - ! '>='
286
286
  - !ruby/object:Gem::Version
287
287
  version: 2.9.0
288
288
  - !ruby/object:Gem::Dependency
@@ -290,7 +290,7 @@ dependencies:
290
290
  requirement: !ruby/object:Gem::Requirement
291
291
  none: false
292
292
  requirements:
293
- - - ">="
293
+ - - ! '>='
294
294
  - !ruby/object:Gem::Version
295
295
  version: '0'
296
296
  type: :development
@@ -298,7 +298,7 @@ dependencies:
298
298
  version_requirements: !ruby/object:Gem::Requirement
299
299
  none: false
300
300
  requirements:
301
- - - ">="
301
+ - - ! '>='
302
302
  - !ruby/object:Gem::Version
303
303
  version: '0'
304
304
  description: ActiveFedora provides for creating and managing objects in the Fedora
@@ -311,8 +311,8 @@ extra_rdoc_files:
311
311
  - LICENSE
312
312
  - README.textile
313
313
  files:
314
- - ".gitignore"
315
- - ".gitmodules"
314
+ - .gitignore
315
+ - .gitmodules
316
316
  - CONSOLE_GETTING_STARTED.textile
317
317
  - Gemfile
318
318
  - History.txt
@@ -555,21 +555,21 @@ require_paths:
555
555
  required_ruby_version: !ruby/object:Gem::Requirement
556
556
  none: false
557
557
  requirements:
558
- - - ">="
558
+ - - ! '>='
559
559
  - !ruby/object:Gem::Version
560
560
  version: 1.9.3
561
561
  required_rubygems_version: !ruby/object:Gem::Requirement
562
562
  none: false
563
563
  requirements:
564
- - - ">="
564
+ - - ! '>='
565
565
  - !ruby/object:Gem::Version
566
566
  version: '0'
567
567
  segments:
568
568
  - 0
569
- hash: 372868863086851520
569
+ hash: -3082058805428983203
570
570
  requirements: []
571
571
  rubyforge_project: rubyfedora
572
- rubygems_version: 1.8.25
572
+ rubygems_version: 1.8.24
573
573
  signing_key:
574
574
  specification_version: 3
575
575
  summary: A convenience libary for manipulating documents in the Fedora Repository.