specstar-support-random 0.0.9 → 0.1.0

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.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 4fcb6fc7fd605ecdc054f02b725821dbe4987e05
4
+ data.tar.gz: 71f4688b40678ded92c889e88a50802e9d822e94
5
+ SHA512:
6
+ metadata.gz: 58f569f508e9e4b19c88f05f6c43a1ed39cc58d98c53fabd048619d4796db24f17f35b8aad08ff7140c774cb3a3e8f4fca2b5ee24784219a9ce1bd41a941e66a
7
+ data.tar.gz: 1ea7d5ba81fc5c645a2e8e123121f2564e3ee1a34c36e9e9d471a49233ad916ddc9530997cd09bcd00e6258435fb33e88a5600cdd285af0795de599bc6f73033
@@ -24,6 +24,15 @@ def random_hash(options={})
24
24
  hash
25
25
  end
26
26
 
27
+ def random_number(options={})
28
+ output = nil
29
+ while output.nil? || output == options[:except]
30
+ output = rand(options[:max] || 1e9)
31
+ end
32
+
33
+ output
34
+ end
35
+
27
36
  def random_query
28
37
  params = {}
29
38
 
metadata CHANGED
@@ -1,15 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: specstar-support-random
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.9
5
- prerelease:
4
+ version: 0.1.0
6
5
  platform: ruby
7
6
  authors:
8
7
  - Sujoy Gupta
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-04-24 00:00:00.000000000 Z
11
+ date: 2013-10-01 00:00:00.000000000 Z
13
12
  dependencies: []
14
13
  description:
15
14
  email: sujoyg@gmail.com
@@ -20,26 +19,25 @@ files:
20
19
  - lib/specstar/support/random.rb
21
20
  homepage: http://github.com/sujoyg/specstar-support-random
22
21
  licenses: []
22
+ metadata: {}
23
23
  post_install_message:
24
24
  rdoc_options: []
25
25
  require_paths:
26
26
  - lib
27
27
  required_ruby_version: !ruby/object:Gem::Requirement
28
- none: false
29
28
  requirements:
30
- - - ! '>='
29
+ - - '>='
31
30
  - !ruby/object:Gem::Version
32
31
  version: '0'
33
32
  required_rubygems_version: !ruby/object:Gem::Requirement
34
- none: false
35
33
  requirements:
36
- - - ! '>='
34
+ - - '>='
37
35
  - !ruby/object:Gem::Version
38
36
  version: '0'
39
37
  requirements: []
40
38
  rubyforge_project:
41
- rubygems_version: 1.8.24
39
+ rubygems_version: 2.1.4
42
40
  signing_key:
43
- specification_version: 3
41
+ specification_version: 4
44
42
  summary: RSpec helpers for generating random entities.
45
43
  test_files: []