fabrication 2.6.3 → 2.6.4

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: 44763cc61b5064efd3d09549d93c16f0d18fa296
4
- data.tar.gz: 412ee4a6c090d96bf07b16ec47c37bbb1d879629
3
+ metadata.gz: 5d12c84a93e187048da75b640cd3e72267d8186a
4
+ data.tar.gz: 6059cd51483dd803a9e87371e2e5488e3759624b
5
5
  SHA512:
6
- metadata.gz: b246fbfeac324d59b3fede3813679384e49c88cd0dbf62547f5d4d9e220ce44f475b2dd1162f094fdcf1728e7037c98b0e786da597a34fd15b5b0be34a03a8c6
7
- data.tar.gz: d52a2235af021ba6892c03c216314930975fe8ac0187c2f20199b4e0235b445f5d317ff505a15d2adf33c19c780e59de7d557878928118bfefac0da94bd8ba72
6
+ metadata.gz: 2dc0c1b558750f764c6eba317f0d89013b10c39a7910cd448e6f184f9d68982502388adb143a298dff8646075bcf12deb72845122d016d0738f139b39454769b
7
+ data.tar.gz: 4fbfa0c3879d981fe9fdb47f7f3401e416cf3d4dad48f996d8e96226ff279a8110fda8d933101f09fe903d785faeca24bfba1cd30db34af44db03e86550b633d
@@ -30,10 +30,6 @@ module Fabrication
30
30
  @path_prefix ||= defined?(Rails) ? Rails.root : "."
31
31
  end
32
32
 
33
- def active_support?
34
- @active_support ||= defined?(ActiveSupport)
35
- end
36
-
37
33
  attr_writer :register_with_steps
38
34
  def register_with_steps?; @register_with_steps end
39
35
  end
@@ -35,7 +35,7 @@ class Fabrication::Generator::Base
35
35
 
36
36
  def to_hash(attributes=[], callbacks=[])
37
37
  process_attributes(attributes)
38
- (Fabrication::Config.active_support? ? HashWithIndifferentAccess.new : {}).tap do |hash|
38
+ Fabrication::Support.hash_class.new.tap do |hash|
39
39
  __attributes.map do |name, value|
40
40
  if value && value.respond_to?(:id)
41
41
  hash["#{name}_id"] = value.id
@@ -36,6 +36,10 @@ class Fabrication::Support
36
36
  Fabrication.schematics.freeze
37
37
  end
38
38
 
39
+ def hash_class
40
+ @hash_class ||= defined?(HashWithIndifferentAccess) ? HashWithIndifferentAccess : Hash
41
+ end
42
+
39
43
  end
40
44
 
41
45
  end
@@ -1,3 +1,3 @@
1
1
  module Fabrication
2
- VERSION = '2.6.3'
2
+ VERSION = '2.6.4'
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.6.3
4
+ version: 2.6.4
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-03-16 00:00:00.000000000 Z
11
+ date: 2013-03-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord