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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b980b5f6382407ca60d6b2c0623cbd2ebf3d18e9
4
- data.tar.gz: 1b9dd2a822e9cdb336d606452f35365f235bc23f
3
+ metadata.gz: d930b692979d30d6a650770510fd500e7aaa24a6
4
+ data.tar.gz: d87145180ccca5bc06f330b7d515095ca345587b
5
5
  SHA512:
6
- metadata.gz: ef524828a86561968d0ebcbc5b6e33813bebcf0ace66d46917194f6a2b8ed3e74acdef3e870c967373032ad6376ada96bf688a2245441397926ade0e5e8c3b22
7
- data.tar.gz: 1acb1b6182f09db95ecedc54b6cb54d3db2bac8e3c2046885f716e26a0b1cf4599f9adc418bd7478e69322b33dd61d7e69679d49adf383b4d79d90231f72f007
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
@@ -1,3 +1,3 @@
1
1
  module Fabrication
2
- VERSION = '2.9.2'
2
+ VERSION = '2.9.3'
3
3
  end
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.2
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-09 00:00:00.000000000 Z
11
+ date: 2013-11-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord