active-fedora 12.2.3 → 12.2.4
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
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d1a57319331ca1e0be39acbb5b59e6e2c5e9c3ccbd55dad26455cd6e0bb63b54
|
4
|
+
data.tar.gz: 7e77d61dfb2cea447e9f60ecf5c9a61d0c7b4011a1b46139e0a71914cda5edd9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 92b28ccf174ca95f2d8cdf0b6d17c594f3e9717cba879babcf53fae1b9871d7bded7f40c15dbd69267480c9e15a85bb3a77d919aa9e48bbf556b9584861aefa1
|
7
|
+
data.tar.gz: 431456f315b9602012acc2fae788aa4c2b15f1f7e1e6ff8cc2b35609fdaeeb947eaef3b4a06a2d0930539225e831c6f437958c88bc132e4b5021c8c2ac985c9f
|
data/active-fedora.gemspec
CHANGED
@@ -25,18 +25,20 @@ Gem::Specification.new do |s|
|
|
25
25
|
s.add_dependency 'faraday', '~> 0.12'
|
26
26
|
s.add_dependency 'faraday-encoding', '0.0.4'
|
27
27
|
|
28
|
-
s.add_development_dependency "
|
28
|
+
s.add_development_dependency "equivalent-xml"
|
29
|
+
s.add_development_dependency 'fcrepo_wrapper', '~> 0.2'
|
30
|
+
s.add_development_dependency "github_changelog_generator"
|
29
31
|
s.add_development_dependency "rdoc"
|
30
|
-
s.add_development_dependency "
|
32
|
+
s.add_development_dependency "psych", "< 4" # Restricted because 4.0+ do not work with rubocop 0.56.x
|
33
|
+
s.add_development_dependency "rails"
|
31
34
|
s.add_development_dependency "rake"
|
32
|
-
s.add_development_dependency "solr_wrapper", "~> 2.0"
|
33
|
-
s.add_development_dependency 'fcrepo_wrapper', '~> 0.2'
|
34
35
|
s.add_development_dependency "rspec", "~> 3.5"
|
35
36
|
s.add_development_dependency "rspec-its"
|
36
|
-
s.add_development_dependency "equivalent-xml"
|
37
|
-
s.add_development_dependency "simplecov", '~> 0.8'
|
38
37
|
s.add_development_dependency "rubocop", '~> 0.56.0'
|
39
38
|
s.add_development_dependency "rubocop-rspec", '~> 1.12.0'
|
39
|
+
s.add_development_dependency "simplecov", '~> 0.8'
|
40
|
+
s.add_development_dependency "solr_wrapper", "~> 2.0"
|
41
|
+
s.add_development_dependency "yard"
|
40
42
|
|
41
43
|
s.files = `git ls-files`.split("\n")
|
42
44
|
s.test_files = `git ls-files -- {spec}/*`.split("\n")
|
@@ -2,7 +2,7 @@ module ActiveFedora::Core
|
|
2
2
|
class FedoraIdTranslator
|
3
3
|
SLASH = '/'.freeze
|
4
4
|
def self.call(id)
|
5
|
-
id = URI.escape(id, '[]'.freeze)
|
5
|
+
id = URI::DEFAULT_PARSER.escape(id, '[]'.freeze)
|
6
6
|
id = "/#{id}" unless id.start_with? SLASH
|
7
7
|
unless ActiveFedora.fedora.base_path == SLASH || id.start_with?("#{ActiveFedora.fedora.base_path}/")
|
8
8
|
id = ActiveFedora.fedora.base_path + id
|
data/lib/active_fedora/file.rb
CHANGED
@@ -179,7 +179,7 @@ module ActiveFedora
|
|
179
179
|
|
180
180
|
def ldp_headers
|
181
181
|
headers = { 'Content-Type'.freeze => mime_type, 'Content-Length'.freeze => content.size.to_s }
|
182
|
-
headers['Content-Disposition'.freeze] = "attachment; filename=\"#{URI.
|
182
|
+
headers['Content-Disposition'.freeze] = "attachment; filename=\"#{URI::DEFAULT_PARSER.escape(@original_name)}\"" if @original_name
|
183
183
|
headers
|
184
184
|
end
|
185
185
|
|
data/lib/active_fedora.rb
CHANGED
@@ -11,9 +11,11 @@ require 'active_triples'
|
|
11
11
|
# Monkey patching RDF::Literal::DateTime to support fractional seconds.
|
12
12
|
# See https://github.com/samvera/active_fedora/issues/497
|
13
13
|
# Also monkey patches in a fix for timezones to be stored properly.
|
14
|
+
# This is needed in both RDF <= 3.2.4 and RDF >= 3.2.5
|
15
|
+
# TODO: Figure out how to contribute something upstream to avoid monkey-patching
|
14
16
|
module RDF
|
15
17
|
class Literal
|
16
|
-
class DateTime
|
18
|
+
class DateTime
|
17
19
|
ALTERNATIVE_FORMAT = '%Y-%m-%dT%H:%M:%S'.freeze
|
18
20
|
DOT = '.'.freeze
|
19
21
|
EMPTY = ''.freeze
|
@@ -33,9 +33,33 @@ describe ActiveFedora::Base do
|
|
33
33
|
|
34
34
|
describe 'serializing' do
|
35
35
|
let(:object) { Foo.new(date: [date]) }
|
36
|
-
let(:triple) { object.resource.query(predicate: ::RDF::Vocab::DC.date).to_a.first }
|
36
|
+
let(:triple) { object.resource.query(predicate: ::RDF::Vocab::DC.date).to_a.first.object }
|
37
37
|
it 'time zone must have semicolin to be a cannonical XMLSchema#dateTime' do
|
38
38
|
expect(triple.to_s).to match(/\+01:00/)
|
39
39
|
end
|
40
|
+
|
41
|
+
context 'nanoseconds' do
|
42
|
+
let(:date) { DateTime.parse("2015-10-22T10:20:03.653991025+01:00") }
|
43
|
+
|
44
|
+
it 'includes nanosecond precision' do
|
45
|
+
expect(triple.to_s).to eq "2015-10-22T10:20:03.653991025+01:00"
|
46
|
+
end
|
47
|
+
|
48
|
+
context 'with trailing zeros' do
|
49
|
+
let(:date) { DateTime.parse("2015-10-22T15:34:20.97800000-11:00") }
|
50
|
+
|
51
|
+
it 'trims trailing zeros' do
|
52
|
+
expect(triple.to_s).to eq "2015-10-22T15:34:20.978-11:00"
|
53
|
+
end
|
54
|
+
|
55
|
+
context 'and only zero nanoseconds' do
|
56
|
+
let(:date) { DateTime.parse("2015-10-22T15:34:20.000000000-11:00") }
|
57
|
+
|
58
|
+
it 'trims trailing zeros and dot if nanoseconds are all 0' do
|
59
|
+
expect(triple.to_s).to eq "2015-10-22T15:34:20-11:00"
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
40
64
|
end
|
41
65
|
end
|
metadata
CHANGED
@@ -1,16 +1,16 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active-fedora
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 12.2.
|
4
|
+
version: 12.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matt Zumwalt
|
8
8
|
- McClain Looney
|
9
9
|
- Justin Coyne
|
10
|
-
autorequire:
|
10
|
+
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date:
|
13
|
+
date: 2022-03-07 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rsolr
|
@@ -183,7 +183,7 @@ dependencies:
|
|
183
183
|
- !ruby/object:Gem::Version
|
184
184
|
version: 0.0.4
|
185
185
|
- !ruby/object:Gem::Dependency
|
186
|
-
name:
|
186
|
+
name: equivalent-xml
|
187
187
|
requirement: !ruby/object:Gem::Requirement
|
188
188
|
requirements:
|
189
189
|
- - ">="
|
@@ -197,21 +197,21 @@ dependencies:
|
|
197
197
|
- !ruby/object:Gem::Version
|
198
198
|
version: '0'
|
199
199
|
- !ruby/object:Gem::Dependency
|
200
|
-
name:
|
200
|
+
name: fcrepo_wrapper
|
201
201
|
requirement: !ruby/object:Gem::Requirement
|
202
202
|
requirements:
|
203
|
-
- - "
|
203
|
+
- - "~>"
|
204
204
|
- !ruby/object:Gem::Version
|
205
|
-
version: '0'
|
205
|
+
version: '0.2'
|
206
206
|
type: :development
|
207
207
|
prerelease: false
|
208
208
|
version_requirements: !ruby/object:Gem::Requirement
|
209
209
|
requirements:
|
210
|
-
- - "
|
210
|
+
- - "~>"
|
211
211
|
- !ruby/object:Gem::Version
|
212
|
-
version: '0'
|
212
|
+
version: '0.2'
|
213
213
|
- !ruby/object:Gem::Dependency
|
214
|
-
name:
|
214
|
+
name: github_changelog_generator
|
215
215
|
requirement: !ruby/object:Gem::Requirement
|
216
216
|
requirements:
|
217
217
|
- - ">="
|
@@ -225,7 +225,7 @@ dependencies:
|
|
225
225
|
- !ruby/object:Gem::Version
|
226
226
|
version: '0'
|
227
227
|
- !ruby/object:Gem::Dependency
|
228
|
-
name:
|
228
|
+
name: rdoc
|
229
229
|
requirement: !ruby/object:Gem::Requirement
|
230
230
|
requirements:
|
231
231
|
- - ">="
|
@@ -239,33 +239,47 @@ dependencies:
|
|
239
239
|
- !ruby/object:Gem::Version
|
240
240
|
version: '0'
|
241
241
|
- !ruby/object:Gem::Dependency
|
242
|
-
name:
|
242
|
+
name: psych
|
243
243
|
requirement: !ruby/object:Gem::Requirement
|
244
244
|
requirements:
|
245
|
-
- - "
|
245
|
+
- - "<"
|
246
246
|
- !ruby/object:Gem::Version
|
247
|
-
version: '
|
247
|
+
version: '4'
|
248
248
|
type: :development
|
249
249
|
prerelease: false
|
250
250
|
version_requirements: !ruby/object:Gem::Requirement
|
251
251
|
requirements:
|
252
|
-
- - "
|
252
|
+
- - "<"
|
253
253
|
- !ruby/object:Gem::Version
|
254
|
-
version: '
|
254
|
+
version: '4'
|
255
255
|
- !ruby/object:Gem::Dependency
|
256
|
-
name:
|
256
|
+
name: rails
|
257
257
|
requirement: !ruby/object:Gem::Requirement
|
258
258
|
requirements:
|
259
|
-
- - "
|
259
|
+
- - ">="
|
260
260
|
- !ruby/object:Gem::Version
|
261
|
-
version: '0
|
261
|
+
version: '0'
|
262
262
|
type: :development
|
263
263
|
prerelease: false
|
264
264
|
version_requirements: !ruby/object:Gem::Requirement
|
265
265
|
requirements:
|
266
|
-
- - "
|
266
|
+
- - ">="
|
267
267
|
- !ruby/object:Gem::Version
|
268
|
-
version: '0
|
268
|
+
version: '0'
|
269
|
+
- !ruby/object:Gem::Dependency
|
270
|
+
name: rake
|
271
|
+
requirement: !ruby/object:Gem::Requirement
|
272
|
+
requirements:
|
273
|
+
- - ">="
|
274
|
+
- !ruby/object:Gem::Version
|
275
|
+
version: '0'
|
276
|
+
type: :development
|
277
|
+
prerelease: false
|
278
|
+
version_requirements: !ruby/object:Gem::Requirement
|
279
|
+
requirements:
|
280
|
+
- - ">="
|
281
|
+
- !ruby/object:Gem::Version
|
282
|
+
version: '0'
|
269
283
|
- !ruby/object:Gem::Dependency
|
270
284
|
name: rspec
|
271
285
|
requirement: !ruby/object:Gem::Requirement
|
@@ -295,19 +309,33 @@ dependencies:
|
|
295
309
|
- !ruby/object:Gem::Version
|
296
310
|
version: '0'
|
297
311
|
- !ruby/object:Gem::Dependency
|
298
|
-
name:
|
312
|
+
name: rubocop
|
299
313
|
requirement: !ruby/object:Gem::Requirement
|
300
314
|
requirements:
|
301
|
-
- - "
|
315
|
+
- - "~>"
|
302
316
|
- !ruby/object:Gem::Version
|
303
|
-
version:
|
317
|
+
version: 0.56.0
|
304
318
|
type: :development
|
305
319
|
prerelease: false
|
306
320
|
version_requirements: !ruby/object:Gem::Requirement
|
307
321
|
requirements:
|
308
|
-
- - "
|
322
|
+
- - "~>"
|
309
323
|
- !ruby/object:Gem::Version
|
310
|
-
version:
|
324
|
+
version: 0.56.0
|
325
|
+
- !ruby/object:Gem::Dependency
|
326
|
+
name: rubocop-rspec
|
327
|
+
requirement: !ruby/object:Gem::Requirement
|
328
|
+
requirements:
|
329
|
+
- - "~>"
|
330
|
+
- !ruby/object:Gem::Version
|
331
|
+
version: 1.12.0
|
332
|
+
type: :development
|
333
|
+
prerelease: false
|
334
|
+
version_requirements: !ruby/object:Gem::Requirement
|
335
|
+
requirements:
|
336
|
+
- - "~>"
|
337
|
+
- !ruby/object:Gem::Version
|
338
|
+
version: 1.12.0
|
311
339
|
- !ruby/object:Gem::Dependency
|
312
340
|
name: simplecov
|
313
341
|
requirement: !ruby/object:Gem::Requirement
|
@@ -323,33 +351,33 @@ dependencies:
|
|
323
351
|
- !ruby/object:Gem::Version
|
324
352
|
version: '0.8'
|
325
353
|
- !ruby/object:Gem::Dependency
|
326
|
-
name:
|
354
|
+
name: solr_wrapper
|
327
355
|
requirement: !ruby/object:Gem::Requirement
|
328
356
|
requirements:
|
329
357
|
- - "~>"
|
330
358
|
- !ruby/object:Gem::Version
|
331
|
-
version:
|
359
|
+
version: '2.0'
|
332
360
|
type: :development
|
333
361
|
prerelease: false
|
334
362
|
version_requirements: !ruby/object:Gem::Requirement
|
335
363
|
requirements:
|
336
364
|
- - "~>"
|
337
365
|
- !ruby/object:Gem::Version
|
338
|
-
version:
|
366
|
+
version: '2.0'
|
339
367
|
- !ruby/object:Gem::Dependency
|
340
|
-
name:
|
368
|
+
name: yard
|
341
369
|
requirement: !ruby/object:Gem::Requirement
|
342
370
|
requirements:
|
343
|
-
- - "
|
371
|
+
- - ">="
|
344
372
|
- !ruby/object:Gem::Version
|
345
|
-
version:
|
373
|
+
version: '0'
|
346
374
|
type: :development
|
347
375
|
prerelease: false
|
348
376
|
version_requirements: !ruby/object:Gem::Requirement
|
349
377
|
requirements:
|
350
|
-
- - "
|
378
|
+
- - ">="
|
351
379
|
- !ruby/object:Gem::Version
|
352
|
-
version:
|
380
|
+
version: '0'
|
353
381
|
description: ActiveFedora provides for creating and managing objects in the Fedora
|
354
382
|
Repository Architecture.
|
355
383
|
email:
|
@@ -731,7 +759,7 @@ homepage: https://github.com/samvera/active_fedora
|
|
731
759
|
licenses:
|
732
760
|
- Apache-2.0
|
733
761
|
metadata: {}
|
734
|
-
post_install_message:
|
762
|
+
post_install_message:
|
735
763
|
rdoc_options: []
|
736
764
|
require_paths:
|
737
765
|
- lib
|
@@ -746,8 +774,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
746
774
|
- !ruby/object:Gem::Version
|
747
775
|
version: '0'
|
748
776
|
requirements: []
|
749
|
-
rubygems_version: 3.1.
|
750
|
-
signing_key:
|
777
|
+
rubygems_version: 3.1.6
|
778
|
+
signing_key:
|
751
779
|
specification_version: 4
|
752
780
|
summary: A convenience libary for manipulating documents in the Fedora Repository.
|
753
781
|
test_files: []
|