rubycheck 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/rubycheck.rb +16 -3
  3. data/lib/version.rb +1 -1
  4. metadata +3 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e2ff68efa224bc4b3f270fb58d0739eca7588205
4
- data.tar.gz: 4c9956f0ef7f999e34dd44415ae1892ff6cf8c02
3
+ metadata.gz: 6be78b6ef57cf6df5b0d9d426b15fcb3d2e435ee
4
+ data.tar.gz: 99230318ca6b801618ed5a868a0f6d0d8b0d578b
5
5
  SHA512:
6
- metadata.gz: 748f60eb895a21153bd0c46953f289653baf993091d4c95888c30241327cc25849a8481867e373b5b82a79fdc32b74b9e5d428cd834fcc50333d70c2d9b25b11
7
- data.tar.gz: cd599f5c9e03750916565a6aba213c841fd275da7d7da9e9c72cd4268c8fca65ad2329ef16c7c9123eeba6d3d677893bf6ffaf365d4f997f4039763a98a5a2af
6
+ metadata.gz: bf3f8827390575db2b7f5c3b458702ac46797be805c6e6cfee427cd9656cb95b41b88478a0edef3034ffa019c428903f89b7e3ac2459fa2b1480d883a205ff9f
7
+ data.tar.gz: be63c4059cb9214a655bc3697d345dc578e4fca301321cfd1e3725d9968e6b628d113760e4700d242a3b6509f2cf23f42ae3861db123842478e395a36208f54e
@@ -12,7 +12,20 @@ include Contracts
12
12
  # and encourages monkeypatching for defining generators for custom types.
13
13
  #
14
14
  module RubyCheck
15
- Contract nil => Num
15
+ Contract nil => Float
16
+ #
17
+ # Generate a random float in [0, 10^10 - 1].
18
+ #
19
+ # Example:
20
+ #
21
+ # RubyCheck::gen_float
22
+ # => 0.223
23
+ #
24
+ def self.gen_float
25
+ Random.rand(10e10)
26
+ end
27
+
28
+ Contract nil => Integer
16
29
  #
17
30
  # Generate a random integer in [0, 10^10 - 1].
18
31
  #
@@ -25,7 +38,7 @@ module RubyCheck
25
38
  Random.rand(10e10).to_i
26
39
  end
27
40
 
28
- Contract nil => Num
41
+ Contract nil => Integer
29
42
  #
30
43
  # Generate a random byte in [0, 255].
31
44
  #
@@ -38,7 +51,7 @@ module RubyCheck
38
51
  gen_int % 256
39
52
  end
40
53
 
41
- Contract nil => Num
54
+ Contract nil => Integer
42
55
  #
43
56
  # Generate a random ASCII character.
44
57
  #
@@ -6,5 +6,5 @@ module RubyCheck
6
6
  # <i>VERSION</i> is defined once, available to gemspec during packaging,
7
7
  # and available programmatically to Ruby code.
8
8
  #
9
- VERSION = '0.0.5'
9
+ VERSION = '0.0.6'
10
10
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubycheck
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Pennebaker
@@ -249,8 +249,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
249
249
  version: '0'
250
250
  requirements: []
251
251
  rubyforge_project:
252
- rubygems_version: 2.0.6
252
+ rubygems_version: 2.1.10
253
253
  signing_key:
254
254
  specification_version: 4
255
255
  summary: a Ruby port of the QuickCheck unit test framework
256
256
  test_files: []
257
+ has_rdoc: