active-fedora 4.1.0 → 4.2.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -99,7 +99,7 @@ describe ActiveFedora::SemanticNode do
99
99
 
100
100
  it "should add a literal relationship to the relationships graph" do
101
101
  @node.add_relationship("isMemberOf", 'demo:9', true)
102
- @node.ids_for_outbound("isMemberOf").should == ['demo:9']
102
+ @node.relationships("isMemberOf").should == ['demo:9']
103
103
  end
104
104
 
105
105
  it "adding relationship to an instance should not affect class-level relationships hash" do
@@ -109,8 +109,22 @@ describe ActiveFedora::SemanticNode do
109
109
  local_test_node1.add_relationship(:is_member_of, 'demo:10')
110
110
  local_test_node2.expects(:rels_ext).returns(stub('rels-ext', :content=>''))
111
111
 
112
- local_test_node1.ids_for_outbound(:is_member_of).should == ["demo:10"]
113
- local_test_node2.ids_for_outbound(:is_member_of).should == []
112
+ local_test_node1.relationships(:is_member_of).should == ["demo:10"]
113
+ local_test_node2.relationships(:is_member_of).should == []
114
+ end
115
+
116
+ end
117
+
118
+ describe ".clear_relationship" do
119
+ before do
120
+ @node.add_relationship(:is_member_of, 'demo:9')
121
+ @node.add_relationship(:is_member_of, 'demo:7')
122
+ @node.add_relationship(:is_brother_of, 'demo:9')
123
+ end
124
+ it "should clear the specified relationship" do
125
+ @node.clear_relationship(:is_member_of)
126
+ @node.relationships(:is_member_of).should == []
127
+ @node.relationships(:is_brother_of).should == ['demo:9']
114
128
  end
115
129
 
116
130
  end
@@ -10,8 +10,17 @@ describe ActiveFedora::UnsavedDigitalObject do
10
10
  @obj.ownerId = 'fooo'
11
11
  @obj.ownerId.should == 'fooo'
12
12
  end
13
+
14
+ it "should have a default pid" do
15
+ @obj.pid.should == "__DO_NOT_USE__"
16
+ end
17
+ it "should be able to set the pid" do
18
+ @obj.pid = "my:new_object"
19
+ @obj.pid.should == "my:new_object"
20
+ end
13
21
  end
14
22
 
23
+
15
24
  describe "#save" do
16
25
  before :all do
17
26
  obj = ActiveFedora::UnsavedDigitalObject.new(ActiveFedora::Base, 'bar')
metadata CHANGED
@@ -1,248 +1,338 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: active-fedora
3
- version: !ruby/object:Gem::Version
4
- version: 4.1.0
3
+ version: !ruby/object:Gem::Version
4
+ hash: 55
5
5
  prerelease:
6
+ segments:
7
+ - 4
8
+ - 2
9
+ - 0
10
+ version: 4.2.0
6
11
  platform: ruby
7
- authors:
12
+ authors:
8
13
  - Matt Zumwalt
9
14
  - McClain Looney
10
15
  - Justin Coyne
11
16
  autorequire:
12
17
  bindir: bin
13
18
  cert_chain: []
14
- date: 2012-05-09 00:00:00.000000000 Z
15
- dependencies:
16
- - !ruby/object:Gem::Dependency
19
+
20
+ date: 2012-06-12 00:00:00 Z
21
+ dependencies:
22
+ - !ruby/object:Gem::Dependency
17
23
  name: rsolr
18
- requirement: &70192625579460 !ruby/object:Gem::Requirement
24
+ prerelease: false
25
+ requirement: &id001 !ruby/object:Gem::Requirement
19
26
  none: false
20
- requirements:
21
- - - ! '>='
22
- - !ruby/object:Gem::Version
23
- version: '0'
27
+ requirements:
28
+ - - ">="
29
+ - !ruby/object:Gem::Version
30
+ hash: 3
31
+ segments:
32
+ - 0
33
+ version: "0"
24
34
  type: :runtime
25
- prerelease: false
26
- version_requirements: *70192625579460
27
- - !ruby/object:Gem::Dependency
35
+ version_requirements: *id001
36
+ - !ruby/object:Gem::Dependency
28
37
  name: xml-simple
