subroutine 0.10.0.beta4 → 0.10.0.beta5

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: 9d7662863cde650cd9b5392a5c53c45a0b63db8f6ff5651dac88701c0e204505
4
- data.tar.gz: 2ccdbc5c345686f95741848f72c3112363d8c2bd8d84899c2e66e4f65af10784
3
+ metadata.gz: 2102bfdb6fa4c740488105c36618121f713b22d807818b576903c272178a1a95
4
+ data.tar.gz: 4217c7b112a82797ed1b79c65a8f4cc3468e601fe4833fa3eef35a6bc00a8071
5
5
  SHA512:
6
- metadata.gz: 941c27d1b188ec739751ee9a7e396d64f63498215a1b946308dd8e70ec6537c2997312ead77ce09a2fa5f48d77211e15514d46905bb91ad8ccbaa02044d8b2f7
7
- data.tar.gz: 02024556adf1ae6c76f16258613e18f58f23c46f11a5171201763b0d1546090710234d6d7ac08f96c330bb8bee032b4503bae72141ea01438d0efda85a48c4e5
6
+ metadata.gz: 27fcfd3a0c4f7406586d159a1ff8e7c5673802a941f156a38228be4672d4d1da15f21c487c56ee76d0246e5b0544038dd8df313c9e079e17ea327b5043a99b64
7
+ data.tar.gz: 3206ed2cbd84106e99c1c7cc797a4bb71a975b8350adc31c979ef18094cab7126f2e2d3f551cea1d80768016f3dbd88b56e6ffada8c6d0a1b15b6f23c0f384b3
@@ -108,7 +108,7 @@ module Subroutine
108
108
  type = send(config.foreign_type_method)
109
109
 
110
110
  result = fetch_association_instance(type, fk, config.unscoped?)
111
- set_field_without_association(field_name, result)
111
+ set_field_without_association(field_name, result, track_provided: false) unless result.nil?
112
112
  result
113
113
  else
114
114
  get_field_without_association(field_name)
@@ -5,7 +5,7 @@ module Subroutine
5
5
  MAJOR = 0
6
6
  MINOR = 10
7
7
  PATCH = 0
8
- PRE = "beta4"
8
+ PRE = "beta5"
9
9
 
10
10
  VERSION = [MAJOR, MINOR, PATCH, PRE].compact.join(".")
11
11
 
@@ -154,5 +154,28 @@ module Subroutine
154
154
  end
155
155
  end
156
156
 
157
+ def test_params_does_not_contain_association_key_if_not_provided
158
+ op = SimpleAssociationOp.new
159
+ assert_equal [], op.params.keys
160
+ end
161
+
162
+ def test_getting_does_not_set_provided
163
+ op = SimpleAssociationOp.new
164
+ op.user
165
+ assert_equal false, op.field_provided?(:user)
166
+ assert_equal false, op.field_provided?(:user_id)
167
+ assert_equal false, op.field_provided?(:user_type)
168
+
169
+ op.user_id
170
+ assert_equal false, op.field_provided?(:user)
171
+ assert_equal false, op.field_provided?(:user_id)
172
+ assert_equal false, op.field_provided?(:user_type)
173
+
174
+ op.user_type
175
+ assert_equal false, op.field_provided?(:user)
176
+ assert_equal false, op.field_provided?(:user_id)
177
+ assert_equal false, op.field_provided?(:user_type)
178
+ end
179
+
157
180
  end
158
181
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: subroutine
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.0.beta4
4
+ version: 0.10.0.beta5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Nelson