slow_blink 0.0.5 → 0.0.6

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 (63) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +9 -0
  3. data/ext/slow_blink/ext_schema_parser/parser.c +4 -4
  4. data/ext/slow_blink/message/ext_compact_encoder/compact_encoder.c +5 -5
  5. data/ext/slow_blink/message/ext_compact_encoder/ext_compact_encoder.c +31 -18
  6. data/lib/slow_blink/annotatable.rb +20 -17
  7. data/lib/slow_blink/annotation.rb +20 -18
  8. data/lib/slow_blink/binary.rb +20 -17
  9. data/lib/slow_blink/boolean.rb +20 -17
  10. data/lib/slow_blink/date.rb +20 -17
  11. data/lib/slow_blink/decimal.rb +20 -17
  12. data/lib/slow_blink/definition.rb +21 -19
  13. data/lib/slow_blink/enumeration.rb +30 -26
  14. data/lib/slow_blink/field.rb +20 -17
  15. data/lib/slow_blink/fixed.rb +20 -17
  16. data/lib/slow_blink/floating_point.rb +20 -17
  17. data/lib/slow_blink/group.rb +21 -18
  18. data/lib/slow_blink/incremental_annotation.rb +21 -18
  19. data/lib/slow_blink/integer.rb +20 -17
  20. data/lib/slow_blink/log.rb +20 -17
  21. data/lib/slow_blink/message/binary.rb +23 -18
  22. data/lib/slow_blink/message/boolean.rb +22 -17
  23. data/lib/slow_blink/message/date.rb +23 -18
  24. data/lib/slow_blink/message/decimal.rb +38 -21
  25. data/lib/slow_blink/message/enumeration.rb +31 -21
  26. data/lib/slow_blink/message/field.rb +23 -18
  27. data/lib/slow_blink/message/fixed.rb +23 -19
  28. data/lib/slow_blink/message/floating_point.rb +22 -17
  29. data/lib/slow_blink/message/group.rb +90 -55
  30. data/lib/slow_blink/message/integer.rb +51 -24
  31. data/lib/slow_blink/message/model.rb +197 -131
  32. data/lib/slow_blink/message/sequence.rb +31 -25
  33. data/lib/slow_blink/message/string.rb +23 -18
  34. data/lib/slow_blink/message/time.rb +31 -25
  35. data/lib/slow_blink/message/time_of_day.rb +24 -18
  36. data/lib/slow_blink/name_with_id.rb +20 -17
  37. data/lib/slow_blink/namespace.rb +22 -19
  38. data/lib/slow_blink/object.rb +20 -17
  39. data/lib/slow_blink/parse_error.rb +26 -0
  40. data/lib/slow_blink/ref.rb +20 -17
  41. data/lib/slow_blink/schema.rb +26 -24
  42. data/lib/slow_blink/schema_buffer.rb +20 -17
  43. data/lib/slow_blink/sequence.rb +20 -17
  44. data/lib/slow_blink/string.rb +20 -17
  45. data/lib/slow_blink/sym.rb +20 -17
  46. data/lib/slow_blink/time.rb +20 -17
  47. data/lib/slow_blink/time_of_day.rb +20 -17
  48. data/lib/slow_blink/type.rb +20 -17
  49. data/lib/slow_blink/version.rb +21 -18
  50. data/lib/slow_blink.rb +19 -17
  51. data/test/tc_compact_encoder.rb +64 -30
  52. data/test/tc_group.rb +0 -19
  53. data/test/tc_incr_annote.rb +0 -21
  54. data/test/tc_model_decimal.rb +94 -0
  55. data/test/tc_model_dynamic_group.rb +0 -19
  56. data/test/tc_model_extension.rb +0 -19
  57. data/test/tc_model_sequence_of_string.rb +29 -0
  58. data/test/tc_model_static_group.rb +0 -19
  59. data/test/tc_model_think_blink.rb +0 -19
  60. data/test/tc_types.rb +0 -19
  61. metadata +8 -4
  62. data/lib/slow_blink/compact_encoder.rb +0 -72
  63. data/lib/slow_blink/error.rb +0 -23
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2b20c76ea29b079aed8bb47ede4c0515a6630c0a
4
- data.tar.gz: e5171c66c8049f7a8389eda54392d8c5de708e0b
3
+ metadata.gz: 20d7c9ee2ab3bde244ae63f132424510c5157a25
4
+ data.tar.gz: 3f69a1496d4696214ad7dfb780f94631ea76367b
5
5
  SHA512:
