temping 3.8.0 → 3.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/temping.rb +2 -2
  3. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1f1e540bd8c166e116a2855d94e62a215aecbdd8
4
- data.tar.gz: f1b62f83c07e11adeb1d0308a5b4c16d29672c84
3
+ metadata.gz: 854682e673db78262df86716d1f51432af84aa72
4
+ data.tar.gz: f8e95dc7625c179eecf3a9891e01bfac673205ab
5
5
  SHA512:
6
- metadata.gz: ef670dd1b41aefe97264c56ac81072fb45d7d153f08da335d1546652965e93eaa2326b5a7c18d14df5a876818e679df6b04a4ce840176de8c0555539477d9dc0
7
- data.tar.gz: 959d603fc824a39f8e80759d81c42734acd828138764f8ca258121f8bc79169a31cc4d2fea171f73c8bbde777a01c9fd1f54f0864e9d9b82e92640e36609208b
6
+ metadata.gz: 08cbb126b85f7452c3a986edf1679a99a18b4b8dfcd9b9e8af874208dea32ec3044bcd83239840ce0a88bfe323388a31b63c031248f15c1be0925fb97144e210
7
+ data.tar.gz: 65e0a023f58fcc3baae537f1c073565d74844bdcb192559ad41077b7f13d83dd9a1247031c123d331a9eaf44ce6d126d0e9f3ec0a43c56ab1377f0b77bfa19dd
@@ -47,7 +47,7 @@ class Temping
47
47
  private
48
48
 
49
49
  def build
50
- Class.new(model_parent_class).tap do |klass|
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 model_parent_class
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.8.0
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-02-07 00:00:00.000000000 Z
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.8
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