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 +4 -4
- data/lib/fabrication/schematic/manager.rb +11 -3
- data/lib/fabrication/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e5ab4f880af09d4c60710ef406a9e93973c645bb
|
4
|
+
data.tar.gz: a132906a5327a562b26ff3124e80c7543d00afa6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
70
|
-
|
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)
|
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.12.
|
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-
|
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.
|
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.
|