6
- metadata.gz: 45c24a4c329cd4250bd14caf3dbcdd105e965a3a1ed0a4582808498a757974e6ad56924ae7e02ded5142d8c546da058cf9415f3d5da88deaf9b39a484a4a1ae5
7
- data.tar.gz: 5036b7877cab2a8311b36fd7adda148da864a2dd9a8158c7b9cf5156c1d9a259c05a11edf886bbffcaa29bffbd1f571f7a143d88f37838d27726d9e8c9cecac3
6
+ metadata.gz: 7d2f085b62ac487a53aaa03c6b839728411db49d9f1a78d7ca593ee9c5e5e5d6469ed34a3066d75af7f972ae61715896185e9e84262a1070e01f89131467c91c
7
+ data.tar.gz: 3c17d9832aca43cbdc2d32975251b127c90a2c74dbb8b6c448ee901d26e34d7186360b523bd10585890c741a7781b53949ecb9fa302c2cfca98f538196fe8c01
data/.yardopts ADDED
@@ -0,0 +1,9 @@
1
+ --markup markdown
2
+ --tag license:"License"
3
+ --hide-tag license
4
+ --no-private
5
+ --title "SlowBlink: Blink Protocol for Ruby"
6
+ lib/slow_blink/schema.rb
7
+ lib/slow_blink/message/model.rb
8
+ lib/**/*.rb -
9
+ readme.md
@@ -120,7 +120,7 @@ static VALUE cFieldTypeRef;
120
120
 
121
121
  static VALUE cLog;
122
122
 
123
- static VALUE cError;
123
+ static VALUE cParseError;
124
124
 
125
125
  /* generated **********************************************************/
126
126
 
@@ -3773,7 +3773,7 @@ void Init_ext_schema_parser(void)
3773
3773
 
3774
3774
  cLog = rb_const_get(cSlowBlink, rb_intern("Log"));
3775
3775
 
3776
- cError = rb_const_get(cSlowBlink, rb_intern("Error"));
3776
+ cParseError = rb_const_get(cSlowBlink, rb_intern("ParseError"));
3777
3777
 
3778
3778
  rb_define_singleton_method(cNamespace, "parse", parseFileBuffer, -1);
3779
3779
  }
@@ -3800,7 +3800,7 @@ static VALUE parseFileBuffer(int argc, VALUE* argv, VALUE self)
3800
3800
  rb_scan_args(argc, argv, "10:", &buffer, &opts);
3801
3801
 
3802
3802
  if(buffer == Qnil){
3803
- rb_raise(cError, "error: input must be a string");
3803
+ rb_raise(rb_eTypeError, "error: input must be a string");
3804
3804
  }
3805
3805
 
