active-fedora 11.1.0 → 11.1.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: d30a0af700ab6f5855f2ac0dae9bd20aace608b3
4
- data.tar.gz: f2e755860c2c67c4559c339c1468fa0a23b6038f
3
+ metadata.gz: 9323b783c7ef9187a43d0231994ad3ce39d8c2ca
4
+ data.tar.gz: 7acee3df7da38562ff9133fdfacbc0e29d055c7c
5
5
  SHA512:
6
- metadata.gz: 61d91bdf7413839f75fa6be613786888dd74fd0a19253cc911886fbf6877d6b2d1903cb924c6312d0e92c5cc7d719f7394e5d5ab1c6d9d960a40b15c7d885125
7
- data.tar.gz: f11e71036ebc0316ebc79bef415d98e0f0fa09036f3ce7438cf6839baf3cca87a168f1ec53e83366913e24d33d246d3d394647ac21a9c5480a1f92610a67a030
6
+ metadata.gz: eb08a929267e83e8258c572f9928a0da09fe847059e1423ac6236d6ae83ce7dee222f618ff73a225951d5d9644ee144917d925a184c64c1ce142d58989100474
7
+ data.tar.gz: 6e7f1404c76486f90c76b2d6993df02b11e6147cc4864c891f9f9c3982efe0b7a188926774f719262523b860c65be27a3ccaa7529b49d8862ce1487beb9e51e1
@@ -36,6 +36,7 @@ Metrics/BlockNesting:
36
36
  Metrics/CyclomaticComplexity:
37
37
  Exclude:
38
38
  - 'lib/active_fedora.rb'
39
+ - 'lib/active_fedora/core.rb'
39
40
  - 'lib/active_fedora/reflection.rb'
40
41
  - 'lib/active_fedora/relation/finder_methods.rb'
41
42
  - 'lib/active_fedora/query_result_builder.rb'
@@ -1,3 +1,9 @@
1
+ v11.1.1
2
+ 2017-01-13: Don't modify passed in attributes [Justin Coyne]
3
+
4
+ 2017-01-13: When rails initializes, set the log if it previously was a
5
+ NullLogger [Justin Coyne]
6
+
1
7
  v11.1.0
2
8
  2017-01-12: Casting an RDF::URI to a RDF::URI is unnecessary [Justin Coyne]
3
9
 
@@ -30,6 +30,7 @@ module ActiveFedora
30
30
  # the given namespace.
31
31
  def initialize(attributes = nil, &_block)
32
32
  init_internals
33
+ attributes = attributes.dup if attributes # can't dup nil in Ruby 2.3
33
34
  id = attributes && (attributes.delete(:id) || attributes.delete('id'))
34
35
  @ldp_source = build_ldp_resource(id)
35
36
  raise IllegalOperation, "Attempting to recreate existing ldp_source: `#{ldp_source.subject}'" unless ldp_source.new?
@@ -9,7 +9,7 @@ module ActiveFedora
9
9
 
10
10
  initializer "active_fedora.logger" do
11
11
  ActiveSupport.on_load(:active_fedora) do
12
- self.logger ||= ::Rails.logger
12
+ self.logger = ::Rails.logger if logger.is_a? NullLogger
13
13
  Solrizer.logger ||= logger
14
14
  end
15
15
  end
@@ -1,3 +1,3 @@
1
1
  module ActiveFedora
2
- VERSION = "11.1.0".freeze
2
+ VERSION = "11.1.1".freeze
3
3
  end
@@ -23,11 +23,23 @@ describe ActiveFedora::Base do
23
23
  expect(book.has_model).to eq ['Book']
24
24
  end
25
25
 
26
- describe "initialize with a block" do
27
- subject(:book) { Book.new { |b| b.title = "The Sun also Rises" } }
26
+ describe "initialize" do
27
+ context "with a block" do
28
+ subject(:book) { Book.new { |b| b.title = "The Sun also Rises" } }
28
29
 
29
- it "has set the title" do
30
- expect(book.title).to eq "The Sun also Rises"
30
+ it "has set the title" do
31
+ expect(book.title).to eq "The Sun also Rises"
32
+ end
33
+ end
34
+
35
+ context "with an identifier" do
36
+ subject(:book) { Book.new(attributes) }
37
+ let(:attributes) { { id: '1234' } }
38
+
39
+ it "sets the id and doesn't modify the passed hash" do
40
+ expect(book.id).to eq '1234'
41
+ expect(attributes[:id]).to eq '1234'
42
+ end
31
43
  end
32
44
  end
33
45
 
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.1.0
4
+ version: 11.1.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: 2017-01-13 00:00:00.000000000 Z
13
+ date: 2017-01-14 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rsolr