29
- requirement: &70192625578620 !ruby/object:Gem::Requirement
38
+ prerelease: false
39
+ requirement: &id002 !ruby/object:Gem::Requirement
30
40
  none: false
31
- requirements:
32
- - - ! '>='
33
- - !ruby/object:Gem::Version
41
+ requirements:
42
+ - - ">="
43
+ - !ruby/object:Gem::Version
44
+ hash: 15
45
+ segments:
46
+ - 1
47
+ - 0
48
+ - 12
34
49
  version: 1.0.12
35
50
  type: :runtime
36
- prerelease: false
37
- version_requirements: *70192625578620
38
- - !ruby/object:Gem::Dependency
51
+ version_requirements: *id002
52
+ - !ruby/object:Gem::Dependency
39
53
  name: mime-types
40
- requirement: &70192625577920 !ruby/object:Gem::Requirement
54
+ prerelease: false
55
+ requirement: &id003 !ruby/object:Gem::Requirement
41
56
  none: false
42
- requirements:
43
- - - ! '>='
44
- - !ruby/object:Gem::Version
45
- version: '1.16'
57
+ requirements:
58
+ - - ">="
59
+ - !ruby/object:Gem::Version
60
+ hash: 47
61
+ segments:
62
+ - 1
63
+ - 16
64
+ version: "1.16"
46
65
  type: :runtime
47
- prerelease: false
48
- version_requirements: *70192625577920
49
- - !ruby/object:Gem::Dependency
66
+ version_requirements: *id003
67
+ - !ruby/object:Gem::Dependency
50
68
  name: multipart-post
51
- requirement: &70192625577060 !ruby/object:Gem::Requirement
69
+ prerelease: false
70
+ requirement: &id004 !ruby/object:Gem::Requirement
52
71
  none: false
53
- requirements:
54
- - - =
55
- - !ruby/object:Gem::Version
72
+ requirements:
73
+ - - "="
74
+ - !ruby/object:Gem::Version
75
+ hash: 23
76
+ segments:
77
+ - 1
78
+ - 1
79
+ - 2
56
80
  version: 1.1.2
57
81
  type: :runtime
58
- prerelease: false
59
- version_requirements: *70192625577060
60
- - !ruby/object:Gem::Dependency
82
+ version_requirements: *id004
83
+ - !ruby/object:Gem::Dependency
61
84
  name: nokogiri
62
- requirement: &70192625534600 !ruby/object:Gem::Requirement
85
+ prerelease: false
86
+ requirement: &id005 !ruby/object:Gem::Requirement
63
87
  none: false
64
- requirements:
65
- - - ! '>='
66
- - !ruby/object:Gem::Version
67
- version: '0'
88
+ requirements:
89
+ - - ">="
90
+ - !ruby/object:Gem::Version
91
+ hash: 3
92
+ segments:
93
+ - 0
94
+ version: "0"
68
95
  type: :runtime
69
- prerelease: false
70
- version_requirements: *70192625534600
71
- - !ruby/object:Gem::Dependency
96
+ version_requirements: *id005
97
+ - !ruby/object:Gem::Dependency
72
98
  name: om
73
- requirement: &70192625533500 !ruby/object:Gem::Requirement
99
+ prerelease: false
100
+ requirement: &id006 !ruby/object:Gem::Requirement
74
101
  none: false
75
- requirements:
102
+ requirements:
76
103
  - - ~>
77
- - !ruby/object:Gem::Version
104
+ - !ruby/object:Gem::Version
105
+ hash: 15
106
+ segments:
107
+ - 1
108
+ - 6
109
+ - 0
78
110
  version: 1.6.0
79
111
  type: :runtime
80
- prerelease: false
81
- version_requirements: *70192625533500
82
- - !ruby/object:Gem::Dependency
112
+ version_requirements: *id006
113
+ - !ruby/object:Gem::Dependency
83
114
  name: solrizer
84
- requirement: &70192625531500 !ruby/object:Gem::Requirement
115
+ prerelease: false
116
+ requirement: &id007 !ruby/object:Gem::Requirement
85
117
  none: false
86
- requirements:
118
+ requirements:
87
119
  - - ~>
88
- - !ruby/object:Gem::Version
120
+ - !ruby/object:Gem::Version
121
+ hash: 31
122
+ segments:
123
+ - 1
124
+ - 2
125
+ - 0
89
126
  version: 1.2.0
