assembly-objectfile 2.3.0 → 2.4.0
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/Gemfile.lock +9 -9
- data/lib/assembly/object_file/version.rb +1 -1
- data/lib/assembly-objectfile.rb +4 -1
- data/spec/assembly/object_file_spec.rb +22 -0
- data/spec/fixtures/input/arc_metadata.tif.xml +2153 -0
- data/spec/fixtures/input/index_map.geojson +9 -0
- data/spec/fixtures/input/tif_overview.tif.ovr +0 -0
- metadata +6 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 573f33db1e5eaf184ce40a88c40c0f194d5bceb3b7f4c4064e457c25b90e50f6
|
|
4
|
+
data.tar.gz: 82d86665fee350c6e21be0336cb6551373dde51ac60d1f14e4574e14663a00d7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ccd8fdca0e0dc2faf6186be255140cd52d7dc0f0f159e79dbbd9057a1916bd136940f0165d570f1ea7fd1b0b1103053535cd998621248b2ef5b792f9ad7c6ab7
|
|
7
|
+
data.tar.gz: 659a0abed78f1583c8ad8e5f9227634946e0129f8dc6991a9336cb83542f7029bd1579b6159693772be616aa23b66661180a50102e8b9038031cec882e8f06e1
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
assembly-objectfile (2.
|
|
4
|
+
assembly-objectfile (2.4.0)
|
|
5
5
|
activesupport (>= 5.2.0)
|
|
6
6
|
mime-types (> 3)
|
|
7
7
|
mini_exiftool
|
|
@@ -9,7 +9,7 @@ PATH
|
|
|
9
9
|
GEM
|
|
10
10
|
remote: http://rubygems.org/
|
|
11
11
|
specs:
|
|
12
|
-
activesupport (8.1.3)
|
|
12
|
+
activesupport (8.1.3.1)
|
|
13
13
|
base64
|
|
14
14
|
bigdecimal
|
|
15
15
|
concurrent-ruby (~> 1.0, >= 1.3.1)
|
|
@@ -32,16 +32,16 @@ GEM
|
|
|
32
32
|
reline (>= 0.3.8)
|
|
33
33
|
diff-lcs (1.6.2)
|
|
34
34
|
drb (2.2.3)
|
|
35
|
-
erb (6.0.
|
|
35
|
+
erb (6.0.7)
|
|
36
36
|
i18n (1.15.2)
|
|
37
37
|
concurrent-ruby (~> 1.0)
|
|
38
|
-
io-console (0.
|
|
38
|
+
io-console (0.9.2)
|
|
39
39
|
irb (1.18.0)
|
|
40
40
|
pp (>= 0.6.0)
|
|
41
41
|
prism (>= 1.3.0)
|
|
42
42
|
rdoc (>= 4.0.0)
|
|
43
43
|
reline (>= 0.4.2)
|
|
44
|
-
json (2.21.
|
|
44
|
+
json (2.21.2)
|
|
45
45
|
language_server-protocol (3.17.0.6)
|
|
46
46
|
lint_roller (1.1.0)
|
|
47
47
|
logger (1.7.0)
|
|
@@ -68,7 +68,7 @@ GEM
|
|
|
68
68
|
racc (1.8.1)
|
|
69
69
|
rainbow (3.1.1)
|
|
70
70
|
rake (13.4.2)
|
|
71
|
-
rbs (4.1.
|
|
71
|
+
rbs (4.1.3)
|
|
72
72
|
logger
|
|
73
73
|
prism (>= 1.6.0)
|
|
74
74
|
tsort
|
|
@@ -78,7 +78,7 @@ GEM
|
|
|
78
78
|
rbs (>= 4.0.0)
|
|
79
79
|
tsort
|
|
80
80
|
regexp_parser (2.12.0)
|
|
81
|
-
reline (0.
|
|
81
|
+
reline (0.7.0)
|
|
82
82
|
io-console (~> 0.5)
|
|
83
83
|
rspec (3.13.2)
|
|
84
84
|
rspec-core (~> 3.13.0)
|
|
@@ -93,7 +93,7 @@ GEM
|
|
|
93
93
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
94
94
|
rspec-support (~> 3.13.0)
|
|
95
95
|
rspec-support (3.13.7)
|
|
96
|
-
rubocop (1.
|
|
96
|
+
rubocop (1.89.0)
|
|
97
97
|
json (~> 2.3)
|
|
98
98
|
language_server-protocol (~> 3.17.0.2)
|
|
99
99
|
lint_roller (~> 1.1.0)
|
|
@@ -148,4 +148,4 @@ DEPENDENCIES
|
|
|
148
148
|
simplecov
|
|
149
149
|
|
|
150
150
|
BUNDLED WITH
|
|
151
|
-
4.0.
|
|
151
|
+
4.0.18
|
data/lib/assembly-objectfile.rb
CHANGED
|
@@ -19,8 +19,11 @@ module Assembly
|
|
|
19
19
|
# e.g. for any .json file, you will always get `application/json`
|
|
20
20
|
OVERRIDE_MIMETYPES = {
|
|
21
21
|
'.json': 'application/json',
|
|
22
|
+
'.xml': 'application/xml',
|
|
22
23
|
'.vtt': 'text/vtt',
|
|
23
|
-
'.shp': 'application/vnd.shp'
|
|
24
|
+
'.shp': 'application/vnd.shp',
|
|
25
|
+
'.geojson': 'application/geo+json',
|
|
26
|
+
'.ovr': 'application/octet-stream'
|
|
24
27
|
}.freeze
|
|
25
28
|
end
|
|
26
29
|
|
|
@@ -248,6 +248,20 @@ describe Assembly::ObjectFile do
|
|
|
248
248
|
end
|
|
249
249
|
end
|
|
250
250
|
|
|
251
|
+
context 'with tif overview file' do
|
|
252
|
+
it 'application/octet-stream' do
|
|
253
|
+
object_file = described_class.new(File.join(fixture_input_dir, 'tif_overview.tif.ovr'))
|
|
254
|
+
expect(object_file.mimetype).to eq('application/octet-stream')
|
|
255
|
+
end
|
|
256
|
+
end
|
|
257
|
+
|
|
258
|
+
context 'with ESRI XML metadata for a tif' do
|
|
259
|
+
it 'application/xml' do
|
|
260
|
+
object_file = described_class.new(File.join(fixture_input_dir, 'arc_metadata.tif.xml'))
|
|
261
|
+
expect(object_file.mimetype).to eq('application/xml')
|
|
262
|
+
end
|
|
263
|
+
end
|
|
264
|
+
|
|
251
265
|
context 'with .jp2 file' do
|
|
252
266
|
it 'image/jp2' do
|
|
253
267
|
object_file = described_class.new(jp2_fixture_file)
|
|
@@ -311,6 +325,14 @@ describe Assembly::ObjectFile do
|
|
|
311
325
|
end
|
|
312
326
|
end
|
|
313
327
|
|
|
328
|
+
context 'when .geojson file' do
|
|
329
|
+
it 'uses the manual mapping to set the correct mimetype of application/geo+json for a .geojson file' do
|
|
330
|
+
geojson_fixture_file = File.join(fixture_input_dir, 'index_map.geojson')
|
|
331
|
+
object_file = described_class.new(geojson_fixture_file)
|
|
332
|
+
expect(object_file.mimetype).to eq('application/geo+json')
|
|
333
|
+
end
|
|
334
|
+
end
|
|
335
|
+
|
|
314
336
|
context 'when .vtt file' do
|
|
315
337
|
it 'uses the manual mapping to set the correct mimetype of text/vtt for a .vtt file' do
|
|
316
338
|
object_file = described_class.new(vtt_fixture_file)
|