fabrication 2.12.0 → 2.12.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c86735d59579efdd4858c328b20ee0c2d8b26eea
4
- data.tar.gz: 5522df1bd0f36d53231d508d27b566f74626ea6d
3
+ metadata.gz: e5ab4f880af09d4c60710ef406a9e93973c645bb
4
+ data.tar.gz: a132906a5327a562b26ff3124e80c7543d00afa6
5
5
  SHA512:
6
- metadata.gz: 77f82743f80f9b0cb9bb647bdc02ca8e50f137cb2202f6ddccdd46f5ac2db1d7542d924d9e4e7ab232f2ded94945e24882cf5ee30d1cee56f819d7f5f57b6aca
7
- data.tar.gz: fa8303b63ac13fda4b6a2780f8f38594128777f0e3c82e4da81e662abfd03570dc6599c7e82d76f7c4b58de99153263e05f67870afda2560b1e1768a83877351
6
+ metadata.gz: 6d11906f4c45e489d8c96ae51d80a0d41845f6bee5c57a3e724db521d25fa5fe2e324a90f9ac91b47b936fa9f76da33b9e649249034736cc499b1f9a235696d3
7
+ data.tar.gz: 5d8091afd18a637285436e451cb182ac967098cbbcba028084daec04d77ba51e2492f858977f356307b9a680a591fc206ec77d958c3338bcb64fb01f9e1eca6d
@@ -66,12 +66,20 @@ class Fabrication::Schematic::Manager
66
66
  end
67
67
 
68
68
  def resolve_class(name, parent, options)
69
- Fabrication::Support.class_for(
70
- options[:class_name] ||
69
+ if class_name = options[:class_name]
70
+ return class_name if class_name.is_a?(Class)
71
+ begin
72
+ Fabrication::Support.constantize(class_name)
73
+ rescue
74
+ Fabrication::Support.class_for(class_name)
75
+ end
76
+ else
77
+ Fabrication::Support.class_for(
71
78
  (parent && parent.klass) ||
72
79
  options[:from] ||
73
80
  name
74
- )
81
+ )
82
+ end
75
83
  end
76
84
 
77
85
  def schematic_for(name, options, &block)
@@ -1,3 +1,3 @@
1
1
  module Fabrication
2
- VERSION = '2.12.0'
2
+ VERSION = '2.12.1'
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.12.0
4
+ version: 2.12.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Paul Elliott
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-01-10 00:00:00.000000000 Z
11
+ date: 2015-01-16 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.
@@ -69,7 +69,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
69
69
  version: '0'
70
70
  requirements: []
71
71
  rubyforge_project:
72
- rubygems_version: 2.4.3
72
+ rubygems_version: 2.4.5
73
73
  signing_key:
74
74
  specification_version: 4
75
75
  summary: Implementing the factory pattern in Ruby so you don't have to.