active_record-acts_as 3.1.0 → 4.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +3 -4
- data/Appraisals +1 -1
- data/README.md +1 -2
- data/active_record-acts_as.gemspec +4 -4
- data/gemfiles/rails_5.2.gemfile +1 -1
- data/lib/active_record/acts_as/querying.rb +2 -4
- data/lib/active_record/acts_as/version.rb +1 -1
- metadata +8 -21
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dc594008886af5220c93ce7a44e2d7e5e2420b12d5930fc2d5387172fa0065b8
|
4
|
+
data.tar.gz: 73b4f16970e323e9c266f7b7148068f99939efcfa12c323f08b23f4b3a4c63de
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f4395d3cec20378b993702c59b88981549c1db17d14fc76231ceb936a2c85d445e22ce4898127268e3644aae4d29d580c8abe1792136fb670a1a4f4b7bc5ec3a
|
7
|
+
data.tar.gz: 47188691e2f6e66dc6fbd6188594400efd2a05812d655c808c129b6055ed070f12ce16a2f88eeb425f81ca067a55664a3610a6a8ec3de838ed8576a87942ec58
|
data/.travis.yml
CHANGED
data/Appraisals
CHANGED
data/README.md
CHANGED
@@ -2,7 +2,6 @@
|
|
2
2
|
[![Build Status](https://travis-ci.org/krautcomputing/active_record-acts_as.svg)](https://travis-ci.org/krautcomputing/active_record-acts_as)
|
3
3
|
[![Code Climate](https://codeclimate.com/github/krautcomputing/active_record-acts_as.png)](https://codeclimate.com/github/krautcomputing/active_record-acts_as)
|
4
4
|
[![Coverage Status](https://coveralls.io/repos/krautcomputing/active_record-acts_as/badge.png)](https://coveralls.io/r/krautcomputing/active_record-acts_as)
|
5
|
-
[![Dependency Status](https://gemnasium.com/krautcomputing/active_record-acts_as.svg)](https://gemnasium.com/krautcomputing/active_record-acts_as)
|
6
5
|
|
7
6
|
# ActiveRecord::ActsAs
|
8
7
|
|
@@ -21,7 +20,7 @@ a separate table for each product type, i.e. a `pens` table with `color` column.
|
|
21
20
|
|
22
21
|
## Requirements
|
23
22
|
|
24
|
-
* Ruby >= 2.
|
23
|
+
* Ruby >= 2.4
|
25
24
|
* ActiveSupport >= 4.2
|
26
25
|
* ActiveRecord >= 4.2
|
27
26
|
|
@@ -18,15 +18,15 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
19
|
spec.require_paths = ["lib"]
|
20
20
|
|
21
|
-
spec.required_ruby_version = ">= 2.
|
21
|
+
spec.required_ruby_version = ">= 2.4"
|
22
22
|
|
23
23
|
spec.add_development_dependency "sqlite3", "~> 1.3"
|
24
|
-
spec.add_development_dependency "bundler"
|
24
|
+
spec.add_development_dependency "bundler"
|
25
25
|
spec.add_development_dependency "rspec", "~> 3"
|
26
26
|
spec.add_development_dependency "rake", "~> 10"
|
27
27
|
spec.add_development_dependency "appraisal", "~> 2.1"
|
28
28
|
spec.add_development_dependency "guard-rspec", "~> 4.7"
|
29
29
|
|
30
|
-
spec.add_dependency "activesupport", ">= 4.2"
|
31
|
-
spec.add_dependency "activerecord", ">= 4.2"
|
30
|
+
spec.add_dependency "activesupport", ">= 4.2"
|
31
|
+
spec.add_dependency "activerecord", ">= 4.2"
|
32
32
|
end
|
data/gemfiles/rails_5.2.gemfile
CHANGED
@@ -28,10 +28,8 @@ module ActiveRecord
|
|
28
28
|
|
29
29
|
module ScopeForCreate
|
30
30
|
def scope_for_create(attributes = nil)
|
31
|
-
scope =
|
32
|
-
if acting_as?
|
33
|
-
scope.merge!(where_values_hash(acting_as_model.table_name))
|
34
|
-
end
|
31
|
+
scope = respond_to?(:values_for_create) ? values_for_create(attributes) : where_values_hash
|
32
|
+
scope.merge!(where_values_hash(acting_as_model.table_name)) if acting_as?
|
35
33
|
scope.merge(create_with_value)
|
36
34
|
end
|
37
35
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active_record-acts_as
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 4.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Hassan Zamani
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2019-01-09 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: sqlite3
|
@@ -29,16 +29,16 @@ dependencies:
|
|
29
29
|
name: bundler
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
31
31
|
requirements:
|
32
|
-
- - "
|
32
|
+
- - ">="
|
33
33
|
- !ruby/object:Gem::Version
|
34
|
-
version: '
|
34
|
+
version: '0'
|
35
35
|
type: :development
|
36
36
|
prerelease: false
|
37
37
|
version_requirements: !ruby/object:Gem::Requirement
|
38
38
|
requirements:
|
39
|
-
- - "
|
39
|
+
- - ">="
|
40
40
|
- !ruby/object:Gem::Version
|
41
|
-
version: '
|
41
|
+
version: '0'
|
42
42
|
- !ruby/object:Gem::Dependency
|
43
43
|
name: rspec
|
44
44
|
requirement: !ruby/object:Gem::Requirement
|
@@ -102,9 +102,6 @@ dependencies:
|
|
102
102
|
- - ">="
|
103
103
|
- !ruby/object:Gem::Version
|
104
104
|
version: '4.2'
|
105
|
-
- - "<"
|
106
|
-
- !ruby/object:Gem::Version
|
107
|
-
version: 5.2.2.rc1
|
108
105
|
type: :runtime
|
109
106
|
prerelease: false
|
110
107
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -112,9 +109,6 @@ dependencies:
|
|
112
109
|
- - ">="
|
113
110
|
- !ruby/object:Gem::Version
|
114
111
|
version: '4.2'
|
115
|
-
- - "<"
|
116
|
-
- !ruby/object:Gem::Version
|
117
|
-
version: 5.2.2.rc1
|
118
112
|
- !ruby/object:Gem::Dependency
|
119
113
|
name: activerecord
|
120
114
|
requirement: !ruby/object:Gem::Requirement
|
@@ -122,9 +116,6 @@ dependencies:
|
|
122
116
|
- - ">="
|
123
117
|
- !ruby/object:Gem::Version
|
124
118
|
version: '4.2'
|
125
|
-
- - "<"
|
126
|
-
- !ruby/object:Gem::Version
|
127
|
-
version: 5.2.2.rc1
|
128
119
|
type: :runtime
|
129
120
|
prerelease: false
|
130
121
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -132,9 +123,6 @@ dependencies:
|
|
132
123
|
- - ">="
|
133
124
|
- !ruby/object:Gem::Version
|
134
125
|
version: '4.2'
|
135
|
-
- - "<"
|
136
|
-
- !ruby/object:Gem::Version
|
137
|
-
version: 5.2.2.rc1
|
138
126
|
description: Simulate multi-table inheritance for activerecord models using a polymorphic
|
139
127
|
association
|
140
128
|
email:
|
@@ -190,15 +178,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
190
178
|
requirements:
|
191
179
|
- - ">="
|
192
180
|
- !ruby/object:Gem::Version
|
193
|
-
version: '2.
|
181
|
+
version: '2.4'
|
194
182
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
195
183
|
requirements:
|
196
184
|
- - ">="
|
197
185
|
- !ruby/object:Gem::Version
|
198
186
|
version: '0'
|
199
187
|
requirements: []
|
200
|
-
|
201
|
-
rubygems_version: 2.7.6
|
188
|
+
rubygems_version: 3.0.2
|
202
189
|
signing_key:
|
203
190
|
specification_version: 4
|
204
191
|
summary: Simulate multi-table inheritance for activerecord models
|