active-fedora 12.0.2 → 12.0.3
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 +5 -5
- data/.circleci/config.yml +47 -0
- data/Gemfile +2 -1
- data/active-fedora.gemspec +1 -1
- data/lib/active_fedora/file.rb +1 -3
- data/lib/active_fedora/version.rb +1 -1
- data/spec/spec_helper.rb +1 -1
- data/spec/unit/file_spec.rb +17 -0
- metadata +12 -7
- data/.travis.yml +0 -15
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 | 
            -
             | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 2 | 
            +
            SHA256:
         | 
| 3 | 
            +
              metadata.gz: 74801c6b7c20e589016a06beb4bfb08b5cae15c8d2c9da1d3b90ba31da494b93
         | 
| 4 | 
            +
              data.tar.gz: 3ba72febc4344898aedc515c07eea090bffe96748a5bab209745f0306e8cf5f9
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 703f5492c6bf6b23c2c343d0a24039b15b2b7f02976d1603c8a49a12afc00eec10079da508e668e8dfca84bc63065e09f43b95441723326ef233d20d32489c8d
         | 
| 7 | 
            +
              data.tar.gz: a0f39c00a6ef9a78c9f81fd96c364244e970a64ae8da4c706cb3052c26acfd3bf2f782bb2d0421cb1702f54176c38311081c03cc33530e0eb92411c9b3ce95e2
         | 
| @@ -0,0 +1,47 @@ | |
| 1 | 
            +
            version: 2.1
         | 
| 2 | 
            +
            orbs:
         | 
| 3 | 
            +
              samvera: samvera/circleci-orb@0
         | 
| 4 | 
            +
            jobs:
         | 
| 5 | 
            +
              bundle_lint_test:
         | 
| 6 | 
            +
                parameters:
         | 
| 7 | 
            +
                  ruby_version:
         | 
| 8 | 
            +
                    type: string
         | 
| 9 | 
            +
                  bundler_version:
         | 
| 10 | 
            +
                    type: string
         | 
| 11 | 
            +
                    default: 1.17.3
         | 
| 12 | 
            +
                  rails_version:
         | 
| 13 | 
            +
                    type: string
         | 
| 14 | 
            +
                  solr_config_path:
         | 
| 15 | 
            +
                    type: string
         | 
| 16 | 
            +
                    default: lib/generators/active_fedora/config/solr/templates/solr/config
         | 
| 17 | 
            +
                executor:
         | 
| 18 | 
            +
                  name: 'samvera/ruby_fcrepo_solr'
         | 
| 19 | 
            +
                  ruby_version: << parameters.ruby_version >>
         | 
| 20 | 
            +
                environment:
         | 
| 21 | 
            +
                  RAILS_VERSION: << parameters.rails_version >>
         | 
| 22 | 
            +
                steps:
         | 
| 23 | 
            +
                  - samvera/cached_checkout
         | 
| 24 | 
            +
             | 
| 25 | 
            +
                  - samvera/bundle_for_gem:
         | 
| 26 | 
            +
                      ruby_version: << parameters.ruby_version >>
         | 
| 27 | 
            +
                      bundler_version: << parameters.bundler_version >>
         | 
| 28 | 
            +
                      project: 'active-fedora'
         | 
| 29 | 
            +
             | 
| 30 | 
            +
                  - samvera/install_solr_core:
         | 
| 31 | 
            +
                      solr_config_path: << parameters.solr_config_path >>
         | 
| 32 | 
            +
             | 
| 33 | 
            +
                  - samvera/rubocop
         | 
| 34 | 
            +
             | 
| 35 | 
            +
                  - samvera/parallel_rspec
         | 
| 36 | 
            +
             | 
| 37 | 
            +
            workflows:
         | 
| 38 | 
            +
              ci:
         | 
| 39 | 
            +
                jobs:
         | 
| 40 | 
            +
                  - bundle_lint_test:
         | 
| 41 | 
            +
                      name: ruby2-5_rails5-1
         | 
| 42 | 
            +
                      ruby_version: 2.5.7
         | 
| 43 | 
            +
                      rails_version: 5.1.7
         | 
| 44 | 
            +
                  - bundle_lint_test:
         | 
| 45 | 
            +
                      name: ruby2-5_rails4-2
         | 
| 46 | 
            +
                      ruby_version: 2.5.7
         | 
| 47 | 
            +
                      rails_version: 4.2.8
         | 
    
        data/Gemfile
    CHANGED
    
    | @@ -4,7 +4,7 @@ source "https://rubygems.org" | |
| 4 4 |  | 
| 5 5 | 
             
            gemspec path: File.expand_path('..', __FILE__)
         | 
