assembly-objectfile 1.7.1 → 1.7.2
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 +5 -5
- data/.rubocop.yml +22 -0
- data/.rubocop_todo.yml +132 -0
- data/Gemfile +1 -1
- data/Rakefile +9 -9
- data/assembly-objectfile.gemspec +11 -10
- data/lib/assembly-objectfile.rb +24 -22
- data/lib/assembly-objectfile/content_metadata.rb +225 -220
- data/lib/assembly-objectfile/object_file.rb +6 -9
- data/lib/assembly-objectfile/object_fileable.rb +131 -198
- data/lib/assembly-objectfile/version.rb +2 -4
- data/spec/content_metadata_spec.rb +455 -439
- data/spec/object_file_spec.rb +86 -83
- data/spec/spec_helper.rb +48 -45
- data/spec/test_data/input/someobject.obj +1 -0
- data/spec/test_data/input/someobject.ply +1 -0
- metadata +45 -12
data/spec/object_file_spec.rb
CHANGED
@@ -1,25 +1,24 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
3
|
describe Assembly::ObjectFile do
|
4
|
-
|
5
|
-
|
6
|
-
@ai
|
7
|
-
expect{@ai.
|
8
|
-
expect{@ai.
|
9
|
-
expect{@ai.md5}.to raise_error(RuntimeError,'input file does not exist')
|
4
|
+
it 'does not run if no input file is passed in' do
|
5
|
+
@ai = described_class.new('')
|
6
|
+
expect { @ai.filesize }.to raise_error(RuntimeError, 'input file does not exist')
|
7
|
+
expect { @ai.sha1 }.to raise_error(RuntimeError, 'input file does not exist')
|
8
|
+
expect { @ai.md5 }.to raise_error(RuntimeError, 'input file does not exist')
|
10
9
|
end
|
11
10
|
|
12
|
-
it
|
13
|
-
expect(
|
11
|
+
it 'returns the common directory of a set of filenames passed into it, where the common part does not terminate on a directory' do
|
12
|
+
expect(described_class.common_path(['/Users/peter/00/test.tif', '/Users/peter/05/test.jp2'])).to eq('/Users/peter/')
|
14
13
|
end
|
15
14
|
|
16
|
-
it
|
17
|
-
expect(
|
15
|
+
it 'returns the common directory of a set of filenames passed into it, where the common part does not terminate on a directory' do
|
16
|
+
expect(described_class.common_path(['/Users/peter/00/test.tif', '/Users/peter/00/test.jp2'])).to eq('/Users/peter/00/')
|
18
17
|
end
|
19
|
-
|
20
|
-
it
|
21
|
-
expect(File.
|
22
|
-
@ai =
|
18
|
+
|
19
|
+
it 'tells us if an input file is an image' do
|
20
|
+
expect(File.exist?(TEST_TIF_INPUT_FILE)).to be true
|
21
|
+
@ai = described_class.new(TEST_TIF_INPUT_FILE)
|
23
22
|
expect(@ai.image?).to eq(true)
|
24
23
|
expect(@ai.exif).not_to be nil
|
25
24
|
expect(@ai.mimetype).to eq('image/tiff')
|
@@ -28,37 +27,37 @@ describe Assembly::ObjectFile do
|
|
28
27
|
expect(@ai.valid_image?).to eq(true)
|
29
28
|
expect(@ai.jp2able?).to eq(true)
|
30
29
|
end
|
31
|
-
|
32
|
-
it
|
33
|
-
@ai =
|
34
|
-
expect(@ai.filename).to eq(
|
35
|
-
expect(@ai.ext).to eq(
|
36
|
-
expect(@ai.filename_without_ext).to eq(
|
30
|
+
|
31
|
+
it 'tells us information about the input file' do
|
32
|
+
@ai = described_class.new(TEST_TIF_INPUT_FILE)
|
33
|
+
expect(@ai.filename).to eq('test.tif')
|
34
|
+
expect(@ai.ext).to eq('.tif')
|
35
|
+
expect(@ai.filename_without_ext).to eq('test')
|
37
36
|
expect(@ai.dirname).to eq(File.dirname(TEST_TIF_INPUT_FILE))
|
38
37
|
end
|
39
38
|
|
40
|
-
it
|
41
|
-
@ai =
|
42
|
-
expect(@ai.filename).to eq(
|
43
|
-
expect(@ai.ext).to eq(
|
44
|
-
expect(['text/html','application/xml'].include?(@ai.mimetype)).to be true # we could get either of these mimetypes depending on the OS
|
39
|
+
it 'gives us the mimetype of a file even if the exif information is damaged' do
|
40
|
+
@ai = described_class.new(TEST_FILE_NO_EXIF)
|
41
|
+
expect(@ai.filename).to eq('file_with_no_exif.xml')
|
42
|
+
expect(@ai.ext).to eq('.xml')
|
43
|
+
expect(['text/html', 'application/xml'].include?(@ai.mimetype)).to be true # we could get either of these mimetypes depending on the OS
|
45
44
|
end
|
46
45
|
|
47
|
-
it
|
48
|
-
test_file=File.join(TEST_INPUT_DIR,'oo000oo0001_00_001.tif')
|
49
|
-
@ai =
|
50
|
-
expect(@ai.dpg_basename).to eq(
|
46
|
+
it 'gives us the DPG base name for a file' do
|
47
|
+
test_file = File.join(TEST_INPUT_DIR, 'oo000oo0001_00_001.tif')
|
48
|
+
@ai = described_class.new(test_file)
|
49
|
+
expect(@ai.dpg_basename).to eq('oo000oo0001_001')
|
51
50
|
end
|
52
51
|
|
53
|
-
it
|
54
|
-
test_file=File.join(TEST_INPUT_DIR,'oo000oo0001_05_001.tif')
|
55
|
-
@ai =
|
56
|
-
expect(@ai.dpg_folder).to eq(
|
52
|
+
it 'gives us the DPG subfolder name for a file' do
|
53
|
+
test_file = File.join(TEST_INPUT_DIR, 'oo000oo0001_05_001.tif')
|
54
|
+
@ai = described_class.new(test_file)
|
55
|
+
expect(@ai.dpg_folder).to eq('05')
|
57
56
|
end
|
58
|
-
|
59
|
-
it
|
60
|
-
expect(File.
|
61
|
-
@ai =
|
57
|
+
|
58
|
+
it 'tells us that a jp2 file is not jp2able but does have a color profile' do
|
59
|
+
expect(File.exist?(TEST_JP2_INPUT_FILE)).to be true
|
60
|
+
@ai = described_class.new(TEST_JP2_INPUT_FILE)
|
62
61
|
expect(@ai.image?).to eq(true)
|
63
62
|
expect(@ai.object_type).to eq(:image)
|
64
63
|
expect(@ai.valid_image?).to eq(true)
|
@@ -66,93 +65,97 @@ describe Assembly::ObjectFile do
|
|
66
65
|
expect(@ai.has_color_profile?).to eq(true)
|
67
66
|
end
|
68
67
|
|
69
|
-
it
|
70
|
-
expect(File.
|
71
|
-
@ai =
|
68
|
+
it 'tells us that a tiff file is jp2able and has a color profile' do
|
69
|
+
expect(File.exist?(TEST_RES1_TIF1)).to be true
|
70
|
+
@ai = described_class.new(TEST_RES1_TIF1)
|
72
71
|
expect(@ai.image?).to eq(true)
|
73
72
|
expect(@ai.object_type).to eq(:image)
|
74
73
|
expect(@ai.valid_image?).to eq(true)
|
75
74
|
expect(@ai.jp2able?).to eq(true)
|
76
75
|
expect(@ai.has_color_profile?).to eq(true)
|
77
76
|
end
|
78
|
-
|
79
|
-
it
|
80
|
-
expect(File.
|
81
|
-
@ai =
|
77
|
+
|
78
|
+
it 'tells us that a tiff file is not jp2able and is not valid since it has no profile' do
|
79
|
+
expect(File.exist?(TEST_TIFF_NO_COLOR_FILE)).to be true
|
80
|
+
@ai = described_class.new(TEST_TIFF_NO_COLOR_FILE)
|
82
81
|
expect(@ai.image?).to eq(true)
|
83
82
|
expect(@ai.object_type).to eq(:image)
|
84
83
|
expect(@ai.valid_image?).to eq(true)
|
85
84
|
expect(@ai.jp2able?).to eq(true)
|
86
85
|
expect(@ai.has_color_profile?).to eq(false)
|
87
86
|
end
|
88
|
-
|
89
|
-
it
|
90
|
-
expect(File.
|
91
|
-
@ai =
|
87
|
+
|
88
|
+
it 'computes checksums for an image file' do
|
89
|
+
expect(File.exist?(TEST_TIF_INPUT_FILE)).to be true
|
90
|
+
@ai = described_class.new(TEST_TIF_INPUT_FILE)
|
92
91
|
expect(@ai.md5).to eq('a2400500acf21e43f5440d93be894101')
|
93
92
|
expect(@ai.sha1).to eq('8d11fab63089a24c8b17063d29a4b0eac359fb41')
|
94
93
|
end
|
95
94
|
|
96
|
-
it
|
97
|
-
path=Assembly::PATH_TO_GEM
|
98
|
-
@ai =
|
99
|
-
expect(File.
|
95
|
+
it 'indicates that the file is not found when a valid directory is supplied instead of a file or when an invalid file path is specified' do
|
96
|
+
path = Assembly::PATH_TO_GEM
|
97
|
+
@ai = described_class.new(path)
|
98
|
+
expect(File.exist?(path)).to be true
|
100
99
|
expect(File.directory?(path)).to be true
|
101
100
|
expect(@ai.file_exists?).to be false
|
102
|
-
|
103
|
-
path=File.join(Assembly::PATH_TO_GEM,'bogus.txt')
|
104
|
-
@ai =
|
105
|
-
expect(File.
|
101
|
+
|
102
|
+
path = File.join(Assembly::PATH_TO_GEM, 'bogus.txt')
|
103
|
+
@ai = described_class.new(path)
|
104
|
+
expect(File.exist?(path)).to be false
|
106
105
|
expect(File.directory?(path)).to be false
|
107
|
-
expect(@ai.file_exists?).to be false
|
106
|
+
expect(@ai.file_exists?).to be false
|
108
107
|
end
|
109
|
-
|
110
|
-
it
|
111
|
-
@ai =
|
108
|
+
|
109
|
+
it 'sets attributes correctly when initializing' do
|
110
|
+
@ai = described_class.new('/some/file.txt')
|
112
111
|
expect(@ai.path).to eq('/some/file.txt')
|
113
|
-
expect(@ai.label).to be_nil
|
112
|
+
expect(@ai.label).to be_nil
|
114
113
|
expect(@ai.file_attributes).to be_nil
|
115
114
|
expect(@ai.provider_sha1).to be_nil
|
116
115
|
expect(@ai.provider_md5).to be_nil
|
117
116
|
expect(@ai.relative_path).to be_nil
|
118
|
-
|
119
|
-
@ai =
|
117
|
+
|
118
|
+
@ai = described_class.new('/some/file.txt', label: 'some label', file_attributes: { 'shelve' => 'yes', 'publish' => 'yes', 'preserve' => 'no' }, relative_path: '/tmp')
|
120
119
|
expect(@ai.path).to eq('/some/file.txt')
|
121
120
|
expect(@ai.label).to eq('some label')
|
122
|
-
expect(@ai.file_attributes).to eq(
|
121
|
+
expect(@ai.file_attributes).to eq('shelve' => 'yes', 'publish' => 'yes', 'preserve' => 'no')
|
123
122
|
expect(@ai.provider_sha1).to be_nil
|
124
123
|
expect(@ai.provider_md5).to be_nil
|
125
124
|
expect(@ai.relative_path).to eq('/tmp')
|
126
125
|
end
|
127
|
-
|
128
|
-
it
|
129
|
-
|
130
|
-
expect(
|
131
|
-
|
126
|
+
|
127
|
+
it 'sets md5_provider attribute' do
|
128
|
+
ai = described_class.new('/some/file.txt', provider_md5: 'XYZ')
|
129
|
+
expect(ai.provider_md5).to eq('XYZ')
|
130
|
+
end
|
131
|
+
|
132
|
+
it 'tells us if an input file is not an image' do
|
133
|
+
non_image_file = File.join(Assembly::PATH_TO_GEM, 'spec/object_file_spec.rb')
|
134
|
+
expect(File.exist?(non_image_file)).to be true
|
135
|
+
@ai = described_class.new(non_image_file)
|
132
136
|
expect(@ai.image?).to eq(false)
|
133
137
|
expect(@ai.object_type).not_to eq(:image)
|
134
138
|
expect(@ai.valid_image?).to eq(false)
|
135
139
|
|
136
|
-
non_image_file=File.join(Assembly::PATH_TO_GEM,'README.rdoc')
|
137
|
-
expect(File.
|
138
|
-
@ai =
|
140
|
+
non_image_file = File.join(Assembly::PATH_TO_GEM, 'README.rdoc')
|
141
|
+
expect(File.exist?(non_image_file)).to be true
|
142
|
+
@ai = described_class.new(non_image_file)
|
139
143
|
expect(@ai.image?).to eq(false)
|
140
|
-
expect(@ai.object_type).to eq(:other)
|
141
|
-
expect(@ai.valid_image?).to eq(false)
|
144
|
+
expect(@ai.object_type).to eq(:other)
|
145
|
+
expect(@ai.valid_image?).to eq(false)
|
142
146
|
end
|
143
147
|
|
144
|
-
it
|
145
|
-
expect(File.
|
146
|
-
@ai =
|
147
|
-
expect(@ai.filesize).to eq(
|
148
|
+
it 'tells us the size of an input file' do
|
149
|
+
expect(File.exist?(TEST_TIF_INPUT_FILE)).to be true
|
150
|
+
@ai = described_class.new(TEST_TIF_INPUT_FILE)
|
151
|
+
expect(@ai.filesize).to eq(63_542)
|
148
152
|
end
|
149
153
|
|
150
|
-
it
|
151
|
-
expect(File.
|
152
|
-
@ai =
|
154
|
+
it 'tells us the mimetype and encoding of an input file' do
|
155
|
+
expect(File.exist?(TEST_TIF_INPUT_FILE)).to be true
|
156
|
+
@ai = described_class.new(TEST_TIF_INPUT_FILE)
|
153
157
|
expect(@ai.mimetype).to eq('image/tiff')
|
154
158
|
expect(@ai.file_mimetype).to eq('image/tiff')
|
155
159
|
expect(@ai.encoding).to eq('binary')
|
156
160
|
end
|
157
|
-
|
158
|
-
end
|
161
|
+
end
|
data/spec/spec_helper.rb
CHANGED
@@ -5,48 +5,51 @@ RSpec.configure do |config|
|
|
5
5
|
config.order = 'random'
|
6
6
|
end
|
7
7
|
|
8
|
-
TEST_DATA_DIR = File.join(Assembly::PATH_TO_GEM,'spec','test_data')
|
9
|
-
TEST_INPUT_DIR = File.join(TEST_DATA_DIR,'input')
|
10
|
-
TEST_OUTPUT_DIR = File.join(TEST_DATA_DIR,'output')
|
11
|
-
TEST_TIF_INPUT_FILE = File.join(TEST_INPUT_DIR,'test.tif')
|
12
|
-
TEST_TIF_INPUT_FILE2 = File.join(TEST_INPUT_DIR,'test2.tif')
|
13
|
-
TEST_JPEG_INPUT_FILE = File.join(TEST_INPUT_DIR,'test.jpg')
|
14
|
-
TEST_JP2_INPUT_FILE
|
15
|
-
TEST_JP2_INPUT_FILE2
|
16
|
-
TEST_JP2_OUTPUT_FILE = File.join(TEST_OUTPUT_DIR,'test.jp2')
|
17
|
-
TEST_PDF_FILE = File.join(TEST_INPUT_DIR,'test.pdf')
|
18
|
-
|
19
|
-
TEST_DPG_TIF=File.join(TEST_INPUT_DIR,'oo000oo0001','00','oo000oo0001_00_001.tif')
|
20
|
-
TEST_DPG_TIF2=File.join(TEST_INPUT_DIR,'oo000oo0001','00','oo000oo0001_00_002.tif')
|
21
|
-
TEST_DPG_JP=File.join(TEST_INPUT_DIR,'oo000oo0001','05','oo000oo0001_05_001.jp2')
|
22
|
-
TEST_DPG_JP2=File.join(TEST_INPUT_DIR,'oo000oo0001','05','oo000oo0001_05_002.jp2')
|
23
|
-
TEST_DPG_PDF=File.join(TEST_INPUT_DIR,'oo000oo0001','15','oo000oo0001_15_001.pdf')
|
24
|
-
TEST_DPG_PDF2=File.join(TEST_INPUT_DIR,'oo000oo0001','15','oo000oo0001_15_002.pdf')
|
25
|
-
TEST_DPG_SPECIAL_PDF1=File.join(TEST_INPUT_DIR,'oo000oo0001','oo000oo0001_book.pdf')
|
26
|
-
TEST_DPG_SPECIAL_PDF2=File.join(TEST_INPUT_DIR,'oo000oo0001','31','oo000oo0001_31_001.pdf')
|
27
|
-
TEST_DPG_SPECIAL_TIF=File.join(TEST_INPUT_DIR,'oo000oo0001','50','oo000oo0001_50_001.tif')
|
28
|
-
|
29
|
-
TEST_TIFF_NO_COLOR_FILE=File.join(TEST_INPUT_DIR,'test_no_color_profile.tif')
|
30
|
-
|
31
|
-
TEST_RES1_TIF1=File.join(TEST_INPUT_DIR,'res1_image1.tif')
|
32
|
-
TEST_RES1_JP1=File.join(TEST_INPUT_DIR,'res1_image1.jp2')
|
33
|
-
TEST_RES1_TIF2=File.join(TEST_INPUT_DIR,'res1_image2.tif')
|
34
|
-
TEST_RES1_JP2=File.join(TEST_INPUT_DIR,'res1_image2.jp2')
|
35
|
-
TEST_RES1_TEI=File.join(TEST_INPUT_DIR,'res1_teifile.txt')
|
36
|
-
TEST_RES1_TEXT=File.join(TEST_INPUT_DIR,'res1_textfile.txt')
|
37
|
-
TEST_RES1_PDF=File.join(TEST_INPUT_DIR,'res1_transcript.pdf')
|
38
|
-
|
39
|
-
TEST_RES2_TIF1=File.join(TEST_INPUT_DIR,'res2_image1.tif')
|
40
|
-
TEST_RES2_JP1=File.join(TEST_INPUT_DIR,'res2_image1.jp2')
|
41
|
-
TEST_RES2_TIF2=File.join(TEST_INPUT_DIR,'res2_image2.tif')
|
42
|
-
TEST_RES2_JP2=File.join(TEST_INPUT_DIR,'res2_image2.jp2')
|
43
|
-
TEST_RES2_TEI=File.join(TEST_INPUT_DIR,'res2_teifile.txt')
|
44
|
-
TEST_RES2_TEXT=File.join(TEST_INPUT_DIR,'res2_textfile.txt')
|
45
|
-
|
46
|
-
TEST_RES3_TIF1=File.join(TEST_INPUT_DIR,'res3_image1.tif')
|
47
|
-
TEST_RES3_JP1=File.join(TEST_INPUT_DIR,'res3_image1.jp2')
|
48
|
-
TEST_RES3_TEI=File.join(TEST_INPUT_DIR,'res3_teifile.txt')
|
49
|
-
|
50
|
-
TEST_FILE_NO_EXIF=File.join(TEST_INPUT_DIR,'file_with_no_exif.xml')
|
51
|
-
|
52
|
-
|
8
|
+
TEST_DATA_DIR = File.join(Assembly::PATH_TO_GEM, 'spec', 'test_data')
|
9
|
+
TEST_INPUT_DIR = File.join(TEST_DATA_DIR, 'input')
|
10
|
+
TEST_OUTPUT_DIR = File.join(TEST_DATA_DIR, 'output')
|
11
|
+
TEST_TIF_INPUT_FILE = File.join(TEST_INPUT_DIR, 'test.tif')
|
12
|
+
TEST_TIF_INPUT_FILE2 = File.join(TEST_INPUT_DIR, 'test2.tif')
|
13
|
+
TEST_JPEG_INPUT_FILE = File.join(TEST_INPUT_DIR, 'test.jpg')
|
14
|
+
TEST_JP2_INPUT_FILE = File.join(TEST_INPUT_DIR, 'test.jp2')
|
15
|
+
TEST_JP2_INPUT_FILE2 = File.join(TEST_INPUT_DIR, 'test2.jp2')
|
16
|
+
TEST_JP2_OUTPUT_FILE = File.join(TEST_OUTPUT_DIR, 'test.jp2')
|
17
|
+
TEST_PDF_FILE = File.join(TEST_INPUT_DIR, 'test.pdf')
|
18
|
+
|
19
|
+
TEST_DPG_TIF = File.join(TEST_INPUT_DIR, 'oo000oo0001', '00', 'oo000oo0001_00_001.tif')
|
20
|
+
TEST_DPG_TIF2 = File.join(TEST_INPUT_DIR, 'oo000oo0001', '00', 'oo000oo0001_00_002.tif')
|
21
|
+
TEST_DPG_JP = File.join(TEST_INPUT_DIR, 'oo000oo0001', '05', 'oo000oo0001_05_001.jp2')
|
22
|
+
TEST_DPG_JP2 = File.join(TEST_INPUT_DIR, 'oo000oo0001', '05', 'oo000oo0001_05_002.jp2')
|
23
|
+
TEST_DPG_PDF = File.join(TEST_INPUT_DIR, 'oo000oo0001', '15', 'oo000oo0001_15_001.pdf')
|
24
|
+
TEST_DPG_PDF2 = File.join(TEST_INPUT_DIR, 'oo000oo0001', '15', 'oo000oo0001_15_002.pdf')
|
25
|
+
TEST_DPG_SPECIAL_PDF1 = File.join(TEST_INPUT_DIR, 'oo000oo0001', 'oo000oo0001_book.pdf')
|
26
|
+
TEST_DPG_SPECIAL_PDF2 = File.join(TEST_INPUT_DIR, 'oo000oo0001', '31', 'oo000oo0001_31_001.pdf')
|
27
|
+
TEST_DPG_SPECIAL_TIF = File.join(TEST_INPUT_DIR, 'oo000oo0001', '50', 'oo000oo0001_50_001.tif')
|
28
|
+
|
29
|
+
TEST_TIFF_NO_COLOR_FILE = File.join(TEST_INPUT_DIR, 'test_no_color_profile.tif')
|
30
|
+
|
31
|
+
TEST_RES1_TIF1 = File.join(TEST_INPUT_DIR, 'res1_image1.tif')
|
32
|
+
TEST_RES1_JP1 = File.join(TEST_INPUT_DIR, 'res1_image1.jp2')
|
33
|
+
TEST_RES1_TIF2 = File.join(TEST_INPUT_DIR, 'res1_image2.tif')
|
34
|
+
TEST_RES1_JP2 = File.join(TEST_INPUT_DIR, 'res1_image2.jp2')
|
35
|
+
TEST_RES1_TEI = File.join(TEST_INPUT_DIR, 'res1_teifile.txt')
|
36
|
+
TEST_RES1_TEXT = File.join(TEST_INPUT_DIR, 'res1_textfile.txt')
|
37
|
+
TEST_RES1_PDF = File.join(TEST_INPUT_DIR, 'res1_transcript.pdf')
|
38
|
+
|
39
|
+
TEST_RES2_TIF1 = File.join(TEST_INPUT_DIR, 'res2_image1.tif')
|
40
|
+
TEST_RES2_JP1 = File.join(TEST_INPUT_DIR, 'res2_image1.jp2')
|
41
|
+
TEST_RES2_TIF2 = File.join(TEST_INPUT_DIR, 'res2_image2.tif')
|
42
|
+
TEST_RES2_JP2 = File.join(TEST_INPUT_DIR, 'res2_image2.jp2')
|
43
|
+
TEST_RES2_TEI = File.join(TEST_INPUT_DIR, 'res2_teifile.txt')
|
44
|
+
TEST_RES2_TEXT = File.join(TEST_INPUT_DIR, 'res2_textfile.txt')
|
45
|
+
|
46
|
+
TEST_RES3_TIF1 = File.join(TEST_INPUT_DIR, 'res3_image1.tif')
|
47
|
+
TEST_RES3_JP1 = File.join(TEST_INPUT_DIR, 'res3_image1.jp2')
|
48
|
+
TEST_RES3_TEI = File.join(TEST_INPUT_DIR, 'res3_teifile.txt')
|
49
|
+
|
50
|
+
TEST_FILE_NO_EXIF = File.join(TEST_INPUT_DIR, 'file_with_no_exif.xml')
|
51
|
+
|
52
|
+
TEST_OBJ_FILE=File.join(TEST_INPUT_DIR,'someobject.obj')
|
53
|
+
TEST_PLY_FILE=File.join(TEST_INPUT_DIR,'someobject.ply')
|
54
|
+
|
55
|
+
TEST_DRUID = 'nx288wh8889'.freeze
|
@@ -0,0 +1 @@
|
|
1
|
+
some3dobjectfile
|
@@ -0,0 +1 @@
|
|
1
|
+
some3dobjectfile
|
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.7.
|
4
|
+
version: 1.7.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Peter Mangiafico
|
@@ -11,24 +11,24 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: exe
|
13
13
|
cert_chain: []
|
14
|
-
date:
|
14
|
+
date: 2019-08-14 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
|
-
name:
|
17
|
+
name: mime-types
|
18
18
|
requirement: !ruby/object:Gem::Requirement
|
19
19
|
requirements:
|
20
|
-
- - "
|
20
|
+
- - ">"
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: '
|
22
|
+
version: '3'
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
26
26
|
requirements:
|
27
|
-
- - "
|
27
|
+
- - ">"
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: '
|
29
|
+
version: '3'
|
30
30
|
- !ruby/object:Gem::Dependency
|
31
|
-
name:
|
31
|
+
name: mini_exiftool
|
32
32
|
requirement: !ruby/object:Gem::Requirement
|
33
33
|
requirements:
|
34
34
|
- - ">="
|
@@ -56,7 +56,7 @@ dependencies:
|
|
56
56
|
- !ruby/object:Gem::Version
|
57
57
|
version: '0'
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
|
-
name:
|
59
|
+
name: json
|
60
60
|
requirement: !ruby/object:Gem::Requirement
|
61
61
|
requirements:
|
62
62
|
- - ">="
|
@@ -70,7 +70,7 @@ dependencies:
|
|
70
70
|
- !ruby/object:Gem::Version
|
71
71
|
version: '0'
|
72
72
|
- !ruby/object:Gem::Dependency
|
73
|
-
name:
|
73
|
+
name: rake
|
74
74
|
requirement: !ruby/object:Gem::Requirement
|
75
75
|
requirements:
|
76
76
|
- - ">="
|
@@ -97,6 +97,34 @@ dependencies:
|
|
97
97
|
- - "~>"
|
98
98
|
- !ruby/object:Gem::Version
|
99
99
|
version: '3.0'
|
100
|
+
- !ruby/object:Gem::Dependency
|
101
|
+
name: rubocop
|
102
|
+
requirement: !ruby/object:Gem::Requirement
|
103
|
+
requirements:
|
104
|
+
- - ">="
|
105
|
+
- !ruby/object:Gem::Version
|
106
|
+
version: '0'
|
107
|
+
type: :development
|
108
|
+
prerelease: false
|
109
|
+
version_requirements: !ruby/object:Gem::Requirement
|
110
|
+
requirements:
|
111
|
+
- - ">="
|
112
|
+
- !ruby/object:Gem::Version
|
113
|
+
version: '0'
|
114
|
+
- !ruby/object:Gem::Dependency
|
115
|
+
name: rubocop-rspec
|
116
|
+
requirement: !ruby/object:Gem::Requirement
|
117
|
+
requirements:
|
118
|
+
- - ">="
|
119
|
+
- !ruby/object:Gem::Version
|
120
|
+
version: '0'
|
121
|
+
type: :development
|
122
|
+
prerelease: false
|
123
|
+
version_requirements: !ruby/object:Gem::Requirement
|
124
|
+
requirements:
|
125
|
+
- - ">="
|
126
|
+
- !ruby/object:Gem::Version
|
127
|
+
version: '0'
|
100
128
|
- !ruby/object:Gem::Dependency
|
101
129
|
name: yard
|
102
130
|
requirement: !ruby/object:Gem::Requirement
|
@@ -119,6 +147,8 @@ extensions: []
|
|
119
147
|
extra_rdoc_files: []
|
120
148
|
files:
|
121
149
|
- ".gitignore"
|
150
|
+
- ".rubocop.yml"
|
151
|
+
- ".rubocop_todo.yml"
|
122
152
|
- ".rvmrc.example"
|
123
153
|
- ".travis.yml"
|
124
154
|
- Gemfile
|
@@ -167,6 +197,8 @@ files:
|
|
167
197
|
- spec/test_data/input/res3_image1.jp2
|
168
198
|
- spec/test_data/input/res3_image1.tif
|
169
199
|
- spec/test_data/input/res3_teifile.txt
|
200
|
+
- spec/test_data/input/someobject.obj
|
201
|
+
- spec/test_data/input/someobject.ply
|
170
202
|
- spec/test_data/input/test.jp2
|
171
203
|
- spec/test_data/input/test.pdf
|
172
204
|
- spec/test_data/input/test.tif
|
@@ -192,8 +224,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
192
224
|
- !ruby/object:Gem::Version
|
193
225
|
version: '0'
|
194
226
|
requirements: []
|
195
|
-
|
196
|
-
rubygems_version: 2.6.11
|
227
|
+
rubygems_version: 3.0.4
|
197
228
|
signing_key:
|
198
229
|
specification_version: 4
|
199
230
|
summary: Ruby immplementation of file services needed to prepare objects to be accessioned
|
@@ -229,6 +260,8 @@ test_files:
|
|
229
260
|
- spec/test_data/input/res3_image1.jp2
|
230
261
|
- spec/test_data/input/res3_image1.tif
|
231
262
|
- spec/test_data/input/res3_teifile.txt
|
263
|
+
- spec/test_data/input/someobject.obj
|
264
|
+
- spec/test_data/input/someobject.ply
|
232
265
|
- spec/test_data/input/test.jp2
|
233
266
|
- spec/test_data/input/test.pdf
|
234
267
|
- spec/test_data/input/test.tif
|