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 +5 -5
- data/.circleci/config.yml +43 -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 +6 -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: 1e1870c922ae63f56f7db2bc73f057b0deb685f0d1169dd8afc6c15547170ad9
|
4
|
+
data.tar.gz: b590f54317796f6af61fba9bac5deaf3d19bfe71b4f573bf0effd2017153f8f6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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['
|
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
|
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"
|
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: 11.5.
|
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:
|
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: '
|
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: '
|
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
|
-
|
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.
|
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: "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
|