active-fedora 8.2.0 → 8.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 402cc2862ebc8b90d81a374461a67bef373f7806
4
- data.tar.gz: 060ed97a31b4b2ec9b09ff515e7f05d9d155aae7
3
+ metadata.gz: e6d7acaa7fd5b4c4169d90edec5aeeb666827550
4
+ data.tar.gz: 07cd68277f2a42645b4d0287c0f440766345f748
5
5
  SHA512:
6
- metadata.gz: a9e901ffbe6a901c8676b8cc29e89b8d51f4d15dc3c55b1d14c48211673441d4c66a5734bd77513d89f5c69893ac8ea717de4ba32ab5a2b1db348978cd23127b
7
- data.tar.gz: f31e3ba7edb66489becbb171119b8a4d9c5b4dd938f10e81edebaef71014e287cdc3e9af0314cf7e7ef2968a3522b42a28b98b143f41dff8261d9a95a2bd0539
6
+ metadata.gz: b8af87b30741ba86a75b8dbc407151edbb3826187b65c495475138a4643d29051f87c1dce4a9a4eb545bd41a203865f69d7a42d99714ff4abc732acab1e3191c
7
+ data.tar.gz: 58d74f4be39a5c5982bfe058aa2c20b22ba80a67f7ee27f77edef45f6edc23b3120f7562c5310758f7eee12cd45a7ae1526bbbbdfc8cfb2ae3d99a4d9c87f2f3
@@ -63,7 +63,11 @@ module ActiveFedora
63
63
  if @full_result # side-effect from #id_reader
64
64
  ActiveFedora::SolrService.reify_solr_results([@full_result]).first
65
65
  else
66
- ActiveFedora::Base.find(id_reader, cast: true)
66
+ begin
67
+ ActiveFedora::Base.find(id_reader, cast: true)
68
+ rescue ActiveFedora::ObjectNotFoundError
69
+ nil
70
+ end
67
71
  end
68
72
  end
69
73
 
@@ -1,3 +1,3 @@
1
1
  module ActiveFedora
2
- VERSION = "8.2.0"
2
+ VERSION = "8.2.1"
3
3
  end
@@ -45,6 +45,11 @@ describe ActiveFedora::Base do
45
45
  book[:library_id] = library.id
46
46
  book.library_id.should == library.id
47
47
  end
48
+
49
+ it "safely handles invalid data" do
50
+ book[:library_id] = 'bad:identifier'
51
+ book.library.should be_nil
52
+ end
48
53
  end
49
54
 
50
55
  describe "getting the id property" do
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: 8.2.0
4
+ version: 8.2.1
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-10-17 00:00:00.000000000 Z
13
+ date: 2016-10-18 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rsolr