forgery 0.4.1 → 0.4.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/forgery/forgery/basic.rb +2 -2
- data/lib/forgery/forgery/lorem_ipsum.rb +1 -1
- data/lib/forgery/version.rb +1 -1
- metadata +4 -4
@@ -82,7 +82,7 @@ class Forgery::Basic < Forgery
|
|
82
82
|
options = {:at_least => 1,
|
83
83
|
:at_most => 10}.merge(options)
|
84
84
|
|
85
|
-
Forgery::Extend(
|
85
|
+
Forgery::Extend(options[:at_least]..options[:at_most]).random
|
86
86
|
end
|
87
87
|
|
88
88
|
def self.text(options={})
|
@@ -100,7 +100,7 @@ class Forgery::Basic < Forgery
|
|
100
100
|
allowed_characters += NUMERIC if options[:allow_numeric]
|
101
101
|
allowed_characters += SPECIAL_CHARACTERS if options[:allow_special]
|
102
102
|
|
103
|
-
length = options[:exactly] || Forgery::Extend(
|
103
|
+
length = options[:exactly] || Forgery::Extend(options[:at_least]..options[:at_most]).random
|
104
104
|
|
105
105
|
Forgery::Extend(allowed_characters).random_subset(length).join
|
106
106
|
end
|
data/lib/forgery/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: forgery
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 11
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 4
|
9
|
-
-
|
10
|
-
version: 0.4.
|
9
|
+
- 2
|
10
|
+
version: 0.4.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Nathan Sutton
|
@@ -16,7 +16,7 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date: 2011-09-
|
19
|
+
date: 2011-09-05 00:00:00 Z
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
22
22
|
name: nokogiri
|