hdf5 0.3.0 → 0.3.1

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.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/VERSION +1 -1
  3. data/hdf5.gemspec +2 -2
  4. data/lib/hdf5.rb +4 -1
  5. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0ff1af6e7836f2531fbadc9744c5d35825c7b9ae
4
- data.tar.gz: df8346f1e5fce5df73518e961e7a5aa45ef41327
3
+ metadata.gz: a5a7d2fd35b006365a1df3597b2b870c203ec073
4
+ data.tar.gz: bfe6c9b521409d4454ffe8151d86538363f515d8
5
5
  SHA512:
6
- metadata.gz: f388ab35ef657c5912817f79f3731b47db30ff7b2042562c5369a767653c4b756bad53aa738270e8ae152093026233e876dac11d9709c1ad6a406de53be8cc4c
7
- data.tar.gz: 0fec9ef227844f49831910167ae9c2773468d71ea9c273717f3a05a45183c023d56ecbd091afd873dcfe05eda4fb4633b8371ae88b13cbb4d5e631e6ce767955
6
+ metadata.gz: fa96ae2f04220d8bc0a11fff276c214f837308346a0be02fdcf74fe7a51ba0947bcf4f1384eda335c914fd3bb9c1da3c91a126cdf11ab28ffaae940e8f9063e7
7
+ data.tar.gz: ebee6c87c993a06b3fd99c17dd03d33d7c0d9cc269c5c5c97e6faed930fe886ea5519bc4dc0b17181546ca836f0278f09320b1b0cd8816cd8bcf2b5b6058592d
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.0
1
+ 0.3.1
@@ -2,12 +2,12 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: hdf5 0.3.0 ruby lib
5
+ # stub: hdf5 0.3.1 ruby lib
6
6
  # stub: ext/hdf5/extconf.rb
7
7
 
8
8
  Gem::Specification.new do |s|
9
9
  s.name = "hdf5"
10
- s.version = "0.3.0"
10
+ s.version = "0.3.1"
11
11
 
12
12
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
13
13
  s.require_paths = ["lib"]
@@ -142,6 +142,7 @@ module Hdf5
142
142
  # the data elements and the size and shape of the
143
143
  # data array.
144
144
  class H5Dataset
145
+ class NotFound < StandardError; end
145
146
  extend FFI::Library
146
147
  ffi_lib H5Library.library_path
147
148
  attach_function :basic_open, :H5Dopen2, [H5Types.hid_t, :string, H5Types.hid_t], H5Types.hid_t
@@ -152,7 +153,9 @@ module Hdf5
152
153
  # Open the dataset. location_id is the id of the parent
153
154
  # file or group. Returns and H5Dataset object
154
155
  def self.open(location_id, name)
155
- return new(basic_open(location_id, name, 0))
156
+ id = basic_open(location_id, name, 0)
157
+ raise NotFound.new("dataset #{name} not found") if id < 0
158
+ return new(id)
156
159
  end
157
160
  # Create a new object. id is the id of the HDF5 dataset this wraps.
158
161
  # Use H5Dataset.open to open a dataset
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hdf5
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Edmund Highcock