active-fedora 13.1.1 → 13.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.circleci/config.yml +20 -12
- data/lib/active_fedora/file.rb +1 -3
- data/lib/active_fedora/version.rb +1 -1
- data/spec/unit/file_spec.rb +17 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3cb51a0d5cd5f6130a860c5543ee8d498b12ccce64c3a751d4deb02d358fc0e5
|
4
|
+
data.tar.gz: '059d288a06782aef0965d708028fe43e54eb249fcbabd92cdcf872d02e6cca0a'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 280abaeac2f9d7171388ed21d186d118171773fa1027adc27d69eea60fc25334c41ec43e7b1dd3289b9dad0bdb3e02f6f7eea7557292b14fdf8c32cd5162e9e7
|
7
|
+
data.tar.gz: 728485c15d8264b51a273da6814a5c877d9a0162479b1a26bbcc0ee4dac4cd4fed32828dcc202a623057088b355081d3cecc916d78eafef0c6b37bf80190e080
|
data/.circleci/config.yml
CHANGED
@@ -37,23 +37,31 @@ jobs:
|
|
37
37
|
workflows:
|
38
38
|
ci:
|
39
39
|
jobs:
|
40
|
+
- bundle_lint_test:
|
41
|
+
name: ruby2-7_rails5-2
|
42
|
+
ruby_version: 2.7.0
|
43
|
+
rails_version: 5.2.4
|
40
44
|
- bundle_lint_test:
|
41
45
|
name: ruby2-6_rails5-2
|
42
|
-
ruby_version: 2.6.
|
43
|
-
rails_version: 5.2.
|
46
|
+
ruby_version: 2.6.5
|
47
|
+
rails_version: 5.2.4
|
44
48
|
- bundle_lint_test:
|
45
49
|
name: ruby2-5_rails5-2
|
46
|
-
ruby_version: 2.5.
|
47
|
-
rails_version: 5.2.
|
50
|
+
ruby_version: 2.5.7
|
51
|
+
rails_version: 5.2.4
|
52
|
+
- bundle_lint_test:
|
53
|
+
name: ruby2-4_rails5-2
|
54
|
+
ruby_version: 2.4.9
|
55
|
+
rails_version: 5.2.4
|
56
|
+
- bundle_lint_test:
|
57
|
+
name: ruby2-7_rails6-0
|
58
|
+
ruby_version: 2.7.0
|
59
|
+
rails_version: 6.0.2
|
48
60
|
- bundle_lint_test:
|
49
61
|
name: ruby2-6_rails6-0
|
50
|
-
ruby_version: 2.6.
|
51
|
-
rails_version: 6.0.
|
62
|
+
ruby_version: 2.6.5
|
63
|
+
rails_version: 6.0.2
|
52
64
|
- bundle_lint_test:
|
53
65
|
name: ruby2-5_rails6.0
|
54
|
-
ruby_version: 2.5.
|
55
|
-
rails_version: 6.0.
|
56
|
-
- bundle_lint_test:
|
57
|
-
name: ruby2-4_rails5-2
|
58
|
-
ruby_version: 2.4.7
|
59
|
-
rails_version: 5.2.3
|
66
|
+
ruby_version: 2.5.7
|
67
|
+
rails_version: 6.0.2
|
data/lib/active_fedora/file.rb
CHANGED
@@ -191,9 +191,7 @@ module ActiveFedora
|
|
191
191
|
end
|
192
192
|
|
193
193
|
def local_or_remote_content(ensure_fetch = true)
|
194
|
-
|
195
|
-
|
196
|
-
@content ||= ensure_fetch ? remote_content : @ds_content
|
194
|
+
@content ||= ensure_fetch ? remote_content : @ds_content unless new_record?
|
197
195
|
@content.rewind if behaves_like_io?(@content)
|
198
196
|
@content
|
199
197
|
end
|
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: 13.1.
|
4
|
+
version: 13.1.2
|
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-23 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rsolr
|
@@ -720,7 +720,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
720
720
|
- !ruby/object:Gem::Version
|
721
721
|
version: '0'
|
722
722
|
requirements: []
|
723
|
-
rubygems_version: 3.0.
|
723
|
+
rubygems_version: 3.0.6
|
724
724
|
signing_key:
|
725
725
|
specification_version: 4
|
726
726
|
summary: A convenience libary for manipulating documents in the Fedora Repository.
|