fabrication 2.9.2 → 2.9.3
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/cucumber/step_fabricator.rb +1 -7
- data/lib/fabrication/fabricator.rb +5 -5
- 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: d930b692979d30d6a650770510fd500e7aaa24a6
|
4
|
+
data.tar.gz: d87145180ccca5bc06f330b7d515095ca345587b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 11e14b064efdf85febee306ff937efa7e64afb26472661d5c24403e6c9c626aa3a2d6cbb80334cc2f3a5d9a28b89786ce35d1a2326ac83ee9f04edcf2d093c8a
|
7
|
+
data.tar.gz: dacff28966109aea4f14851bcddf7f24e36f8fd6a791d4ed5180f98ea235255b4a9b82477f0ffda7bc95613035fa53e684becd5536e5b6a92b079aba8640dc55
|
@@ -36,7 +36,7 @@ module Fabrication
|
|
36
36
|
end
|
37
37
|
|
38
38
|
def klass
|
39
|
-
schematic.klass
|
39
|
+
Fabrication::Fabricator.schematic(@fabricator).klass
|
40
40
|
end
|
41
41
|
|
42
42
|
private
|
@@ -53,12 +53,6 @@ module Fabrication
|
|
53
53
|
@model == @model.singularize
|
54
54
|
end
|
55
55
|
|
56
|
-
def schematic
|
57
|
-
Fabrication.manager[@fabricator].tap do |schematic|
|
58
|
-
raise Fabrication::UnknownFabricatorError.new(@model) unless schematic
|
59
|
-
end
|
60
|
-
end
|
61
|
-
|
62
56
|
def dehumanize(string)
|
63
57
|
string.gsub(/\W+/,'_').downcase
|
64
58
|
end
|
@@ -20,15 +20,15 @@ class Fabrication::Fabricator
|
|
20
20
|
schematic(name).to_params(overrides, &block)
|
21
21
|
end
|
22
22
|
|
23
|
+
def self.schematic(name)
|
24
|
+
Fabrication::Support.find_definitions if Fabrication.manager.empty?
|
25
|
+
Fabrication.manager[name] || raise(Fabrication::UnknownFabricatorError.new(name))
|
26
|
+
end
|
27
|
+
|
23
28
|
private
|
24
29
|
|
25
30
|
def self.fail_if_initializing(name)
|
26
31
|
raise Fabrication::MisplacedFabricateError.new(name) if Fabrication.manager.initializing?
|
27
32
|
end
|
28
33
|
|
29
|
-
def self.schematic(name)
|
30
|
-
Fabrication::Support.find_definitions if Fabrication.manager.empty?
|
31
|
-
Fabrication.manager[name] || raise(Fabrication::UnknownFabricatorError.new(name))
|
32
|
-
end
|
33
|
-
|
34
34
|
end
|
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.9.
|
4
|
+
version: 2.9.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Paul Elliott
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-11-
|
11
|
+
date: 2013-11-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|