random_fu 0.0.8 → 0.0.9
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.
- data/README.md +1 -1
- data/lib/random_fu/time.rb +2 -2
- data/lib/random_fu/version.rb +1 -1
- data/random_fu.gemspec +1 -1
- data/spec/version_spec.rb +1 -1
- metadata +3 -3
data/README.md
CHANGED
|
@@ -2,7 +2,7 @@ Random_fu
|
|
|
2
2
|
=========
|
|
3
3
|
|
|
4
4
|
A Ruby gem to add random capability. Currently, only for Strings, Hashes and Time. Tested with
|
|
5
|
-
ruby 1.9.2 and RSpec 2.10. Note, classes are monkey patched by adding "random" and "
|
|
5
|
+
ruby 1.9.2 and RSpec 2.10. Note, classes are monkey patched by adding "random" and "random_%whatever%"
|
|
6
6
|
instance methods to Ruby classes.
|
|
7
7
|
|
|
8
8
|
DO NOT USE for generating any data related to security!!!
|
data/lib/random_fu/time.rb
CHANGED
|
@@ -21,8 +21,8 @@ module RandomFu
|
|
|
21
21
|
# e.g. .30 seconds and .40 seconds, requires a random number
|
|
22
22
|
# between 0 and 10, thus rand(11), or rand(40-30+1)
|
|
23
23
|
|
|
24
|
-
time = self.
|
|
25
|
-
time
|
|
24
|
+
time = Time._load(self._dump)
|
|
25
|
+
time += ((self < other_time) ? rnd : -rnd)
|
|
26
26
|
end
|
|
27
27
|
|
|
28
28
|
end
|
data/lib/random_fu/version.rb
CHANGED
data/random_fu.gemspec
CHANGED
|
@@ -6,7 +6,7 @@ Gem::Specification.new do |s|
|
|
|
6
6
|
s.summary = "Random helpers"
|
|
7
7
|
s.version = RandomFu::VERSION
|
|
8
8
|
s.author = "Brian Ledsworth of Ledsworth Consluting LLC"
|
|
9
|
-
s.description = "
|
|
9
|
+
s.description = "Incorprates random instance methods into Ruby classes, for misc random helpers"
|
|
10
10
|
s.email = ["brian@ledsworth.com"]
|
|
11
11
|
s.homepage = "https://github.com/AgileMantis/random_fu"
|
|
12
12
|
s.required_ruby_version = '>= 1.9.2'
|
data/spec/version_spec.rb
CHANGED
metadata
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: random_fu
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
4
|
prerelease:
|
|
5
|
-
version: 0.0.
|
|
5
|
+
version: 0.0.9
|
|
6
6
|
platform: ruby
|
|
7
7
|
authors:
|
|
8
8
|
- Brian Ledsworth of Ledsworth Consluting LLC
|
|
@@ -10,10 +10,10 @@ autorequire:
|
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
12
|
|
|
13
|
-
date: 2012-06-
|
|
13
|
+
date: 2012-06-28 00:00:00 Z
|
|
14
14
|
dependencies: []
|
|
15
15
|
|
|
16
|
-
description:
|
|
16
|
+
description: Incorprates random instance methods into Ruby classes, for misc random helpers
|
|
17
17
|
email:
|
|
18
18
|
- brian@ledsworth.com
|
|
19
19
|
executables: []
|