90
127
  type: :runtime
91
- prerelease: false
92
- version_requirements: *70192625531500
93
- - !ruby/object:Gem::Dependency
128
+ version_requirements: *id007
129
+ - !ruby/object:Gem::Dependency
94
130
  name: activeresource
95
- requirement: &70192625530520 !ruby/object:Gem::Requirement
131
+ prerelease: false
132
+ requirement: &id008 !ruby/object:Gem::Requirement
96
133
  none: false
97
- requirements:
98
- - - ! '>='
99
- - !ruby/object:Gem::Version
134
+ requirements:
135
+ - - ">="
136
+ - !ruby/object:Gem::Version
137
+ hash: 7
138
+ segments:
139
+ - 3
140
+ - 0
141
+ - 0
100
142
  version: 3.0.0
101
143
  type: :runtime
102
- prerelease: false
103
- version_requirements: *70192625530520
104
- - !ruby/object:Gem::Dependency
144
+ version_requirements: *id008
145
+ - !ruby/object:Gem::Dependency
105
146
  name: activesupport
106
- requirement: &70192625529820 !ruby/object:Gem::Requirement
147
+ prerelease: false
148
+ requirement: &id009 !ruby/object:Gem::Requirement
107
149
  none: false
108
- requirements:
109
- - - ! '>='
110
- - !ruby/object:Gem::Version
150
+ requirements:
151
+ - - ">="
152
+ - !ruby/object:Gem::Version
153
+ hash: 7
154
+ segments:
155
+ - 3
156
+ - 0
157
+ - 0
111
158
  version: 3.0.0
112
159
  type: :runtime
113
- prerelease: false
114
- version_requirements: *70192625529820
115
- - !ruby/object:Gem::Dependency
160
+ version_requirements: *id009
161
+ - !ruby/object:Gem::Dependency
116
162
  name: mediashelf-loggable
117
- requirement: &70192625529300 !ruby/object:Gem::Requirement
163
+ prerelease: false
164
+ requirement: &id010 !ruby/object:Gem::Requirement
118
165
  none: false
119
- requirements:
120
- - - ! '>='
121
- - !ruby/object:Gem::Version
122
- version: '0'
166
+ requirements:
167
+ - - ">="
168
+ - !ruby/object:Gem::Version
169
+ hash: 3
170
+ segments:
171
+ - 0
172
+ version: "0"
123
173
  type: :runtime
124
- prerelease: false
125
- version_requirements: *70192625529300
126
- - !ruby/object:Gem::Dependency
174
+ version_requirements: *id010
175
+ - !ruby/object:Gem::Dependency
127
176
  name: equivalent-xml
128
- requirement: &70192625528640 !ruby/object:Gem::Requirement
177
+ prerelease: false
178
+ requirement: &id011 !ruby/object:Gem::Requirement
129
179
  none: false
130
- requirements:
131
- - - ! '>='
132
- - !ruby/object:Gem::Version
133
- version: '0'
180
+ requirements:
181
+ - - ">="
182
+ - !ruby/object:Gem::Version
183
+ hash: 3
184
+ segments:
185
+ - 0
186
+ version: "0"
134
187
  type: :runtime
135
- prerelease: false
136
- version_requirements: *70192625528640
137
- - !ruby/object:Gem::Dependency
188
+ version_requirements: *id011
189
+ - !ruby/object:Gem::Dependency
138
190
  name: rubydora
139
- requirement: &70192625528120 !ruby/object:Gem::Requirement
191
+ prerelease: false
192
+ requirement: &id012 !ruby/object:Gem::Requirement
140
193
  none: false
141
- requirements:
194
+ requirements:
142
195
  - - ~>
143
- - !ruby/object:Gem::Version
144
- version: 0.5.8
196
+ - !ruby/object:Gem::Version
197
+ hash: 25
198
+ segments:
199
+ - 0
200
+ - 5
201
+ - 9
202
+ version: 0.5.9
145
203
  type: :runtime
146
- prerelease: false
147
- version_requirements: *70192625528120
148
- - !ruby/object:Gem::Dependency
204
+ version_requirements: *id012
205
+ - !ruby/object:Gem::Dependency
149
206
  name: rdf
