fabrication 2.20.1 → 2.20.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/lib/fabrication/generator/active_record.rb +5 -1
- data/lib/fabrication/version.rb +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: e5d3cb9fdb13ee5c47eaa85198882cdc4928a48830ac9a9ca029becffefc4e1a
|
4
|
+
data.tar.gz: af6d6f702f0b2b45965cf9b366017c32227ce292bc3fb96e4d5c83e32f69a9c4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 30f5250a089513d1a206ca9db5935172ae30923a140522a9709398a3b84484a2079a5efd5dc70c79e8048db44eb2e390d52ec0ba04321742cc711873d2983073
|
7
|
+
data.tar.gz: cd0cc5c4410730e4303001ac369aa23a047b2924f52092ee74dfc96981d5ebfd978fd07f20064e34e1fdf1cbdda3a1575475ee6c3a129e60f0ae4489f39b9e96
|
@@ -1,7 +1,11 @@
|
|
1
1
|
class Fabrication::Generator::ActiveRecord < Fabrication::Generator::Base
|
2
2
|
|
3
3
|
def self.supports?(klass)
|
4
|
-
|
4
|
+
# Some gems will declare an ActiveRecord module for their own purposes
|
5
|
+
# so we can't assume because we have the ActiveRecord module that we also
|
6
|
+
# have ActiveRecord::Base. Because defined? can return nil we ensure that nil
|
7
|
+
# becomes false.
|
8
|
+
defined?(ActiveRecord) && defined?(ActiveRecord::Base) && klass.ancestors.include?(ActiveRecord::Base) || false
|
5
9
|
end
|
6
10
|
|
7
11
|
def build_instance
|
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.20.
|
4
|
+
version: 2.20.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Paul Elliott
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-05-02 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.
|
@@ -70,8 +70,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
70
70
|
- !ruby/object:Gem::Version
|
71
71
|
version: '0'
|
72
72
|
requirements: []
|
73
|
-
|
74
|
-
rubygems_version: 2.6.14
|
73
|
+
rubygems_version: 3.0.1
|
75
74
|
signing_key:
|
76
75
|
specification_version: 4
|
77
76
|
summary: Implementing the factory pattern in Ruby so you don't have to.
|