ro-crate 0.4.12 → 0.4.13
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 +1 -1
- data/lib/ro_crate/model/crate.rb +1 -0
- data/ro_crate.gemspec +1 -1
- data/test/crate_test.rb +21 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 364757350da7d275b02def348bfd97782ad0ae31728c44f0691bc084e4d94ac9
|
4
|
+
data.tar.gz: 6b56ae58b682a4618dcb92ca78cbae720426316bc8ec50b9377fb9fda8ec9137
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a2b14f9c64528476a18f84d0292311484e975a3dc6085c00c94f5dac8d84fa144e91bb6138c876db4a4079aeec4222eb6a1f91458e2ef0260defa9d3a0a42d57
|
7
|
+
data.tar.gz: b56d257868b7cb94f341e844223d14988c280fff34bb54dd1a676d47681d96afc8193ebb60a22eecfef7e96dc0d2ce03ed1571190a1717fbe56d1b80ed579053
|
data/Gemfile.lock
CHANGED
data/lib/ro_crate/model/crate.rb
CHANGED
data/ro_crate.gemspec
CHANGED
data/test/crate_test.rb
CHANGED
@@ -327,4 +327,25 @@ class CrateTest < Test::Unit::TestCase
|
|
327
327
|
assert_not_include crate.entities, file
|
328
328
|
assert_not_include crate.entities, person
|
329
329
|
end
|
330
|
+
|
331
|
+
test 'legacy entries method still returns same result as payload' do
|
332
|
+
crate = ROCrate::Crate.new
|
333
|
+
crate.add_all(fixture_file('directory').path)
|
334
|
+
|
335
|
+
paths = crate.entries.keys
|
336
|
+
assert_equal 8, paths.length
|
337
|
+
assert_includes paths, 'data'
|
338
|
+
assert_includes paths, 'root.txt'
|
339
|
+
assert_includes paths, 'info.txt'
|
340
|
+
assert_includes paths, 'data/binary.jpg'
|
341
|
+
assert_includes paths, 'data/info.txt'
|
342
|
+
assert_includes paths, 'data/nested.txt'
|
343
|
+
assert_not_includes paths, '.dotfile'
|
344
|
+
assert_not_includes paths, '.dir'
|
345
|
+
assert_not_includes paths, '.dir/test.txt'
|
346
|
+
assert_includes paths, 'ro-crate-metadata.json'
|
347
|
+
assert_includes paths, 'ro-crate-preview.html'
|
348
|
+
|
349
|
+
assert_equal crate.payload.keys, crate.entries.keys
|
350
|
+
end
|
330
351
|
end
|