ruby-fizzbuzz 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,15 @@
1
+ ---
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ MTllN2IxMDdjZWQ3MmYzZDk3ZTc1YjVkMDUzMGYxMzU2NzlhZDQ2Nw==
5
+ data.tar.gz: !binary |-
6
+ ZDRhYTA3ZTdkNDg2ZWM4ODIxN2Y0OWE0M2ZkZGE2YmE4MjlmYzg3Mw==
7
+ SHA512:
8
+ metadata.gz: !binary |-
9
+ YmUwMDE4ZWI4OWE3ZDE4NjQ4NTUyYWVjOGUzYzZiYjlhNjcxNDIxMmY5OWMx
10
+ ZTZiNzkxOTVlM2ZkNzljMDFlMTNiYzIyNjRmZjQ5YmM0NjU4MmVmZDJkZjk0
11
+ YzkzZDU4ODI2MGU4MjZkZjBiMWQxYTk0NDBiYWY1OTJhZmVlMzg=
12
+ data.tar.gz: !binary |-
13
+ MGI4ZDM2YjlkMTZkYjFiZGU3ZTc1MzQ3M2JiZTVmMDE4YzNhZWIxNzM0NmJj
14
+ NTYwODc1MTQ3ZTExMDc2MDhkNmNkNzMyZjYyMmExZjc4ZWQ5OWU0MmJhY2Vm
15
+ Njc0OGQ2M2ViYjIwYjAxNWZlYzI3NGNiNmZjNDBkOTNjNTEzZDc=
data/CHANGES CHANGED
@@ -1,3 +1,12 @@
1
+ fizzbuzz (0.0.4)
2
+
3
+ * Retired support for Ruby 1.8.x (no support for MRI, Ruby Enterprise Edition and Rubinius);
4
+ * Added Coveralls and Code Climate integration (and hence improved code test coverage);
5
+ * Improved error handling and made code more resilient to errors;
6
+ * Fixed formatting and white spaces.
7
+
8
+ -- Krzysztof Wilczynski <krzysztof.wilczynski@linux.com> Mon, 18 Nov 2013 11:22:26 +0000
9
+
1
10
  fizzbuzz (0.0.3)
2
11
 
3
12
  * Added custom exceptions and improved error handling;
data/CHANGES.rdoc CHANGED
@@ -1,3 +1,12 @@
1
+ fizzbuzz (0.0.4)
2
+
3
+ * Retired support for Ruby 1.8.x (no support for MRI, Ruby Enterprise Edition and Rubinius);
4
+ * Added Coveralls and Code Climate integration (and hence improved code test coverage);
5
+ * Improved error handling and made code more resilient to errors;
6
+ * Fixed formatting and white spaces.
7
+
8
+ -- Krzysztof Wilczynski <krzysztof.wilczynski@linux.com> Mon, 18 Nov 2013 11:22:26 +0000
9
+
1
10
  fizzbuzz (0.0.3)
2
11
 
3
12
  * Added custom exceptions and improved error handling;
data/README.rdoc CHANGED
@@ -6,3 +6,5 @@ for arbitrary large numeric values via the Bignum class.
6
6
 
