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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e5ab4f880af09d4c60710ef406a9e93973c645bb
4
- data.tar.gz: a132906a5327a562b26ff3124e80c7543d00afa6
3
+ metadata.gz: 976a84a363881df56a3f0f18dca2e05ba63a66c2
4
+ data.tar.gz: a8f5a55c6ef0eddf7824a0698c3737b64ec17fe3
5
5
  SHA512:
6
- metadata.gz: 6d11906f4c45e489d8c96ae51d80a0d41845f6bee5c57a3e724db521d25fa5fe2e324a90f9ac91b47b936fa9f76da33b9e649249034736cc499b1f9a235696d3
7
- data.tar.gz: 5d8091afd18a637285436e451cb182ac967098cbbcba028084daec04d77ba51e2492f858977f356307b9a680a591fc206ec77d958c3338bcb64fb01f9e1eca6d
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
- 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(
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)
@@ -39,12 +39,7 @@ class Fabrication::Support
39
39
  end
40
40
 
41
41
  def variable_name_to_class_name(name)
42
- name = name.to_s
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
@@ -1,3 +1,3 @@
1
1
  module Fabrication
2
- VERSION = '2.12.1'
2
+ VERSION = '2.12.2'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fabrication
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.12.1
4
+ version: 2.12.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Paul Elliott