predictive_load 0.5.0 → 0.5.1

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: 54bffe32fe50393ce8bb75bd01ae397084d3c2924ea4dafa9bccddb860baedf3
4
- data.tar.gz: 1b37f4afd9874034fe0b7adc81317687d734cc51539665a5df005deefc0553c0
3
+ metadata.gz: 4b0c3352a1804088cd709d17e619ff406cc243a92ef5b180815416e704b89775
4
+ data.tar.gz: b12b98881fccee776a2cf2175a8c2d4c06eb6325d1d5a47c08a732f5b6c2eb51
5
5
  SHA512:
6
- metadata.gz: 8af3089f4ab81c3470d2811a335d40e36bede5ca38c59cf739135ebf4fdb18d7181338d9065a7fff06ff436a54c73e4ad618c61a890d8ee610c935855542e1da
7
- data.tar.gz: de072a8eeaf0080dcf1bd2c1183b9b04f305c1206ed170737a6cbf97b62dee6945e876fb739b2495d715f9e1e373605383db35b13ed8ccb6b5a0f1bc71528e4c
6
+ metadata.gz: a67ac4027e5b1f8c5d70b4799f7cbd230c18c0b18a2100085c1876a97ece7b283b621a22981ac5f1e0d16e6c0f6383746d436080f57a2b1810a216230c20a74e
7
+ data.tar.gz: baa04313709dd51cbe4269a9cf536559d88ea24d55409a0ba80dd9f1f1db9fa4b1f4ee03df9df57841bb5abe81250255bbb9b257d55fcd6e9f653b5dbc2479d2
data/README.md CHANGED
@@ -1,4 +1,5 @@
1
- [![Build Status](https://travis-ci.org/eac/predictive_load.png)](https://travis-ci.org/eac/predictive_load)
1
+ [![Build Status](https://github.com/zendesk/predictive_load/actions/workflows/actions.yml/badge.svg?branch=master)](https://github.com/zendesk/predictive_load/actions/workflows/actions.yml)
2
+
2
3
 
3
4
  predictive_load
4
5
  ===============
@@ -9,8 +9,8 @@ module PredictiveLoad::ActiveRecordCollectionObservation
9
9
  end
10
10
  ActiveRecord::Base.include CollectionMember
11
11
  ActiveRecord::Base.extend UnscopedTracker
12
- ActiveRecord::Associations::Association.include AssociationNotification
13
- ActiveRecord::Associations::CollectionAssociation.include CollectionAssociationNotification
12
+ ActiveRecord::Associations::Association.prepend AssociationNotification
13
+ ActiveRecord::Associations::CollectionAssociation.prepend CollectionAssociationNotification
14
14
  end
15
15
 
16
16
  module Rails5RelationObservation
@@ -66,16 +66,10 @@ module PredictiveLoad::ActiveRecordCollectionObservation
66
66
  end
67
67
 
68
68
  module AssociationNotification
69
-
70
- def self.included(base)
71
- base.send(:alias_method, :load_target_without_notification, :load_target)
72
- base.send(:alias_method, :load_target, :load_target_with_notification)
73
- end
74
-
75
- def load_target_with_notification
69
+ def load_target
76
70
  notify_collection_observer if find_target?
77
71
 
78
- load_target_without_notification
72
+ super
79
73
  end
80
74
 
81
75
  protected
@@ -85,22 +79,14 @@ module PredictiveLoad::ActiveRecordCollectionObservation
85
79
  @owner.collection_observer.loading_association(@owner, self)
86
80
  end
87
81
  end
88
-
89
82
  end
90
83
 
91
84
  module CollectionAssociationNotification
92
-
93
- def self.included(base)
94
- base.send(:alias_method, :load_target_without_notification, :load_target)
95
- base.send(:alias_method, :load_target, :load_target_with_notification)
96
- end
97
-
98
- def load_target_with_notification
85
+ def load_target
99
86
  notify_collection_observer if find_target?
100
87
 
101
- load_target_without_notification
88
+ super
102
89
  end
103
-
104
90
  end
105
91
 
106
92
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: predictive_load
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric Chapweske
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-02-05 00:00:00.000000000 Z
11
+ date: 2021-07-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -47,7 +47,7 @@ homepage: https://github.com/zendesk/predictive_load
47
47
  licenses:
48
48
  - Apache License Version 2.0
49
49
  metadata: {}
50
- post_install_message:
50
+ post_install_message:
51
51
  rdoc_options: []
52
52
  require_paths:
53
53
  - lib
@@ -62,9 +62,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
62
62
  - !ruby/object:Gem::Version
63
63
  version: '0'
64
64
  requirements: []
65
- rubyforge_project:
66
- rubygems_version: 2.7.6
67
- signing_key:
65
+ rubyforge_project:
66
+ rubygems_version: 2.7.6.2
67
+ signing_key:
68
68
  specification_version: 4
69
69
  summary: ''
70
70
  test_files: []