tracklib 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 363f80a5f46841dab18f8f8361b40db2ecaf2b8a
4
- data.tar.gz: bc6a746c855d03751d43b96cffa88a92135c229f
3
+ metadata.gz: 68676def9094079585d07e179b44341858d12436
4
+ data.tar.gz: 877b9c338a1a866823d6349af0a76e08c7a93fde
5
5
  SHA512:
6
- metadata.gz: 1e586a0620a0c03c5374b1bbc9d59de94148299feaedd496ff44eefe65b0b24ac6efaac937bed3fa95e279e139934f4bb6de8ab7aa0e639fd84027e40c4d20e3
7
- data.tar.gz: 8045432a6dfc833f827eb6f46b3d0cbc4c1bfabf1acd0277e2518de73dc0d1793e1f20c487bcf9557495a6bd8e70d71a3da60e676c7499b6e0eae9611db15cbb
6
+ metadata.gz: f42ff219e7fe4684925c87564e1537d75b079a651a5efb4c3bc1db4f7194853abcd58e4177d16324799eff1470451cc3b5b9082712199bd7ad6a22da05d8ddf5
7
+ data.tar.gz: 0a2e7d5eb20ab58ffdb7939bf711186100b492d478142e496d98ade5408f7b5344adad55c34862ef89119a529eb0cd4c717f9c4a8e842213d7baa623d054cc81
@@ -1,3 +1,3 @@
1
1
  module Tracklib
2
- VERSION = "0.1.4"
2
+ VERSION = "0.1.5"
3
3
  end
data/lib/tracklib.rb CHANGED
@@ -2,7 +2,7 @@ require "tracklib/version"
2
2
  require "rutie"
3
3
 
4
4
  module Tracklib
5
- class Error < StandardError; end
5
+ class UnknownFieldError < StandardError; end
6
6
  Rutie.new(:tracklib, {lib_path: "../lib", lib_prefix: ""}).init 'Init_Tracklib', __dir__
7
7
  end
8
8
 
data/src/lib.rs CHANGED
@@ -4,7 +4,7 @@ use std::io::{BufWriter};
4
4
  use lazy_static::lazy_static;
5
5
  use rutie::{
6
6
  class, methods, wrappable_struct, AnyObject, Array, Boolean, Class, Encoding, Float, Hash, Integer,
7
- Object, RString, VM,
7
+ Module, Object, RString, VM,
8
8
  };
9
9
  use rutie_serde::{ruby_class, rutie_serde_methods};
10
10
  use tracklib::{parse_rwtf, DataField, RWTFile, RWTFMetadata, TrackType};
@@ -253,10 +253,8 @@ methods!(
253
253
  }
254
254
  }
255
255
  } else {
256
- VM::raise(
257
- Class::from_existing("Exception"),
258
- &format!("unknown track_points field: {}", k),
259
- );
256
+ VM::raise(Module::from_existing("Tracklib").get_nested_class("UnknownFieldError"),
257
+ &format!("unknown track_points field: {}", k));
260
258
  unreachable!();
261
259
  };
262
260
 
@@ -292,10 +290,8 @@ methods!(
292
290
  }
293
291
  }
294
292
  } else {
295
- VM::raise(
296
- Class::from_existing("Exception"),
297
- &format!("unknown course_points field: {}", k),
298
- );
293
+ VM::raise(Module::from_existing("Tracklib").get_nested_class("UnknownFieldError"),
294
+ &format!("unknown course_points field: {}", k));
299
295
  unreachable!();
300
296
  };
301
297
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tracklib
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dan Larkin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-08-01 00:00:00.000000000 Z
11
+ date: 2019-08-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: minitest