assembly-objectfile 1.8.2 → 1.8.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 +4 -4
- data/.travis.yml +1 -0
- data/README.md +1 -0
- data/Rakefile +0 -3
- data/lib/assembly-objectfile.rb +1 -1
- data/lib/assembly-objectfile/version.rb +1 -1
- data/spec/content_metadata_spec.rb +5 -5
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9fe45aaa147dfaac9e82820d38af8de6247116031979ff68f711954af0ff9bc8
|
4
|
+
data.tar.gz: 4dca70b7bf315d8520b523cfd516d78211201c5092dd36b44d8cf855ccf6247f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4573713a41500722359af8a99e4972fcd6e7e566a864ddbc277bfecf6228bae9b2ea7194550ce43278189b13480e0e380ee72c1d7690305367f497442c87bf02
|
7
|
+
data.tar.gz: 5c09f8e544d3479c87caf0793bb632389bcb01a8b7c22ce369344ad99f43bd0f1f78f0b055dfe121a1f63c430c3ba8b82f1793c006e8a7d8306bb89306add142
|
data/.travis.yml
CHANGED
data/README.md
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
[](https://travis-ci.org/sul-dlss/assembly-objectfile)
|
2
2
|
[](https://codeclimate.com/github/sul-dlss/assembly-objectfile/test_coverage)
|
3
3
|
[](https://codeclimate.com/github/sul-dlss/assembly-objectfile/maintainability)
|
4
|
+
[](https://badge.fury.io/rb/assembly-objectfile)
|
4
5
|
|
5
6
|
# Assembly-ObjectFile Gem
|
6
7
|
|
data/Rakefile
CHANGED
data/lib/assembly-objectfile.rb
CHANGED
@@ -6,7 +6,7 @@ module Assembly
|
|
6
6
|
VALID_IMAGE_MIMETYPES = ['image/jpeg', 'image/tiff', 'image/tif', 'image/png'].freeze
|
7
7
|
|
8
8
|
# if input file has one of these extensions in a 3D object, it will get the 3d resource type
|
9
|
-
VALID_THREE_DIMENSION_EXTENTIONS = ['.obj'
|
9
|
+
VALID_THREE_DIMENSION_EXTENTIONS = ['.obj'].freeze
|
10
10
|
|
11
11
|
# the list of mimetypes that will be "trusted" by the unix file command; if a mimetype other than one of these is returned
|
12
12
|
# by the file command, then a check will be made to see if exif data exists...if so, the mimetype returned by the exif data will be used
|
@@ -511,7 +511,7 @@ describe Assembly::ContentMetadata do
|
|
511
511
|
expect { described_class.create_content_metadata(druid: TEST_DRUID, objects: objects) }.to raise_error(RuntimeError, "File '#{junk_file}' not found")
|
512
512
|
end
|
513
513
|
|
514
|
-
it 'generates valid content metadata for a 3d object with
|
514
|
+
it 'generates valid content metadata for a 3d object with one 3d type files and three other supporting files (where one supporting file is a non-viewable but downloadable 3d file)' do
|
515
515
|
objects=[Assembly::ObjectFile.new(TEST_OBJ_FILE),Assembly::ObjectFile.new(TEST_PLY_FILE),Assembly::ObjectFile.new(TEST_TIF_INPUT_FILE),Assembly::ObjectFile.new(TEST_PDF_FILE)]
|
516
516
|
result = Assembly::ContentMetadata.create_content_metadata(:druid=>TEST_DRUID,:style=>:'3d',:objects=>objects)
|
517
517
|
expect(result.class).to be String
|
@@ -522,12 +522,12 @@ describe Assembly::ContentMetadata do
|
|
522
522
|
expect(xml.xpath('//resource/file').length).to be 4
|
523
523
|
expect(xml.xpath('//label').length).to be 4
|
524
524
|
expect(xml.xpath('//label')[0].text).to match(/3d 1/)
|
525
|
-
expect(xml.xpath('//label')[1].text).to match(/
|
526
|
-
expect(xml.xpath('//label')[2].text).to match(/File
|
527
|
-
expect(xml.xpath('//label')[3].text).to match(/File
|
525
|
+
expect(xml.xpath('//label')[1].text).to match(/File 1/)
|
526
|
+
expect(xml.xpath('//label')[2].text).to match(/File 2/)
|
527
|
+
expect(xml.xpath('//label')[3].text).to match(/File 3/)
|
528
528
|
expect(xml.xpath('//resource/file/imageData').length).to be 0
|
529
529
|
expect(xml.xpath('//resource')[0].attributes['type'].value).to eq('3d')
|
530
|
-
expect(xml.xpath('//resource')[1].attributes['type'].value).to eq('
|
530
|
+
expect(xml.xpath('//resource')[1].attributes['type'].value).to eq('file')
|
531
531
|
expect(xml.xpath('//resource')[2].attributes['type'].value).to eq('file')
|
532
532
|
expect(xml.xpath('//resource')[3].attributes['type'].value).to eq('file')
|
533
533
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: assembly-objectfile
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.8.
|
4
|
+
version: 1.8.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Peter Mangiafico
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: exe
|
13
13
|
cert_chain: []
|
14
|
-
date: 2019-08-
|
14
|
+
date: 2019-08-29 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: mime-types
|
@@ -224,8 +224,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
224
224
|
- !ruby/object:Gem::Version
|
225
225
|
version: '0'
|
226
226
|
requirements: []
|
227
|
-
|
228
|
-
rubygems_version: 2.7.6
|
227
|
+
rubygems_version: 3.0.4
|
229
228
|
signing_key:
|
230
229
|
specification_version: 4
|
231
230
|
summary: Ruby immplementation of file services needed to prepare objects to be accessioned
|