active-fedora 11.1.0 → 11.1.1
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.
- checksums.yaml +4 -4
 - data/.rubocop.yml +1 -0
 - data/History.txt +6 -0
 - data/lib/active_fedora/core.rb +1 -0
 - data/lib/active_fedora/railtie.rb +1 -1
 - data/lib/active_fedora/version.rb +1 -1
 - data/spec/unit/core_spec.rb +16 -4
 - metadata +2 -2
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA1:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 9323b783c7ef9187a43d0231994ad3ce39d8c2ca
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 7acee3df7da38562ff9133fdfacbc0e29d055c7c
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: eb08a929267e83e8258c572f9928a0da09fe847059e1423ac6236d6ae83ce7dee222f618ff73a225951d5d9644ee144917d925a184c64c1ce142d58989100474
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: 6e7f1404c76486f90c76b2d6993df02b11e6147cc4864c891f9f9c3982efe0b7a188926774f719262523b860c65be27a3ccaa7529b49d8862ce1487beb9e51e1
         
     | 
    
        data/.rubocop.yml
    CHANGED
    
    | 
         @@ -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'
         
     | 
    
        data/History.txt
    CHANGED
    
    | 
         @@ -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 
     | 
    
         | 
    
        data/lib/active_fedora/core.rb
    CHANGED
    
    | 
         @@ -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?
         
     | 
    
        data/spec/unit/core_spec.rb
    CHANGED
    
    | 
         @@ -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 
     | 
| 
       27 
     | 
    
         
            -
                 
     | 
| 
      
 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 
     | 
    
         
            -
             
     | 
| 
       30 
     | 
    
         
            -
             
     | 
| 
      
 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. 
     | 
| 
      
 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 
     | 
    
         
            +
            date: 2017-01-14 00:00:00.000000000 Z
         
     | 
| 
       14 
14 
     | 
    
         
             
            dependencies:
         
     | 
| 
       15 
15 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       16 
16 
     | 
    
         
             
              name: rsolr
         
     |