| 6 6 |  | 
| 7 | 
            -
            gem 'byebug' unless ENV[' | 
| 7 | 
            +
            gem 'byebug' unless ENV['CI']
         | 
| 8 8 | 
             
            gem 'pry-byebug' unless ENV['CI']
         | 
| 9 9 |  | 
| 10 10 | 
             
            gem 'activemodel', ENV['RAILS_VERSION'] if ENV['RAILS_VERSION']
         | 
| @@ -12,6 +12,7 @@ gem 'activemodel', ENV['RAILS_VERSION'] if ENV['RAILS_VERSION'] | |
| 12 12 | 
             
            group :test do
         | 
| 13 13 | 
             
              gem 'simplecov', require: false
         | 
| 14 14 | 
             
              gem 'coveralls', require: false
         | 
| 15 | 
            +
              gem 'rspec_junit_formatter'
         | 
| 15 16 | 
             
            end
         | 
| 16 17 |  | 
| 17 18 | 
             
            gem 'jruby-openssl', platform: :jruby
         | 
    
        data/active-fedora.gemspec
    CHANGED
    
    | @@ -25,7 +25,7 @@ Gem::Specification.new do |s| | |
| 25 25 | 
             
              s.add_dependency 'faraday', '~> 0.12.1'
         | 
| 26 26 | 
             
              s.add_dependency 'faraday-encoding', '0.0.4'
         | 
| 27 27 |  | 
| 28 | 
            -
              s.add_development_dependency "rails"
         | 
| 28 | 
            +
              s.add_development_dependency "rails", ">= 4.2", "< 5.2"
         | 
| 29 29 | 
             
              s.add_development_dependency "rdoc"
         | 
| 30 30 | 
             
              s.add_development_dependency "yard"
         | 
| 31 31 | 
             
              s.add_development_dependency "rake"
         | 
    
        data/lib/active_fedora/file.rb
    CHANGED
    
    | @@ -196,9 +196,7 @@ module ActiveFedora | |
| 196 196 | 
             
                  end
         | 
| 197 197 |  | 
| 198 198 | 
             
                  def local_or_remote_content(ensure_fetch = true)
         | 
| 199 | 
            -
                     | 
| 200 | 
            -
             | 
| 201 | 
            -
                    @content ||= ensure_fetch ? remote_content : @ds_content
         | 
| 199 | 
            +
                    @content ||= ensure_fetch ? remote_content : @ds_content unless new_record?
         | 
| 202 200 | 
             
                    @content.rewind if behaves_like_io?(@content)
         | 
| 203 201 | 
             
                    @content
         | 
| 204 202 | 
             
                  end
         | 
    
        data/spec/spec_helper.rb
    CHANGED
    
    | @@ -13,7 +13,7 @@ require 'rspec' | |
| 13 13 | 
             
            require 'rspec/its'
         | 
| 14 14 | 
             
            require 'equivalent-xml/rspec_matchers'
         | 
| 15 15 | 
             
            require 'logger'
         | 
| 16 | 
            -
            require 'pry' unless ENV[' | 
| 16 | 
            +
            require 'pry' unless ENV['CI']
         | 
| 17 17 |  | 
| 18 18 | 
             
            ActiveFedora::Base.logger = Logger.new(STDERR)
         | 
| 19 19 | 
             
            ActiveFedora::Base.logger.level = Logger::WARN
         | 
    
        data/spec/unit/file_spec.rb
    CHANGED
    
    | @@ -192,6 +192,23 @@ describe ActiveFedora::File do | |
| 192 192 | 
             
                end
         | 
| 193 193 | 
             
              end
         | 
| 194 194 |  | 
| 195 | 
            +
              context 'when file is new and content behaves like io' do
         | 
| 196 | 
            +
                let(:file_content) { "hello world" }
         | 
| 197 | 
            +
             | 
| 198 | 
            +
                before do
         | 
| 199 | 
            +
                  af_file.uri = "http://localhost:8983/fedora/rest/test/1234/abcd"
         | 
| 200 | 
            +
                  af_file.content = StringIO.new(file_content)
         | 
| 201 | 
            +
                  allow(af_file).to receive(:new_record?).and_return(true)
         | 
| 202 | 
            +
                end
         | 
| 203 | 
            +
             | 
| 204 | 
            +
                describe "#content" do
         | 
| 205 | 
            +
                  it 'can be re-read' do
         | 
| 206 | 
            +
                    expect(af_file.content.read).to eq file_content
         | 
| 207 | 
            +
                    expect(af_file.content.read).to eq file_content
         | 
| 208 | 
            +
                  end
         | 
| 209 | 
            +
                end
         | 
| 210 | 
            +
              end
         | 
| 211 | 
            +
             | 
| 195 212 | 
             
              describe "#mime_type" do
         | 
| 196 213 | 
             
                let(:parent) { ActiveFedora::Base.create }
         | 
| 197 214 | 
             
                before 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: 12.0. | 
| 4 | 
            +
              version: 12.0.3
         | 
| 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:  | 
| 13 | 
            +
            date: 2020-01-24 00:00:00.000000000 Z
         | 
| 14 14 | 
             
            dependencies:
         | 
| 15 15 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 16 16 | 
             
              name: rsolr
         | 
| @@ -188,14 +188,20 @@ dependencies: | |
| 188 188 | 
             
                requirements:
         | 
| 189 189 | 
             
                - - ">="
         | 
| 190 190 | 
             
                  - !ruby/object:Gem::Version
         | 
| 191 | 
            -
                    version: ' | 
| 191 | 
            +
                    version: '4.2'
         | 
| 192 | 
            +
                - - "<"
         | 
| 193 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 194 | 
            +
                    version: '5.2'
         | 
| 192 195 | 
             
              type: :development
         | 
| 193 196 | 
             
              prerelease: false
         | 
| 194 197 | 
             
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 195 198 | 
             
                requirements:
         | 
| 196 199 | 
             
                - - ">="
         | 
| 197 200 | 
             
                  - !ruby/object:Gem::Version
         | 
| 198 | 
            -
                    version: ' | 
| 201 | 
            +
                    version: '4.2'
         | 
| 202 | 
            +
                - - "<"
         | 
| 203 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 204 | 
            +
                    version: '5.2'
         | 
| 199 205 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 200 206 | 
             
              name: rdoc
         | 
| 201 207 | 
             
              requirement: !ruby/object:Gem::Requirement
         | 
| @@ -360,6 +366,7 @@ extra_rdoc_files: | |
| 360 366 | 
             
            - LICENSE
         | 
| 361 367 | 
             
            - README.md
         | 
| 362 368 | 
             
            files:
         | 
| 369 | 
            +
            - ".circleci/config.yml"
         | 
| 363 370 | 
             
            - ".gitignore"
         | 
| 364 371 | 
             
            - ".gitmodules"
         | 
| 365 372 | 
             
            - ".mailmap"
         | 
| @@ -367,7 +374,6 @@ files: | |
| 367 374 | 
             
            - ".rubocop.yml"
         | 
| 368 375 | 
             
            - ".rubocop_todo.yml"
         | 
| 369 376 | 
             
            - ".solr_wrapper"
         | 
| 370 | 
            -
            - ".travis.yml"
         | 
| 371 377 | 
             
            - CONTRIBUTING.md
         | 
| 372 378 | 
             
            - CONTRIBUTORS.md
         | 
| 373 379 | 
             
            - Gemfile
         | 
| @@ -743,8 +749,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement | |
| 743 749 | 
             
                - !ruby/object:Gem::Version
         | 
| 744 750 | 
             
                  version: '0'
         | 
| 745 751 | 
             
            requirements: []
         | 
| 746 | 
            -
             | 
| 747 | 
            -
            rubygems_version: 2.6.13
         | 
| 752 | 
            +
            rubygems_version: 3.0.3
         | 
| 748 753 | 
             
            signing_key: 
         | 
| 749 754 | 
             
            specification_version: 4
         | 
| 750 755 | 
             
            summary: A convenience libary for manipulating documents in the Fedora Repository.
         | 
    
        data/.travis.yml
    DELETED
    
    | @@ -1,15 +0,0 @@ | |
| 1 | 
            -
            language: ruby
         | 
| 2 | 
            -
            cache: bundler
         | 
| 3 | 
            -
            sudo: false
         | 
| 4 | 
            -
            rvm: 2.4.1
         | 
| 5 | 
            -
            matrix:
         | 
| 6 | 
            -
              include:
         | 
| 7 | 
            -
                - rvm: 2.3.4
         | 
| 8 | 
            -
                  env: "RAILS_VERSION=4.2.8"
         | 
| 9 | 
            -
                - env: "RAILS_VERSION=5.1.1"
         | 
| 10 | 
            -
            global_env:
         | 
| 11 | 
            -
              - NOKOGIRI_USE_SYSTEM_LIBRARIES=true
         | 
| 12 | 
            -
            before_install:
         | 
| 13 | 
            -
              - gem update --system
         | 
| 14 | 
            -
            before_script:
         | 
| 15 | 
            -
              - jdk_switcher use oraclejdk8
         |