save_chain_inspector 0.1.0 → 0.1.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: fb5b157973994040b28e5a9a9db7fae7fba7ce8ca5e5c13a7c5dbc9dc13165d8
4
- data.tar.gz: e88c0bd09a45fce934dedb1af3580e6e0220690e09c865ea142a237a7896834f
3
+ metadata.gz: 98ef7216a3ec9c08d05f6a9127a8f9c5d3c897fc0cf5aace85688e061236765a
4
+ data.tar.gz: 98f89513a34d712a2344e4b69c760d8b1042e0498ae80529135a02de0e4b1df5
5
5
  SHA512:
6
- metadata.gz: aa60bbc1f71bfb213f32992030b8d80d57aac2c8797ef57eb4e421de9d3b219403c7d9944344e620b972afcf3e6ad8af9453a817adef765b4f2f7f26e45477c0
7
- data.tar.gz: eeeb8944be49e80994d87042daa5da60eee32b886e63311f43c95c6185d575268417db34c193db552c9930c36d9d2de0fe76f22c09bbf93be2ed117f2f4a846e
6
+ metadata.gz: b15ca7f3cc0353e5cb4cea50770c7038a510fd685d4460322909a76d847550e2713d84bfa662cac8e1b69a050da51547065da6fea9bf9cdac55e24d7f2a43050
7
+ data.tar.gz: 58e9b90944321c1ec6e65aec51409de42387198b7c66cfc7573a68f70a991307348612c83e701fbe9e845084541b553d011ca672f06e3e9b52e258b9dd1a32c0
data/README.md CHANGED
@@ -26,16 +26,20 @@ end
26
26
 
27
27
  ```
28
28
  Post#save start
29
- Post#autosave_associated_records_for_comments start
30
- Comment#save start
31
- Comment#before_save start
32
- Comment#autosave_associated_records_for_post start
33
- Comment#autosave_associated_records_for_post end
34
- Comment#before_save end
35
- Comment#after_create start
36
- Comment#after_create end
37
- Comment#save end
38
- Post#autosave_associated_records_for_comments end
29
+ Post#before_save start
30
+ Post#before_save end
31
+ Post#after_create start
32
+ Post#autosave_associated_records_for_comments start
33
+ Comment#save start
34
+ Comment#before_save start
35
+ Comment#autosave_associated_records_for_post start
36
+ Comment#autosave_associated_records_for_post end
37
+ Comment#before_save end
38
+ Comment#after_create start
39
+ Comment#after_create end
40
+ Comment#save end
41
+ Post#autosave_associated_records_for_comments end
42
+ Post#after_create end
39
43
  Post#save end
40
44
  ```
41
45
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class SaveChainInspector
4
- VERSION = '0.1.0'
4
+ VERSION = '0.1.1'
5
5
  end
@@ -20,9 +20,9 @@ class SaveChainInspector # rubocop:disable Metrics/ClassLength, Style/Documentat
20
20
  def initialize
21
21
  ActiveRecord::Base.descendants.each do |klass|
22
22
  next if klass.abstract_class
23
- next if @save_chain_inspector_initialized
23
+ next if klass.instance_variable_get(:@save_chain_inspector_initialized)
24
24
 
25
- @save_chain_inspector_initialized = true
25
+ klass.instance_variable_set(:@save_chain_inspector_initialized, true)
26
26
  add_hooks(klass)
27
27
  end
28
28
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: save_chain_inspector
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shinichi Maeshima
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-07-28 00:00:00.000000000 Z
11
+ date: 2024-07-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -66,7 +66,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
66
66
  - !ruby/object:Gem::Version
67
67
  version: '0'
68
68
  requirements: []
69
- rubygems_version: 3.4.20
69
+ rubygems_version: 3.5.11
70
70
  signing_key:
71
71
  specification_version: 4
72
72
  summary: A tool to investigate the order in which the saves of related models are