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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4d550fdcd3d1b11ba39b106dd5077eb953c77244f05771e65163af4ca0cab776
4
- data.tar.gz: 8d0325c5c2df7c695bca6d34f4f12ffc2ef8792cd0d12ec9f26f2af51b001be5
3
+ metadata.gz: 9fe45aaa147dfaac9e82820d38af8de6247116031979ff68f711954af0ff9bc8
4
+ data.tar.gz: 4dca70b7bf315d8520b523cfd516d78211201c5092dd36b44d8cf855ccf6247f
5
5
  SHA512:
6
- metadata.gz: 00f9c88860bb1a3b584b4d63c9f7fec2376a0aa8ea631e574acd34da1d029fc9d5e8c84966616fc3fee7223bb2dd4ae599359c3cdfa4339d64aa32d54ef6db55
7
- data.tar.gz: 118869ec9a74f54e009849ef1035c130f02c5ce3402ca47aa30a454add2ad4fc7ce942b39e1058a27b736005efdeaf1da70993771d0bbe11819ed34c5db4a1b3
6
+ metadata.gz: 4573713a41500722359af8a99e4972fcd6e7e566a864ddbc277bfecf6228bae9b2ea7194550ce43278189b13480e0e380ee72c1d7690305367f497442c87bf02
7
+ data.tar.gz: 5c09f8e544d3479c87caf0793bb632389bcb01a8b7c22ce369344ad99f43bd0f1f78f0b055dfe121a1f63c430c3ba8b82f1793c006e8a7d8306bb89306add142
@@ -3,6 +3,7 @@ language: ruby
3
3
  rvm:
4
4
  - 2.2.5
5
5
  - 2.3.1
6
+ - 2.5.3
6
7
  addons:
7
8
  apt:
8
9
  packages:
data/README.md CHANGED
@@ -1,6 +1,7 @@
1
1
  [![Build Status](https://travis-ci.org/sul-dlss/assembly-objectfile.svg?branch=master)](https://travis-ci.org/sul-dlss/assembly-objectfile)
2
2
  [![Test Coverage](https://api.codeclimate.com/v1/badges/2310962acce78d78e76c/test_coverage)](https://codeclimate.com/github/sul-dlss/assembly-objectfile/test_coverage)
3
3
  [![Maintainability](https://api.codeclimate.com/v1/badges/2310962acce78d78e76c/maintainability)](https://codeclimate.com/github/sul-dlss/assembly-objectfile/maintainability)
4
+ [![Gem Version](https://badge.fury.io/rb/assembly-objectfile.svg)](https://badge.fury.io/rb/assembly-objectfile)
4
5
 
5
6
  # Assembly-ObjectFile Gem
6
7
 
data/Rakefile CHANGED
@@ -1,8 +1,5 @@
1
1
  require 'bundler/gem_tasks'
2
2
 
3
- # require 'dlss/rake/dlss_release'
4
- # Dlss::Release.new
5
-
6
3
  desc 'Run console with irb (default), pry, etc.'
7
4
  task :console, :irb do |_t, args|
8
5
  irb = args[:irb].nil? ? 'irb' : args[:irb]
@@ -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', '.ply', '.threejs', '.gltf'].freeze
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
@@ -2,6 +2,6 @@
2
2
  module Assembly
3
3
  class ObjectFile
4
4
  # Project version number
5
- VERSION = '1.8.2'.freeze
5
+ VERSION = '1.8.3'.freeze
6
6
  end
7
7
  end
@@ -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 two 3d type files and two other supporting files' do
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(/3d 2/)
526
- expect(xml.xpath('//label')[2].text).to match(/File 1/)
527
- expect(xml.xpath('//label')[3].text).to match(/File 2/)
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('3d')
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.2
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-23 00:00:00.000000000 Z
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
- rubyforge_project: assembly-objectfile
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