3806
3806
  if(opts == Qnil){
@@ -3821,7 +3821,7 @@ static VALUE parseFileBuffer(int argc, VALUE* argv, VALUE self)
3821
3821
  case 0:
3822
3822
  break;
3823
3823
  case 1:
3824
- rb_raise(cError, "parse error");
3824
+ rb_raise(cParseError, "parse error");
3825
3825
  break;
3826
3826
  case 2:
3827
3827
  rb_bug("yyparse: bison parser reports memory exhaustion");
@@ -118,19 +118,19 @@ uint8_t BLINK_getSizeSigned(int64_t value)
118
118
  else if(value <= 0x7fffL){
119
119
  retval = 3U;
120
120
  }
121
- else if(value < 0x7fffffffL){
121
+ else if(value <= 0x7fffffL){
122
122
  retval = 4U;
123
123
  }
124
- else if(value < 0x7fffffffffL){
124
+ else if(value <= 0x7fffffffL){
125
125
  retval = 5U;
126
126
  }
127
- else if(value < 0x7fffffffffffL){
127
+ else if(value <= 0x7fffffffffL){
128
128
  retval = 6U;
129
129
  }
130
- else if(value < 0x7fffffffffffffL){
130
+ else if(value <= 0x7fffffffffffL){
131
131
  retval = 7U;
132
132
  }
133
- else if(value < 0x7fffffffffffffffL){
133
+ else if(value <= 0x7fffffffffffffL){
134
134
  retval = 8U;
135
135
  }
136
136
  else{
@@ -89,18 +89,31 @@ static VALUE getInt(VALUE input, int64_t min, int64_t max, bool isSigned);
89
89
 
90
90
  /* static variables ***************************************************/
91
91
 
92
- static VALUE cError;
92
+ static VALUE cStrongError1;
93
+
94
+ static VALUE cWeakError3;
95
+ static VALUE cWeakError4;
96
+ static VALUE cWeakError9;
97
+ static VALUE cWeakError11;
98
+
99
+
93
100
 
94
101
  /* functions **********************************************************/
95
102
 
96
103
  void Init_ext_compact_encoder(void)
97
104
  {
98
105
  VALUE cSlowBlink;
99
-
100
- rb_require("slow_blink/message/model.rb");
106
+ VALUE cMessage;
101
107
 
102
108
  cSlowBlink = rb_define_module("SlowBlink");
103
- cError = rb_const_get(rb_define_module_under(cSlowBlink, "Message"), rb_intern("Error"));
109
+ cMessage = rb_const_get(cSlowBlink, rb_intern("Message"));
110
+
111
+ cStrongError1 = rb_const_get(cMessage, rb_intern("StrongError1"));
112
+
113
+ cWeakError3 = rb_const_get(cMessage, rb_intern("WeakError3"));
114
+ cWeakError4 = rb_const_get(cMessage, rb_intern("WeakError4"));
115
+ cWeakError9 = rb_const_get(cMessage, rb_intern("WeakError9"));
116
+ cWeakError11 = rb_const_get(cMessage, rb_intern("WeakError11"));
104
117
 
105
118
  rb_define_method(rb_cString, "putNull", putNull, 0);
106
119
  rb_define_method(rb_cString, "putPresent", putPresent, 0);
@@ -298,7 +311,7 @@ static VALUE putInt(VALUE self, VALUE val, int64_t min, int64_t max, bool isSign
298
311
 
299
312
  if((value < min) || (value > max)){
300
313
 
301
- rb_raise(cError, "Input exceeds allowable range of type");
314
+ rb_raise(rb_eRangeError, "Input exceeds allowable range of type");
302
315
  }
303
316
 
304
317
  retval = rb_str_buf_cat(self, (const char *)out, BLINK_putVLC((uint64_t)value, true, out, sizeof(out)));
@@ -309,7 +322,7 @@ static VALUE putInt(VALUE self, VALUE val, int64_t min, int64_t max, bool isSign
309
322
 
310
323
  if(value > (uint64_t)max){
311
324
 
312
- rb_raise(cError, "Input exceeds allowable range of type");
325
+ rb_raise(rb_eRangeError, "Input exceeds allowable range of type");
313
326
  }
314
327
 
315
328
  retval = rb_str_buf_cat(self, (const char *)out, BLINK_putVLC(value, false, out, sizeof(out)));
@@ -378,7 +391,7 @@ static VALUE getF64(VALUE self)
378
391
  }
379
392
  else{
380
393
 
381
- rb_raise(cError, "S1: Group encoding ends prematurely");
394
+ rb_raise(cStrongError1, "S1: Group encoding ends prematurely");
382
395
  }
383
396
 
384
397
  return retval;
@@ -411,7 +424,7 @@ static VALUE getBool(VALUE self)
411
424
  }
412
425
  else{
413
426
 
414
- rb_raise(cError, "W11: Decoded value is not 0x00 or 0x01");
427
+ rb_raise(cWeakError11, "W11: Decoded value is not 0x00 or 0x01");
415
428
  }
416
429
 
417
430
  return retval;
@@ -425,7 +438,7 @@ static VALUE getBinary(VALUE self)
425
438
  if(size != Qnil){
426
439
 
427
440
  if(NUM2UINT(size) > RSTRING_LEN(self)){
428
- rb_raise(cError, "S1: Group encoding ends prematurely");
441
+ rb_raise(cStrongError1, "S1: Group encoding ends prematurely");
429
442
  }
430
443
 
431
444
  retval = rb_str_substr(self, 0, NUM2UINT(size));
@@ -453,7 +466,7 @@ static VALUE getFixed(VALUE self, VALUE size)
453
466
 
454
467
  if(NUM2UINT(size) > RSTRING_LEN(self)){
455
468
 
456
- rb_raise(cError, "S1: Group encoding ends prematurely");
469
+ rb_raise(cStrongError1, "S1: Group encoding ends prematurely");
457
470
  }
458
471
 
459
472
  retval = rb_str_substr(self, 0, NUM2UINT(size));
@@ -485,19 +498,19 @@ static VALUE getFixedOptional(VALUE self, VALUE size)
485
498
 
486
499
  if(RSTRING_LEN(retval) != NUM2UINT(size)){
487
500
 
488
- rb_raise(cError, "S1: Group encoding ends prematurely");
501
+ rb_raise(cStrongError1, "S1: Group encoding ends prematurely");
489
502
  }
490
503
 
491
504
  rb_str_drop_bytes(self, NUM2UINT(size));
492
505
  }
493
506
  else{
494
507
 
495
- rb_raise(cError, "W9: Presence flag is not 0xC0 or 0x01");
508
+ rb_raise(cWeakError9, "W9: Presence flag is not 0xC0 or 0x01");
496
509
  }
497
510
  }
498
511
  else{
499
512
 
500
- rb_raise(cError, "S1: Group encoding ends prematurely");
513
+ rb_raise(cStrongError1, "S1: Group encoding ends prematurely");
501
514
  }
502
515
 
503
516
  return retval;
@@ -522,12 +535,12 @@ static VALUE getInt(VALUE input, int64_t min, int64_t max, bool isSigned)
522
535
 
523
536
  if(((int64_t)out < min) || ((int64_t)out > max)){
524
537
 
525
- rb_raise(cError, "W3: Decoded value overflows range");
538
+ rb_raise(cWeakError3, "W3: Decoded value overflows range");
526
539
  }
527
540
 
528
541
  if(BLINK_getSizeSigned((int64_t)out) != ret){
529
542
 
530
- rb_raise(cError, "W4: VLC entity contains more bytes than needed to express full width of type");
543
+ rb_raise(cWeakError4, "W4: VLC entity contains more bytes than needed to express full width of type");
531
544
  }
532
545
 
533
546
  retval = LL2NUM((int64_t)out);
@@ -536,12 +549,12 @@ static VALUE getInt(VALUE input, int64_t min, int64_t max, bool isSigned)
536
549
 
537
550
  if(out > (uint64_t)max){
538
551
 
539
- rb_raise(cError, "W3: Decoded value overflows range");
552
+ rb_raise(cWeakError3, "W3: Decoded value overflows range");
540
553
  }
541
554
 
542
555
  if(BLINK_getSizeUnsigned(out) != ret){
543
556
 
544
- rb_raise(cError, "W4: VLC entity contains more bytes than needed to express full width of type");
557
+ rb_raise(cWeakError4, "W4: VLC entity contains more bytes than needed to express full width of type");
545
558
  }
546
559
 
547
560
  retval = ULL2NUM(out);
@@ -550,7 +563,7 @@ static VALUE getInt(VALUE input, int64_t min, int64_t max, bool isSigned)
550
563
  }
551
564
  else{
552
565
 
553
- rb_raise(cError, "S1: Group encoding ends prematurely");
566
+ rb_raise(cStrongError1, "S1: Group encoding ends prematurely");
554
567
  }
555
568
 
556
569
  return retval;
@@ -1,21 +1,24 @@
1
- # Copyright (c) 2016 Cameron Harper
1
+ # @license
2
+ #
3
+ # Copyright (c) 2016 Cameron Harper
4
+ #
5
+ # Permission is hereby granted, free of charge, to any person obtaining a copy of
6
+ # this software and associated documentation files (the "Software"), to deal in
7
+ # the Software without restriction, including without limitation the rights to
8
+ # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9
+ # the Software, and to permit persons to whom the Software is furnished to do so,
10
+ # subject to the following conditions:
11
+ #
12
+ # The above copyright notice and this permission notice shall be included in all
13
+ # copies or substantial portions of the Software.
2
14
  #
3
- # Permission is hereby granted, free of charge, to any person obtaining a copy of
4
- # this software and associated documentation files (the "Software"), to deal in
5
- # the Software without restriction, including without limitation the rights to
6
- # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
7
- # the Software, and to permit persons to whom the Software is furnished to do so,
8
- # subject to the following conditions:
9
- #
10
- # The above copyright notice and this permission notice shall be included in all
11
- # copies or substantial portions of the Software.
12
- #
13
- # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
15
- # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
16
- # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
17
- # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
18
- # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
15
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17
+ # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18
+ # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19
+ # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20
+ # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21
+
19
22
 
20
23
  module SlowBlink
21
24
 
@@ -1,22 +1,24 @@
1
-
2
- # Copyright (c) 2016 Cameron Harper
3
- #
4
- # Permission is hereby granted, free of charge, to any person obtaining a copy of
5
- # this software and associated documentation files (the "Software"), to deal in
6
- # the Software without restriction, including without limitation the rights to
7
- # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
8
- # the Software, and to permit persons to whom the Software is furnished to do so,
9
- # subject to the following conditions:
10
- #
11
- # The above copyright notice and this permission notice shall be included in all
12
- # copies or substantial portions of the Software.
1
+ # @license
2
+ #
3
+ # Copyright (c) 2016 Cameron Harper
4
+ #
5
+ # Permission is hereby granted, free of charge, to any person obtaining a copy of
6
+ # this software and associated documentation files (the "Software"), to deal in
7
+ # the Software without restriction, including without limitation the rights to
8
+ # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9
+ # the Software, and to permit persons to whom the Software is furnished to do so,
10
+ # subject to the following conditions:
11
+ #
12
+ # The above copyright notice and this permission notice shall be included in all
13
+ # copies or substantial portions of the Software.
13
14
  #
14
- # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
16
- # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
17
- # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
18
- # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19
- # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
15
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17
+ # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18
+ # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19
+ # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20
+ # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21
+
20
22
 
21
23
  module SlowBlink
22
24
 
@@ -1,21 +1,24 @@
1
- # Copyright (c) 2016 Cameron Harper
1
+ # @license
2
+ #
3
+ # Copyright (c) 2016 Cameron Harper
4
+ #
5
+ # Permission is hereby granted, free of charge, to any person obtaining a copy of
6
+ # this software and associated documentation files (the "Software"), to deal in
7
+ # the Software without restriction, including without limitation the rights to
8
+ # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9
+ # the Software, and to permit persons to whom the Software is furnished to do so,
10
+ # subject to the following conditions:
11
+ #
12
+ # The above copyright notice and this permission notice shall be included in all
13
+ # copies or substantial portions of the Software.
2
14
  #
3
- # Permission is hereby granted, free of charge, to any person obtaining a copy of
4
- # this software and associated documentation files (the "Software"), to deal in
5
- # the Software without restriction, including without limitation the rights to
6
- # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
7
- # the Software, and to permit persons to whom the Software is furnished to do so,
8
- # subject to the following conditions:
9
- #
10
- # The above copyright notice and this permission notice shall be included in all
11
- # copies or substantial portions of the Software.
12
- #
13
- # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
15
- # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
16
- # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
17
- # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
18
- # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
15
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17
+ # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18
+ # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19
+ # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20
+ # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21
+
19
22
 
20
23
  module SlowBlink
21
24
 
@@ -1,21 +1,24 @@
1
- # Copyright (c) 2016 Cameron Harper
1
+ # @license
2
+ #
3
+ # Copyright (c) 2016 Cameron Harper
4
+ #
5
+ # Permission is hereby granted, free of charge, to any person obtaining a copy of
6
+ # this software and associated documentation files (the "Software"), to deal in
7
+ # the Software without restriction, including without limitation the rights to
8
+ # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9
+ # the Software, and to permit persons to whom the Software is furnished to do so,
10
+ # subject to the following conditions:
11
+ #
12
+ # The above copyright notice and this permission notice shall be included in all
13
+ # copies or substantial portions of the Software.
2
14
  #
3
- # Permission is hereby granted, free of charge, to any person obtaining a copy of
4
- # this software and associated documentation files (the "Software"), to deal in
5
- # the Software without restriction, including without limitation the rights to
6
- # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
7
- # the Software, and to permit persons to whom the Software is furnished to do so,
8
- # subject to the following conditions:
9
- #
10
- # The above copyright notice and this permission notice shall be included in all
11
- # copies or substantial portions of the Software.
12
- #
13
- # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
15
- # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
16
- # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
17
- # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
18
- # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
15
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17
+ # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18
+ # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19
+ # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20
+ # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21
+
19
22
 
20
23
  module SlowBlink
21
24
 
@@ -1,21 +1,24 @@
1
- # Copyright (c) 2016 Cameron Harper
1
+ # @license
2
+ #
3
+ # Copyright (c) 2016 Cameron Harper
4
+ #
5
+ # Permission is hereby granted, free of charge, to any person obtaining a copy of
6
+ # this software and associated documentation files (the "Software"), to deal in
7
+ # the Software without restriction, including without limitation the rights to
8
+ # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9
+ # the Software, and to permit persons to whom the Software is furnished to do so,
10
+ # subject to the following conditions:
11
+ #
12
+ # The above copyright notice and this permission notice shall be included in all
13
+ # copies or substantial portions of the Software.
2
14
  #
3
- # Permission is hereby granted, free of charge, to any person obtaining a copy of
4
- # this software and associated documentation files (the "Software"), to deal in
5
- # the Software without restriction, including without limitation the rights to
6
- # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
7
- # the Software, and to permit persons to whom the Software is furnished to do so,
8
- # subject to the following conditions:
9
- #
10
- # The above copyright notice and this permission notice shall be included in all
11
- # copies or substantial portions of the Software.
12
- #
13
- # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
15
- # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
16
- # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
17
- # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
18
- # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
15
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17
+ # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18
+ # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19
+ # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20
+ # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21
+
19
22
 
20
23
  module SlowBlink
21
24
 
@@ -1,21 +1,24 @@
1
- # Copyright (c) 2016 Cameron Harper
1
+ # @license
2
+ #
3
+ # Copyright (c) 2016 Cameron Harper
4
+ #
5
+ # Permission is hereby granted, free of charge, to any person obtaining a copy of
6
+ # this software and associated documentation files (the "Software"), to deal in
7
+ # the Software without restriction, including without limitation the rights to
8
+ # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9
+ # the Software, and to permit persons to whom the Software is furnished to do so,
10
+ # subject to the following conditions:
11
+ #
12
+ # The above copyright notice and this permission notice shall be included in all
13
+ # copies or substantial portions of the Software.
2
14
  #
3
- # Permission is hereby granted, free of charge, to any person obtaining a copy of
4
- # this software and associated documentation files (the "Software"), to deal in
5
- # the Software without restriction, including without limitation the rights to
6
- # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
7
- # the Software, and to permit persons to whom the Software is furnished to do so,
8
- # subject to the following conditions:
9
- #
10
- # The above copyright notice and this permission notice shall be included in all
11
- # copies or substantial portions of the Software.
12
- #
13
- # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
15
- # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
16
- # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
17
- # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
18
- # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
15
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17
+ # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18
+ # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19
+ # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20
+ # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21
+
19
22
 
20
23
  module SlowBlink
21
24
 
@@ -1,22 +1,24 @@
1
-
2
- # Copyright (c) 2016 Cameron Harper
3
- #
4
- # Permission is hereby granted, free of charge, to any person obtaining a copy of
5
- # this software and associated documentation files (the "Software"), to deal in
6
- # the Software without restriction, including without limitation the rights to
7
- # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
8
- # the Software, and to permit persons to whom the Software is furnished to do so,
9
- # subject to the following conditions:
10
- #
11
- # The above copyright notice and this permission notice shall be included in all
12
- # copies or substantial portions of the Software.
1
+ # @license
2
+ #
3
+ # Copyright (c) 2016 Cameron Harper
4
+ #
5
+ # Permission is hereby granted, free of charge, to any person obtaining a copy of
6
+ # this software and associated documentation files (the "Software"), to deal in
7
+ # the Software without restriction, including without limitation the rights to
8
+ # use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9
+ # the Software, and to permit persons to whom the Software is furnished to do so,
10
+ # subject to the following conditions:
11
+ #
12
+ # The above copyright notice and this permission notice shall be included in all
13
+ # copies or substantial portions of the Software.
13
14
  #
14
- # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
16
- # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
17
- # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
18
- # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19
- # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
15
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17
+ # FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18
+ # COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19
+ # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20
+ # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21
+
20
22
 
21
23
  module SlowBlink
22
24
 
@@ -74,7 +76,7 @@ module SlowBlink
74
76
  return schema
75
77
  end
76
78
  rescue StopIteration
77
- raise Error.new "#{self.location}: error: invalid cycle detected"
79
+ raise ParseError.new "#{self.location}: error: invalid cycle detected"
78
80
  end
79
81
  end
80
82
  end