fabrication 2.12.1 → 2.12.2
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 +3 -11
- data/lib/fabrication/support.rb +1 -6
- data/lib/fabrication/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 976a84a363881df56a3f0f18dca2e05ba63a66c2
|
4
|
+
data.tar.gz: a8f5a55c6ef0eddf7824a0698c3737b64ec17fe3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c904f38dda03158e9bf2b1d951eb00dc4166704ed7da9390509ff82158c15607ae4894b3fb20c7ca04783e7a36e5d37b992d8eaa7adf4a82c4df707a8017e46d
|
7
|
+
data.tar.gz: a6b0447ef77a116fd159a09db9d9ced493866a63085b57003d1a28180997c41a3da75cb2c63f4ed5f1e8eeb807675a82a9fa49856e8f14b0f8bc07dd3961e0c6
|
@@ -66,20 +66,12 @@ class Fabrication::Schematic::Manager
|
|
66
66
|
end
|
67
67
|
|
68
68
|
def resolve_class(name, parent, options)
|
69
|
-
|
70
|
-
|
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(
|
69
|
+
Fabrication::Support.class_for(
|
70
|
+
options[:class_name] ||
|
78
71
|
(parent && parent.klass) ||
|
79
72
|
options[:from] ||
|
80
73
|
name
|
81
|
-
|
82
|
-
end
|
74
|
+
)
|
83
75
|
end
|
84
76
|
|
85
77
|
def schematic_for(name, options, &block)
|
data/lib/fabrication/support.rb
CHANGED
@@ -39,12 +39,7 @@ class Fabrication::Support
|
|
39
39
|
end
|
40
40
|
|
41
41
|
def variable_name_to_class_name(name)
|
42
|
-
name
|
43
|
-
if name.respond_to?(:classify)
|
44
|
-
name.to_s.classify
|
45
|
-
else
|
46
|
-
name.to_s.gsub(/\/(.?)/){"::#{$1.upcase}"}.gsub(/(?:^|_)(.)/){$1.upcase}
|
47
|
-
end
|
42
|
+
name.to_s.gsub(/\/(.?)/){"::#{$1.upcase}"}.gsub(/(?:^|_)(.)/){$1.upcase}
|
48
43
|
end
|
49
44
|
|
50
45
|
def find_definitions
|
data/lib/fabrication/version.rb
CHANGED