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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bbfc7ea492327e566ab788c73aeb7d294a9d9b4f66049464c9bdcdd5e293bd2a
4
- data.tar.gz: f9142f0468e292d87c4d0637970ca49823cc44664eb59fe09e975d3fe887fc04
3
+ metadata.gz: dc594008886af5220c93ce7a44e2d7e5e2420b12d5930fc2d5387172fa0065b8
4
+ data.tar.gz: 73b4f16970e323e9c266f7b7148068f99939efcfa12c323f08b23f4b3a4c63de
5
5
  SHA512:
6
- metadata.gz: a1ac325e5b476330009606cad7248eb51c62ef8e5bf55ea1ac3ed099e55392716a7aceed1b0f6078a3031f4ab29ddcd86fd634c490289c41ff293381609fc68f
7
- data.tar.gz: 3aaaf59d5b1b229bcedefb4135ba16df442016680096071c1ce6de076293158e803cc670ecda0f67ab991a4ee4a9112db44e63f757004cc759f17102deead977
6
+ metadata.gz: f4395d3cec20378b993702c59b88981549c1db17d14fc76231ceb936a2c85d445e22ce4898127268e3644aae4d29d580c8abe1792136fb670a1a4f4b7bc5ec3a
7
+ data.tar.gz: 47188691e2f6e66dc6fbd6188594400efd2a05812d655c808c129b6055ed070f12ce16a2f88eeb425f81ca067a55664a3610a6a8ec3de838ed8576a87942ec58
@@ -1,12 +1,11 @@
1
1
  language: ruby
2
2
  sudo: false
3
3
  rvm:
4
- - 2.2.7
5
- - 2.3.4
6
- - 2.4.1
4
+ - 2.4
5
+ - 2.5
6
+ - 2.6
7
7
  before_install:
8
8
  - gem update --system
9
- - gem update bundler
10
9
  gemfile:
11
10
  - gemfiles/rails_4.2.gemfile
12
11
  - gemfiles/rails_5.0.gemfile
data/Appraisals CHANGED
@@ -11,5 +11,5 @@ appraise 'rails-5.1' do
11
11
  end
12
12
 
13
13
  appraise 'rails-5.2' do
14
- gem 'rails', '~> 5.2.0.rc1'
14
+ gem 'rails', '~> 5.2.0'
15
15
  end
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.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.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", "~> 1.6"
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", "< 5.2.2.rc1"
31
- spec.add_dependency "activerecord", ">= 4.2", "< 5.2.2.rc1"
30
+ spec.add_dependency "activesupport", ">= 4.2"
31
+ spec.add_dependency "activerecord", ">= 4.2"
32
32
  end
@@ -3,6 +3,6 @@
3
3
  source "https://rubygems.org"
4
4
 
5
5
  gem "coveralls", require: false
6
- gem "rails", "~> 5.2.0.rc1"
6
+ gem "rails", "~> 5.2.0"
7
7
 
8
8
  gemspec path: "../"
@@ -28,10 +28,8 @@ module ActiveRecord
28
28
 
29
29
  module ScopeForCreate
30
30
  def scope_for_create(attributes = nil)
31
- scope = ActiveRecord.version.to_s.to_f >= 5.2 ? super(attributes) : where_values_hash
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
@@ -1,6 +1,6 @@
1
1
  module ActiveRecord
2
2
  module ActsAs
3
- VERSION = "3.1.0"
3
+ VERSION = "4.0.0"
4
4
  end
5
5
  end
6
6
 
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: 3.1.0
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: 2018-12-13 00:00:00.000000000 Z
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: '1.6'
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: '1.6'
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.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
- rubyforge_project:
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