fabrication 2.19.0 → 2.20.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 +4 -4
- data/lib/fabrication/schematic/attribute.rb +6 -1
- data/lib/fabrication/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1f1e087b9bc06cf6edd4173c888e238883b3d1d1
|
4
|
+
data.tar.gz: 8c9b35320041a28a50f9ddee0a66d948f4786675
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bc7c52109293ecf03a510ef7b9428d3a70bb01ef42ef9c7355a89014716c15bc5ca1d6a54a996c8ccec94b96e0e404aedae8eff4b82e87e6d854de3e28fc4a51
|
7
|
+
data.tar.gz: c93800178ad1c91901ff6ab22167a73a7b2d12285e7219e57e997035f8c33fdf938a8b0cb49e453065f0be6d02607a016ae8b6f147af3e081e0dc4c89f89c9c0
|
@@ -50,7 +50,12 @@ class Fabrication::Schematic::Attribute
|
|
50
50
|
end
|
51
51
|
|
52
52
|
def rand
|
53
|
-
|
53
|
+
return unless params[:rand]
|
54
|
+
|
55
|
+
range = params[:rand]
|
56
|
+
range = 1..range unless range.is_a? Range
|
57
|
+
|
58
|
+
Kernel.rand(range)
|
54
59
|
end
|
55
60
|
|
56
61
|
def rand_range
|
data/lib/fabrication/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fabrication
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.20.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Paul Elliott
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-01-21 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Fabrication is an object generation framework for ActiveRecord, Mongoid,
|
14
14
|
DataMapper, Sequel, or any other Ruby object.
|