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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d9f081110d1e5b5e94674cb53d07262fbce50ec3f63437d5c4c1ecda8b04f835
4
- data.tar.gz: 0cd710a9cd86063e706fd9cf338e5fdf55f5bc6993f306af4f50d6f9191a0d87
3
+ metadata.gz: 364757350da7d275b02def348bfd97782ad0ae31728c44f0691bc084e4d94ac9
4
+ data.tar.gz: 6b56ae58b682a4618dcb92ca78cbae720426316bc8ec50b9377fb9fda8ec9137
5
5
  SHA512:
6
- metadata.gz: 8ce573fbd259108edbb528e24f0d9647cfee4454378d57a4b3392aaeb0dea80385b2828221a0979caa4733be0e2108a4a535725846f576c9ac97866f46911e47
7
- data.tar.gz: ffc7aafbdccb3f4897ad2acae726714d7a313f02fd87e5c96173da2b12860dfa1318b9b323dde751e3ac10c9a66cf29effea383037bc4622eaf5113dd01bd426
6
+ metadata.gz: a2b14f9c64528476a18f84d0292311484e975a3dc6085c00c94f5dac8d84fa144e91bb6138c876db4a4079aeec4222eb6a1f91458e2ef0260defa9d3a0a42d57
7
+ data.tar.gz: b56d257868b7cb94f341e844223d14988c280fff34bb54dd1a676d47681d96afc8193ebb60a22eecfef7e96dc0d2ce03ed1571190a1717fbe56d1b80ed579053
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ro-crate (0.4.12)
4
+ ro-crate (0.4.13)
5
5
  addressable (>= 2.7, < 2.9)
6
6
  rubyzip (~> 2.0.0)
7
7
 
@@ -259,6 +259,7 @@ module ROCrate
259
259
 
260
260
  entries
261
261
  end
262
+ alias_method :entries, :payload
262
263
 
263
264
  def get_binding
264
265
  binding
data/ro_crate.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'ro-crate'
3
- s.version = '0.4.12'
3
+ s.version = '0.4.13'
4
4
  s.summary = 'Create, manipulate, read RO-Crates.'
5
5
  s.authors = ['Finn Bacall']
6
6
  s.email = 'finn.bacall@manchester.ac.uk'
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ro-crate
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.12
4
+ version: 0.4.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Finn Bacall