state_of_the_nation 2.0.0 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f9953a5747485077b6b886669e70f2e652ec75837f2fc3a18e9593f208953d47
4
- data.tar.gz: 9ffe1c9d237754ce9c2bdfbd8385e95e0b5ccbaa7eb8169dc10e4313a69e4253
3
+ metadata.gz: 36525e79ab3fded0f8985975e73eaac75b0d535b530a1261bb8208d2e984b330
4
+ data.tar.gz: 2da7c70d311533899e611d3118f048763c753f4560880483b7bb4e27552e172f
5
5
  SHA512:
6
- metadata.gz: bcbf936777c4cca79342052f6092ac1722a1cc006017e1abc7b9cd16c70c462ea06d83b05d7fc6123b113c13bc68b670f0cdee9b63ab77c68b80b6f570b8f505
7
- data.tar.gz: e3d8a957ae397887f048bc3f105564d2e29a301c150a0233c9116b36f256c4e2ec1e994c983cc506830f6d7c6a0a7bcb4b473d7c6adff0b753fc5a8d9799e1c6
6
+ metadata.gz: 48703e6f70341a407ffd5d2804e09681b8ac841c48776aba500a6e0f32348300c4fdfa15d985be3a38b2dc22e41c8687d92dab0f0d94f7b244a5f23d80be335e
7
+ data.tar.gz: e3f1d4895d066f56ad5aa2d23aff060c71787e005c7c7609e8182af7b5cd3e2ba2840c986381fe68a5e9982c0ed88cf044f4b0522ef19b82974751ef48764a79
data/.circleci/config.yml CHANGED
@@ -5,7 +5,7 @@ jobs:
5
5
  RAILS_ENV: test
6
6
 
7
7
  docker:
8
- - image: circleci/ruby:2.5.5
8
+ - image: circleci/ruby:2.7.5
9
9
 
10
10
  steps:
11
11
  - checkout
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.5.5
1
+ 2.7.5
@@ -1,3 +1,3 @@
1
1
  module StateOfTheNation
2
- VERSION = "2.0.0"
2
+ VERSION = "2.0.1"
3
3
  end
@@ -85,8 +85,10 @@ module StateOfTheNation
85
85
  private
86
86
 
87
87
  def add_child_methods(plural:, single:, with_identity_cache:)
88
- child_class = self.reflect_on_association(plural).klass
89
- name = self.name.demodulize.underscore.to_sym
88
+ reflection = self.reflect_on_association(plural)
89
+ name = reflection.inverse_of&.name || self.name.demodulize.underscore.to_sym
90
+
91
+ child_class = reflection.klass
90
92
  child_class.instance_variable_set(:@parent_association, name)
91
93
  child_class.instance_variable_set(:@prevent_multiple_active, single)
92
94
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: state_of_the_nation
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Patrick O'Doherty
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2022-03-29 00:00:00.000000000 Z
12
+ date: 2023-05-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -223,8 +223,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
223
223
  - !ruby/object:Gem::Version
224
224
  version: '0'
225
225
  requirements: []
226
- rubyforge_project:
227
- rubygems_version: 2.7.6.2
226
+ rubygems_version: 3.1.6
228
227
  signing_key:
229
228
  specification_version: 4
230
229
  summary: An easy way to model state that changes over time with ActiveRecord