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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 64e503b6bd8387aba620486cb389b3b3a2694473
4
- data.tar.gz: 434881b49d868391b548c364361526884ebc9e66
2
+ SHA256:
3
+ metadata.gz: e5d3cb9fdb13ee5c47eaa85198882cdc4928a48830ac9a9ca029becffefc4e1a
4
+ data.tar.gz: af6d6f702f0b2b45965cf9b366017c32227ce292bc3fb96e4d5c83e32f69a9c4
5
5
  SHA512:
6
- metadata.gz: 31dd79d6add115b0688035eec9cff3df7219fca66f88f92ab352d8cbc7214e1c83b2fefd5e70c6fdcaa567f076f12901881fc9cd60c3e084cbecca65e60792aa
7
- data.tar.gz: bda40d311f7701e30f3c04e34a94f60a4ddf001c1510155fb5131d9bb680fc1dc25a42959d2d0b39252c3d60ab156d4c9099e0a47218d3de6a2978262f876977
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
- defined?(ActiveRecord) && klass.ancestors.include?(ActiveRecord::Base)
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
@@ -1,3 +1,3 @@
1
1
  module Fabrication
2
- VERSION = '2.20.1'
2
+ VERSION = '2.20.2'
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.20.1
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: 2018-01-22 00:00:00.000000000 Z
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
- rubyforge_project:
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.