temping 3.8.0 → 3.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/temping.rb +2 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 854682e673db78262df86716d1f51432af84aa72
|
4
|
+
data.tar.gz: f8e95dc7625c179eecf3a9891e01bfac673205ab
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 08cbb126b85f7452c3a986edf1679a99a18b4b8dfcd9b9e8af874208dea32ec3044bcd83239840ce0a88bfe323388a31b63c031248f15c1be0925fb97144e210
|
7
|
+
data.tar.gz: 65e0a023f58fcc3baae537f1c073565d74844bdcb192559ad41077b7f13d83dd9a1247031c123d331a9eaf44ce6d126d0e9f3ec0a43c56ab1377f0b77bfa19dd
|
data/lib/temping.rb
CHANGED
@@ -47,7 +47,7 @@ class Temping
|
|
47
47
|
private
|
48
48
|
|
49
49
|
def build
|
50
|
-
Class.new(
|
50
|
+
Class.new(@options.fetch(:parent_class, default_parent_class)).tap do |klass|
|
51
51
|
Object.const_set(@model_name, klass)
|
52
52
|
|
53
53
|
klass.primary_key = @options[:primary_key] || :id
|
@@ -56,7 +56,7 @@ class Temping
|
|
56
56
|
end
|
57
57
|
end
|
58
58
|
|
59
|
-
def
|
59
|
+
def default_parent_class
|
60
60
|
if ActiveRecord::VERSION::MAJOR > 4 && defined?(ApplicationRecord)
|
61
61
|
ApplicationRecord
|
62
62
|
else
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: temping
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- John Pignata
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-03-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -148,7 +148,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
148
148
|
version: '0'
|
149
149
|
requirements: []
|
150
150
|
rubyforge_project:
|
151
|
-
rubygems_version: 2.6.
|
151
|
+
rubygems_version: 2.6.10
|
152
152
|
signing_key:
|
153
153
|
specification_version: 4
|
154
154
|
summary: Create temporary table-backed ActiveRecord models for use in tests
|