active-fedora 11.5.4 → 11.5.5

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
- SHA1:
3
- metadata.gz: da56e0bb225d2627a3fc10d6bd39b9726f236fa8
4
- data.tar.gz: 95fc0a31a9a709115910d063022d2994b97a8e5e
2
+ SHA256:
3
+ metadata.gz: 1e1870c922ae63f56f7db2bc73f057b0deb685f0d1169dd8afc6c15547170ad9
4
+ data.tar.gz: b590f54317796f6af61fba9bac5deaf3d19bfe71b4f573bf0effd2017153f8f6
5
5
  SHA512:
6
- metadata.gz: 14d3fa8577f3f192887a0ba9260cec44b81cc011513b7efdb76b8834d8f1c5020cd2f58acf5b6d35b4bfc7fcc77893c5323005ad4c97d68bfb663f0625877905
7
- data.tar.gz: 675a3119b7daac3dab00d11a8f9cc664ddbd2cb8298ea2be904e573148132fe2b9d4a725e1106693757290f6648790c82bce31f031390a33a111d0e307473b3d
6
+ metadata.gz: b59b72704f4b2cda5a01ecf82c4fd00238c2806003f870349b5fda8f6d124c330619a4ed141cb27352316e97db160cdd2c9d557920c0b574563ea36ec6575573
7
+ data.tar.gz: efbf84573a59808a140e603477a5b732e9125d761286847bb377eb2fef25cb2c773cc665044287e7e1195d20fa72f73e6f067b914336bee6786a5cedd5ddbb33
@@ -0,0 +1,43 @@
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-3_rails4-2
42
+ ruby_version: 2.4.9
43
+ 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['TRAVIS']
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']
@@ -13,6 +13,7 @@ gem 'rsolr', ENV['RSOLR_VERSION'] if ENV['RSOLR_VERSION']
13
13
  group :test do
14
14
  gem 'simplecov', require: false
15
15
  gem 'coveralls', require: false
16
+ gem 'rspec_junit_formatter'
16
17
  end
17
18
 
18
19
  gem 'jruby-openssl', platform: :jruby
@@ -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"
29
29
  s.add_development_dependency "rdoc"
30
30
  s.add_development_dependency "yard"
31
31
  s.add_development_dependency "rake"
@@ -196,9 +196,7 @@ module ActiveFedora
196
196
  end
197
197
 
198
198
  def local_or_remote_content(ensure_fetch = true)
199
- return @content if new_record?
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
@@ -1,3 +1,3 @@
1
1
  module ActiveFedora
2
- VERSION = "11.5.4".freeze
2
+ VERSION = "11.5.5".freeze
3
3
  end
@@ -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['TRAVIS']
16
+ require 'pry' unless ENV['CI']
17
17
 
18
18
  ActiveFedora::Base.logger = Logger.new(STDERR)
19
19
  ActiveFedora::Base.logger.level = Logger::WARN
@@ -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: 11.5.4
4
+ version: 11.5.5
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: 2018-09-24 00:00:00.000000000 Z
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,14 @@ dependencies:
188
188
  requirements:
189
189
  - - ">="
190
190
  - !ruby/object:Gem::Version
191
- version: '0'
191
+ version: '4.2'
192
192
  type: :development
193
193
  prerelease: false
194
194
  version_requirements: !ruby/object:Gem::Requirement
195
195
  requirements:
196
196
  - - ">="
197
197
  - !ruby/object:Gem::Version
198
- version: '0'
198
+ version: '4.2'
199
199
  - !ruby/object:Gem::Dependency
200
200
  name: rdoc
201
201
  requirement: !ruby/object:Gem::Requirement
@@ -360,6 +360,7 @@ extra_rdoc_files:
360
360
  - LICENSE
361
361
  - README.md
362
362
  files:
363
+ - ".circleci/config.yml"
363
364
  - ".gitignore"
364
365
  - ".gitmodules"
365
366
  - ".mailmap"
@@ -367,7 +368,6 @@ files:
367
368
  - ".rubocop.yml"
368
369
  - ".rubocop_todo.yml"
369
370
  - ".solr_wrapper"
370
- - ".travis.yml"
371
371
  - CONTRIBUTING.md
372
372
  - CONTRIBUTORS.md
373
373
  - Gemfile
@@ -734,8 +734,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
734
734
  - !ruby/object:Gem::Version
735
735
  version: '0'
736
736
  requirements: []
737
- rubyforge_project:
738
- rubygems_version: 2.6.13
737
+ rubygems_version: 3.0.3
739
738
  signing_key:
740
739
  specification_version: 4
741
740
  summary: A convenience libary for manipulating documents in the Fedora Repository.
@@ -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: "RSOLR_VERSION=2.0.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