active_model_cachers 2.1.5 → 2.1.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,5 @@
1
- # frozen_string_literal: true
2
- module ActiveModelCachers
3
- class NilObject
4
- end
5
- end
1
+ # frozen_string_literal: true
2
+ module ActiveModelCachers
3
+ class NilObject
4
+ end
5
+ end
@@ -1,49 +1,49 @@
1
- # frozen_string_literal: true
2
- module ActiveModelCachers
3
- module ActiveRecord
4
- module Extension
5
- # define #find_by for Rails 3
6
- def find_by(*args)
7
- where(*args).order('').first
8
- end
9
- end
10
- end
11
- end
12
-
13
- module ActiveRecord
14
- module Transactions
15
- if not method_defined?(:transaction_include_any_action?)
16
- def transaction_include_any_action?(fire_on)
17
- fire_on.any?{|s| transaction_include_action?(s) }
18
- end
19
- end
20
- end
21
- end
22
-
23
- module ActiveRecord
24
- module Associations
25
- # = Active Record Associations
26
- #
27
- # This is the root class of all associations ('+ Foo' signifies an included module Foo):
28
- #
29
- # Association
30
- # SingularAssociation
31
- # HasOneAssociation
32
- # HasOneThroughAssociation + ThroughAssociation
33
- # BelongsToAssociation
34
- # BelongsToPolymorphicAssociation
35
- # CollectionAssociation
36
- # HasAndBelongsToManyAssociation
37
- # HasManyAssociation
38
- # HasManyThroughAssociation + ThroughAssociation
39
- class Association #:nodoc:
40
- alias_method :scope, :scoped
41
- end
42
- end
43
- end
44
-
45
- class ActiveModelCachers::ColumnValueCache
46
- def pluck_columns(object, relation, columns)
47
- object.connection.select_all(relation.select(columns)).map(&:values)
48
- end
49
- end
1
+ # frozen_string_literal: true
2
+ module ActiveModelCachers
3
+ module ActiveRecord
4
+ module Extension
5
+ # define #find_by for Rails 3
6
+ def find_by(*args)
7
+ where(*args).order('').first
8
+ end
9
+ end
10
+ end
11
+ end
12
+
13
+ module ActiveRecord
14
+ module Transactions
15
+ if not method_defined?(:transaction_include_any_action?)
16
+ def transaction_include_any_action?(fire_on)
17
+ fire_on.any?{|s| transaction_include_action?(s) }
18
+ end
19
+ end
20
+ end
21
+ end
22
+
23
+ module ActiveRecord
24
+ module Associations
25
+ # = Active Record Associations
26
+ #
27
+ # This is the root class of all associations ('+ Foo' signifies an included module Foo):
28
+ #
29
+ # Association
30
+ # SingularAssociation
31
+ # HasOneAssociation
32
+ # HasOneThroughAssociation + ThroughAssociation
33
+ # BelongsToAssociation
34
+ # BelongsToPolymorphicAssociation
35
+ # CollectionAssociation
36
+ # HasAndBelongsToManyAssociation
37
+ # HasManyAssociation
38
+ # HasManyThroughAssociation + ThroughAssociation
39
+ class Association #:nodoc:
40
+ alias_method :scope, :scoped
41
+ end
42
+ end
43
+ end
44
+
45
+ class ActiveModelCachers::ColumnValueCache
46
+ def pluck_columns(object, relation, columns)
47
+ object.connection.select_all(relation.select(columns)).map(&:values)
48
+ end
49
+ end
@@ -1,9 +1,9 @@
1
- if defined?(ActiveRecord::Attribute)
2
- class ActiveRecord::Attribute
3
- class Uninitialized < self
4
- def forgetting_assignment
5
- dup
6
- end
7
- end
8
- end
9
- end
1
+ if defined?(ActiveRecord::Attribute)
2
+ class ActiveRecord::Attribute
3
+ class Uninitialized < self
4
+ def forgetting_assignment
5
+ dup
6
+ end
7
+ end
8
+ end
9
+ end
@@ -1,4 +1,4 @@
1
- # frozen_string_literal: true
2
- module ActiveModelCachers
3
- VERSION = '2.1.5'
4
- end
1
+ # frozen_string_literal: true
2
+ module ActiveModelCachers
3
+ VERSION = '2.1.6'
4
+ end
metadata CHANGED
@@ -1,29 +1,35 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_model_cachers
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.5
4
+ version: 2.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - khiav reoy
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-08-03 00:00:00.000000000 Z
11
+ date: 2019-01-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '1.17'
20
+ - - "<"
18
21
  - !ruby/object:Gem::Version
19
- version: '1.11'
22
+ version: 3.x
20
23
  type: :development
21
24
  prerelease: false
22
25
  version_requirements: !ruby/object:Gem::Requirement
23
26
  requirements:
24
- - - "~>"
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ version: '1.17'
30
+ - - "<"
25
31
  - !ruby/object:Gem::Version
26
- version: '1.11'
32
+ version: 3.x
27
33
  - !ruby/object:Gem::Dependency
28
34
  name: rake
29
35
  requirement: !ruby/object:Gem::Requirement
@@ -154,7 +160,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
154
160
  version: '0'
155
161
  requirements: []
156
162
  rubyforge_project:
157
- rubygems_version: 2.7.6
163
+ rubygems_version: 2.7.7
158
164
  signing_key:
159
165
  specification_version: 4
160
166
  summary: Simply cache whatever you want by using cachers. Support Rails 3, 4, 5.