active-fedora 9.10.0.pre1 → 9.10.0.pre2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -108,7 +108,7 @@ describe ActiveFedora::File do
108
108
  test_object.save
109
109
  end
110
110
 
111
- it "does not be changed" do
111
+ it "is not changed" do
112
112
  expect(test_object.attached_files[path]).to_not be_changed
113
113
  end
114
114
 
@@ -7,7 +7,7 @@ describe "persisting objects" do
7
7
  has_metadata type: ActiveFedora::SimpleDatastream, name: "foo" do |m|
8
8
  m.field "name", :string
9
9
  end
10
- property :name, delegate_to: 'foo', multiple: false
10
+ property :name, predicate: ::RDF::Vocab::DC.title, multiple: false
11
11
  validates :name, presence: true
12
12
  end
13
13
  end
@@ -38,7 +38,9 @@ describe ActiveFedora::Base do
38
38
  before do
39
39
  class BarHistory4 < ActiveFedora::Base
40
40
  has_metadata type: BarStream2, name: "xmlish"
41
- property :cow, delegate_to: 'xmlish'
41
+ Deprecation.silence(ActiveFedora::Attributes) do
42
+ property :cow, delegate_to: 'xmlish'
43
+ end
42
44
  end
43
45
  end
44
46
  after do
@@ -63,7 +65,9 @@ describe ActiveFedora::Base do
63
65
  before do
64
66
  class BarHistory4 < ActiveFedora::Base
65
67
  has_metadata type: BarStream2, name: "xmlish"
66
- property :cow, delegate_to: 'xmlish', multiple: false
68
+ Deprecation.silence(ActiveFedora::Attributes) do
69
+ property :cow, delegate_to: 'xmlish', multiple: false
70
+ end
67
71
  end
68
72
  end
69
73
  after do
@@ -83,7 +87,9 @@ describe ActiveFedora::Base do
83
87
  before do
84
88
  class BarHistory4 < ActiveFedora::Base
85
89
  has_metadata type: BarStream2, name: "xmlish"
86
- property :cow, delegate_to: 'xmlish', multiple: false
90
+ Deprecation.silence(ActiveFedora::Attributes) do
91
+ property :cow, delegate_to: 'xmlish', multiple: false
92
+ end
87
93
  end
88
94
  end
89
95
  after do
@@ -294,17 +300,17 @@ describe ActiveFedora::Base do
294
300
  end
295
301
 
296
302
  it "raises an error on the reader when the field isn't delegated" do
297
- expect { subject['donkey'] }.to raise_error ActiveFedora::UnknownAttributeError, "BarHistory2 does not have an attribute `donkey'"
303
+ expect { subject['donkey'] }.to raise_error ActiveFedora::UnknownAttributeError, "unknown attribute 'donkey' for BarHistory2."
298
304
  end
299
305
 
300
306
  it "raises an error on the setter when the field isn't delegated" do
301
- expect { subject['donkey'] = "bray" }.to raise_error ActiveFedora::UnknownAttributeError, "BarHistory2 does not have an attribute `donkey'"
307
+ expect { subject['donkey'] = "bray" }.to raise_error ActiveFedora::UnknownAttributeError, "unknown attribute 'donkey' for BarHistory2."
302
308
  end
303
309
  end
304
310
 
305
311
  describe "attributes=" do
306
312
  it "raises an error on an invalid attribute" do
307
- expect { subject.attributes = { 'donkey' => "bray" } }.to raise_error ActiveFedora::UnknownAttributeError, "BarHistory2 does not have an attribute `donkey'"
313
+ expect { subject.attributes = { 'donkey' => "bray" } }.to raise_error ActiveFedora::UnknownAttributeError, "unknown attribute 'donkey' for BarHistory2."
308
314
  end
309
315
  end
310
316
 
@@ -330,7 +336,7 @@ describe ActiveFedora::Base do
330
336
  end
331
337
 
332
338
  it 'raises an error if the attribute does not exist' do
333
- expect { BarHistory2.multiple?(:arbitrary_nonexistent_attribute) }.to raise_error ActiveFedora::UnknownAttributeError, "BarHistory2 does not have an attribute `arbitrary_nonexistent_attribute'"
339
+ expect { BarHistory2.multiple?(:arbitrary_nonexistent_attribute) }.to raise_error ActiveFedora::UnknownAttributeError, "unknown attribute 'arbitrary_nonexistent_attribute' for BarHistory2."
334
340
  end
335
341
  end
336
342
 
@@ -379,9 +379,9 @@ describe ActiveFedora::File do
379
379
  subject.content = "foo"
380
380
  subject.save
381
381
  expect(subject).to receive(:b_save).once
382
- expect(subject).not_to receive(:a_save)
382
+ expect(subject).to receive(:a_save)
383
383
  expect(subject).to receive(:b_update).once
384
- expect(subject).not_to receive(:a_update)
384
+ expect(subject).to receive(:a_update)
385
385
  subject.save
386
386
  }
387
387
  end
@@ -47,7 +47,7 @@ describe ActiveFedora::Base do
47
47
  end
48
48
 
49
49
  describe "#save!" do
50
- before { allow(subject).to receive(:create_record) } # prevent saving to Fedora/Solr
50
+ before { allow(subject).to receive(:_create_record) } # prevent saving to Fedora/Solr
51
51
 
52
52
  it "validates only once" do
53
53
  expect(subject).to receive(:perform_validations).once.and_return(true)
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.10.0.pre1
4
+ version: 9.10.0.pre2
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: 2016-03-19 00:00:00.000000000 Z
13
+ date: 2016-03-22 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rsolr
@@ -405,6 +405,7 @@ files:
405
405
  - lib/active_fedora/associations/singular_association.rb
406
406
  - lib/active_fedora/associations/singular_rdf.rb
407
407
  - lib/active_fedora/attached_files.rb
408
+ - lib/active_fedora/attribute_assignment.rb
408
409
  - lib/active_fedora/attribute_methods.rb
409
410
  - lib/active_fedora/attribute_methods/dirty.rb
410
411
  - lib/active_fedora/attribute_methods/read.rb
@@ -426,6 +427,7 @@ files:
426
427
  - lib/active_fedora/checksum.rb
427
428
  - lib/active_fedora/clean_connection.rb
428
429
  - lib/active_fedora/cleaner.rb
430
+ - lib/active_fedora/common.rb
429
431
  - lib/active_fedora/config.rb
430
432
  - lib/active_fedora/containers/container.rb
431
433
  - lib/active_fedora/containers/direct_container.rb
@@ -446,6 +448,7 @@ files:
446
448
  - lib/active_fedora/file/streaming.rb
447
449
  - lib/active_fedora/file_configurator.rb
448
450
  - lib/active_fedora/file_path_builder.rb
451
+ - lib/active_fedora/file_persistence.rb
449
452
  - lib/active_fedora/file_relation.rb
450
453
  - lib/active_fedora/files_hash.rb
451
454
  - lib/active_fedora/fixity_service.rb
@@ -458,6 +461,7 @@ files:
458
461
  - lib/active_fedora/indexing/map.rb
459
462
  - lib/active_fedora/indexing_service.rb
460
463
  - lib/active_fedora/inheritable_accessors.rb
464
+ - lib/active_fedora/inheritance.rb
461
465
  - lib/active_fedora/ldp_cache.rb
462
466
  - lib/active_fedora/ldp_resource.rb
463
467
  - lib/active_fedora/ldp_resource_service.rb