7
7
  {<img src="https://travis-ci.org/kwilczynski/ruby-fizzbuzz.png?branch=master" alt="Build Status"/>}[https://travis-ci.org/kwilczynski/ruby-fizzbuzz]
8
8
  {<img src="https://badge.fury.io/rb/ruby-fizzbuzz.png" alt="Gem Version" />}[http://badge.fury.io/rb/ruby-fizzbuzz]
9
+ {<img src="https://coveralls.io/repos/kwilczynski/ruby-fizzbuzz/badge.png?branch=master" alt="Coverage Status" />}[https://coveralls.io/r/kwilczynski/ruby-fizzbuzz?branch=master]
10
+ {<img src="https://codeclimate.com/github/kwilczynski/ruby-fizzbuzz.png" />}[https://codeclimate.com/github/kwilczynski/ruby-fizzbuzz]
data/TODO CHANGED
@@ -4,14 +4,14 @@ fizzbuzz (1.0.0)
4
4
 
5
5
  -- Krzysztof Wilczynski <krzysztof.wilczynski@linux.com> Mon, 01 Oct 2012 17:57:18 +0100
6
6
 
7
- fizzbuzz (0.0.5)
7
+ fizzbuzz (0.0.6)
8
8
 
9
9
  * Improve github project page;
10
10
  * Re-factor unit tests to make them more idiomatic (maybe move to Rspec and BDD?).
11
11
 
12
- -- Krzysztof Wilczynski <krzysztof.wilczynski@linux.com> Sun, 31 Aug 2013 17:50:06 +0000
12
+ -- Krzysztof Wilczynski <krzysztof.wilczynski@linux.com> Mon, 18 Nov 2013 11:22:26 +0000
13
13
 
14
- fizzbuzz (0.0.4)
14
+ fizzbuzz (0.0.5)
15
15
 
16
16
  * Move to YARD from RDoc (as RDoc is very bad, really);
17
17
  * Add pure-Ruby implementation;
@@ -20,4 +20,4 @@ fizzbuzz (0.0.4)
20
20
  * Add Doxygen style comments for other functions in the source code;
21
21
  * Improve documentation i.e. source code commenting, README file, etc.
22
22
 
23
- -- Krzysztof Wilczynski <krzysztof.wilczynski@linux.com> Sun, 31 Aug 2013 17:50:06 +0000
23
+ -- Krzysztof Wilczynski <krzysztof.wilczynski@linux.com> Mon, 18 Nov 2013 11:22:26 +0000
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.3
1
+ 0.0.4
@@ -21,13 +21,14 @@
21
21
  #if !defined(_COMMON_H)
22
22
  #define _COMMON_H 1
23
23
 
24
- #include <stdint.h>
25
- #include <ruby.h>
26
-
27
24
  #if defined(__cplusplus)
28
25
  extern "C" {
29
26
  #endif
30
27
 
28
+ #include <stdint.h>
29
+ #include <assert.h>
30
+ #include <ruby.h>
31
+
31
32
  #if !(defined(INT8_MIN) || defined(INT8_MAX))
32
33
  typedef signed char int8_t;
33
34
  #endif
@@ -459,7 +459,7 @@ fizzbuzz_values(VALUE object, return_type_t type, direction_t direction)
459
459
  return WANT_ARRAY(type) ? array : object;
460
460
  }
461
461
 
462
- VALUE
462
+ static VALUE
463
463
  fizzbuzz_exception_wrapper(VALUE value)
464
464
  {
465
465
  exception_t *e = (struct exception *)value;
@@ -467,17 +467,18 @@ fizzbuzz_exception_wrapper(VALUE value)
467
467
  return rb_exc_new2(e->klass, e->message);
468
468
  }
469
469
 
470
- VALUE
470
+ static VALUE
471
471
  fizzbuzz_exception(void *data)
472
472
  {
473
473
  int exception = 0;
474
474
  VALUE object = Qnil;
475
475
 
476
476
  exception_t *e = data;
477
+ assert(e != NULL && "Must be a valid pointer to `exception_t' type");
477
478
 
478
479
  object = rb_protect(fizzbuzz_exception_wrapper, (VALUE)e, &exception);
479
480
 
480
- if (exception != 0) {
481
+ if (exception) {
481
482
  rb_jump_tag(exception);
482
483
  }
483
484
 
@@ -487,7 +488,7 @@ fizzbuzz_exception(void *data)
487
488
  return object;
488
489
  }
489
490
 
490
- VALUE
491
+ static VALUE
491
492
  fizzbuzz_type_error(VALUE klass, const char *message)
492
493
  {
493
494
  exception_t e;
@@ -500,7 +501,7 @@ fizzbuzz_type_error(VALUE klass, const char *message)
500
501
  return fizzbuzz_exception(&e);
501
502
  }
502
503
 
503
- VALUE
504
+ static VALUE
504
505
  fizzbuzz_range_error(VALUE klass, VALUE start, VALUE stop, const char *message)
505
506
  {
506
507
  exception_t e;
@@ -21,12 +21,12 @@
21
21
  #if !defined(_FIZZBUZZ_H)
22
22
  #define _FIZZBUZZ_H 1
23
23
 
24
- #include "common.h"
25
-
26
24
  #if defined(__cplusplus)
27
25
  extern "C" {
28
26
  #endif
29
27
 
28
+ #include "common.h"
29
+
30
30
  #define ZERO INT2FIX(0)
31
31
  #define ONE INT2FIX(1)
32
32
  #define THREE INT2FIX(3)
@@ -26,7 +26,7 @@ class FizzBuzz
26
26
  #
27
27
  # Current version of _FizzBuzz_.
28
28
  #
29
- VERSION = '0.0.3'
29
+ VERSION = '0.0.4'
30
30
  end
31
31
 
32
32
  # :enddoc:
metadata CHANGED
@@ -1,20 +1,18 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-fizzbuzz
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
5
- prerelease:
4
+ version: 0.0.4
6
5
  platform: ruby
7
6
  authors:
8
7
  - Krzysztof Wilczynski
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-08-31 00:00:00.000000000 Z
11
+ date: 2013-11-18 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: rake
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
17
  - - ! '>='
20
18
  - !ruby/object:Gem::Version
@@ -22,7 +20,6 @@ dependencies:
22
20
  type: :development
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
24
  - - ! '>='
28
25
  - !ruby/object:Gem::Version
@@ -30,7 +27,6 @@ dependencies:
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: rdoc
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
31
  - - ! '>='
36
32
  - !ruby/object:Gem::Version
@@ -38,7 +34,6 @@ dependencies:
38
34
  type: :development
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
38
  - - ! '>='
44
39
  - !ruby/object:Gem::Version
@@ -46,7 +41,6 @@ dependencies:
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: test-unit
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
45
  - - ! '>='
52
46
  - !ruby/object:Gem::Version
@@ -54,7 +48,6 @@ dependencies:
54
48
  type: :development
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
52
  - - ! '>='
60
53
  - !ruby/object:Gem::Version
@@ -62,7 +55,6 @@ dependencies:
62
55
  - !ruby/object:Gem::Dependency
63
56
  name: rake-compiler
64
57
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
58
  requirements:
67
59
  - - ! '>='
68
60
  - !ruby/object:Gem::Version
@@ -70,12 +62,11 @@ dependencies:
70
62
  type: :development
71
63
  prerelease: false
72
64
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
65
  requirements:
75
66
  - - ! '>='
76
67
  - !ruby/object:Gem::Version
77
68
  version: 0.7.1
78
- description: ! 'Yet another FizzBuzz in Ruby
69
+ description: ! 'Yet another FizzBuzz in Ruby.
79
70
 
80
71
 
81
72
  Provides simple and fast solution to a popular FizzBuzz problem for Ruby.
@@ -115,27 +106,26 @@ files:
115
106
  homepage: http://about.me/kwilczynski
116
107
  licenses:
117
108
  - Apache License, Version 2.0
109
+ metadata: {}
118
110
  post_install_message:
119
111
  rdoc_options: []
120
112
  require_paths:
121
113
  - lib
122
114
  - lib
123
115
  required_ruby_version: !ruby/object:Gem::Requirement
124
- none: false
125
116
  requirements:
126
117
  - - ! '>='
127
118
  - !ruby/object:Gem::Version
128
119
  version: '0'
129
120
  required_rubygems_version: !ruby/object:Gem::Requirement
130
- none: false
131
121
  requirements:
132
122
  - - ! '>='
133
123
  - !ruby/object:Gem::Version
134
124
  version: '0'
135
125
  requirements: []
136
126
  rubyforge_project: ruby-fizzbuzz
137
- rubygems_version: 1.8.23
127
+ rubygems_version: 2.1.11
138
128
  signing_key:
139
- specification_version: 3
129
+ specification_version: 4
140
130
  summary: Yet another FizzBuzz in Ruby
141
131
  test_files: []
data.tar.gz.sig DELETED
Binary file
metadata.gz.sig DELETED
Binary file