150
- requirement: &70192625527680 !ruby/object:Gem::Requirement
207
+ prerelease: false
208
+ requirement: &id013 !ruby/object:Gem::Requirement
151
209
  none: false
152
- requirements:
153
- - - ! '>='
154
- - !ruby/object:Gem::Version
155
- version: '0'
210
+ requirements:
211
+ - - ">="
212
+ - !ruby/object:Gem::Version
213
+ hash: 3
214
+ segments:
215
+ - 0
216
+ version: "0"
156
217
  type: :runtime
157
- prerelease: false
158
- version_requirements: *70192625527680
159
- - !ruby/object:Gem::Dependency
218
+ version_requirements: *id013
219
+ - !ruby/object:Gem::Dependency
160
220
  name: rdf-rdfxml
161
- requirement: &70192625526960 !ruby/object:Gem::Requirement
221
+ prerelease: false
222
+ requirement: &id014 !ruby/object:Gem::Requirement
162
223
  none: false
163
- requirements:
164
- - - =
165
- - !ruby/object:Gem::Version
166
- version: 0.3.5
224
+ requirements:
225
+ - - ~>
226
+ - !ruby/object:Gem::Version
227
+ hash: 3
228
+ segments:
229
+ - 0
230
+ - 3
231
+ - 8
232
+ version: 0.3.8
167
233
  type: :runtime
168
- prerelease: false
169
- version_requirements: *70192625526960
170
- - !ruby/object:Gem::Dependency
234
+ version_requirements: *id014
235
+ - !ruby/object:Gem::Dependency
171
236
  name: yard
172
- requirement: &70192625526340 !ruby/object:Gem::Requirement
237
+ prerelease: false
238
+ requirement: &id015 !ruby/object:Gem::Requirement
173
239
  none: false
174
- requirements:
175
- - - ! '>='
176
- - !ruby/object:Gem::Version
177
- version: '0'
240
+ requirements:
241
+ - - ">="
242
+ - !ruby/object:Gem::Version
243
+ hash: 3
244
+ segments:
245
+ - 0
246
+ version: "0"
178
247
  type: :development
179
- prerelease: false
180
- version_requirements: *70192625526340
181
- - !ruby/object:Gem::Dependency
248
+ version_requirements: *id015
249
+ - !ruby/object:Gem::Dependency
182
250
  name: RedCloth
183
- requirement: &70192625525460 !ruby/object:Gem::Requirement
251
+ prerelease: false
252
+ requirement: &id016 !ruby/object:Gem::Requirement
184
253
  none: false
185
- requirements:
186
- - - ! '>='
187
- - !ruby/object:Gem::Version
188
- version: '0'
254
+ requirements:
255
+ - - ">="
256
+ - !ruby/object:Gem::Version
257
+ hash: 3
258
+ segments:
259
+ - 0
260
+ version: "0"
189
261
  type: :development
190
- prerelease: false
191
- version_requirements: *70192625525460
192
- - !ruby/object:Gem::Dependency
262
+ version_requirements: *id016
263
+ - !ruby/object:Gem::Dependency
193
264
  name: rake
194
- requirement: &70192625524480 !ruby/object:Gem::Requirement
265
+ prerelease: false
266
+ requirement: &id017 !ruby/object:Gem::Requirement
195
267
  none: false
196
- requirements:
197
- - - ! '>='
198
- - !ruby/object:Gem::Version
199
- version: '0'
268
+ requirements:
269
+ - - ">="
270
+ - !ruby/object:Gem::Version
271
+ hash: 3
272
+ segments:
273
+ - 0
274
+ version: "0"
200
275
  type: :development
201
- prerelease: false
202
- version_requirements: *70192625524480
203
- - !ruby/object:Gem::Dependency
276
+ version_requirements: *id017
277
+ - !ruby/object:Gem::Dependency
204
278
  name: jettywrapper
205
- requirement: &70192625522980 !ruby/object:Gem::Requirement
279
+ prerelease: false
280
+ requirement: &id018 !ruby/object:Gem::Requirement
206
281
  none: false
207
- requirements:
208
- - - ! '>='
209
- - !ruby/object:Gem::Version
282
+ requirements:
283
+ - - ">="
284
+ - !ruby/object:Gem::Version
285
+ hash: 31
286
+ segments:
287
+ - 1
288
+ - 2
289
+ - 0
210
290
  version: 1.2.0
211
291
  type: :development
212
- prerelease: false
213
- version_requirements: *70192625522980
214
- - !ruby/object:Gem::Dependency
292
+ version_requirements: *id018
293
+ - !ruby/object:Gem::Dependency
215
294
  name: rspec
216
- requirement: &70192625521940 !ruby/object:Gem::Requirement
295
+ prerelease: false
296
+ requirement: &id019 !ruby/object:Gem::Requirement
217
297
  none: false
218
- requirements:
219
- - - ! '>='
220
- - !ruby/object:Gem::Version
298
+ requirements:
299
+ - - ">="
300
+ - !ruby/object:Gem::Version
301
+ hash: 43
302
+ segments:
303
+ - 2
304
+ - 9
305
+ - 0
221
306
  version: 2.9.0
222
307
  type: :development
223
- prerelease: false
224
- version_requirements: *70192625521940
225
- - !ruby/object:Gem::Dependency
308
+ version_requirements: *id019
309
+ - !ruby/object:Gem::Dependency
226
310
  name: mocha
227
- requirement: &70192625521000 !ruby/object:Gem::Requirement
311
+ prerelease: false
312
+ requirement: &id020 !ruby/object:Gem::Requirement
228
313
  none: false
229
- requirements:
230
- - - ! '>='
231
- - !ruby/object:Gem::Version
232
- version: 0.9.8
314
+ requirements:
315
+ - - "="
316
+ - !ruby/object:Gem::Version
317
+ hash: 61
318
+ segments:
319
+ - 0
320
+ - 10
321
+ - 5
322
+ version: 0.10.5
233
323
  type: :development
234
- prerelease: false
235
- version_requirements: *70192625521000
236
- description: ActiveFedora provides for creating and managing objects in the Fedora
237
- Repository Architecture.
238
- email:
324
+ version_requirements: *id020
325
+ description: ActiveFedora provides for creating and managing objects in the Fedora Repository Architecture.
326
+ email:
239
327
  - matt.zumwalt@yourmediashelf.com
240
328
  executables: []
329
+
241
330
  extensions: []
242
- extra_rdoc_files:
331
+
332
+ extra_rdoc_files:
243
333
  - LICENSE
244
334
  - README.textile
245
- files:
335
+ files:
246
336
  - .document
247
337
  - .gitignore
248
338
  - .gitmodules
@@ -456,29 +546,38 @@ files:
456
546
  - spec/unit/validations_spec.rb
457
547
  homepage: https://github.com/projecthydra/active_fedora
458
548
  licenses: []
549
+
459
550
  post_install_message:
460
551
  rdoc_options: []
461
- require_paths:
552
+
553
+ require_paths:
462
554
  - lib
463
- required_ruby_version: !ruby/object:Gem::Requirement
555
+ required_ruby_version: !ruby/object:Gem::Requirement
464
556
  none: false
465
- requirements:
466
- - - ! '>='
467
- - !ruby/object:Gem::Version
468
- version: '0'
469
- required_rubygems_version: !ruby/object:Gem::Requirement
557
+ requirements:
558
+ - - ">="
559
+ - !ruby/object:Gem::Version
560
+ hash: 3
561
+ segments:
562
+ - 0
563
+ version: "0"
564
+ required_rubygems_version: !ruby/object:Gem::Requirement
470
565
  none: false
471
- requirements:
472
- - - ! '>='
473
- - !ruby/object:Gem::Version
474
- version: '0'
566
+ requirements:
567
+ - - ">="
568
+ - !ruby/object:Gem::Version
569
+ hash: 3
570
+ segments:
571
+ - 0
572
+ version: "0"
475
573
  requirements: []
574
+
476
575
  rubyforge_project: rubyfedora
477
- rubygems_version: 1.8.10
576
+ rubygems_version: 1.8.24
478
577
  signing_key:
479
578
  specification_version: 3
480
579
  summary: A convenience libary for manipulating documents in the Fedora Repository.
481
- test_files:
580
+ test_files:
482
581
  - spec/config_helper.rb
483
582
  - spec/fixtures/changeme155.xml
484
583
  - spec/fixtures/dino.jpg