subroutine 0.10.0.beta5 → 0.10.0.beta6
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c22ca4172e9f569b15bbccae7c59dc7df49dfca43f367bd1cfcf1d771d77e6ab
|
4
|
+
data.tar.gz: 84cf68b11db90711abbf87b480a36f852673e2ed7c975404b1ffc085bd3269df
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 780e4d568a18e6e6d19a2f92bfbd3e12cb3433e0e11a1a3986a9af7552efdcf69f546d5d95639704a4e4dbcbe8e7dfb5567ee5741d6bc8c811e35058420e3d21
|
7
|
+
data.tar.gz: 3191b5dbe495a426db558b14f5ff22ce3b2bfddd87b5fa60d9606f2b107fb57f5f1830a235982aa2d1be471308b8cde278160c5747d54a266ea90f2fe7de9123
|
data/lib/subroutine/version.rb
CHANGED
@@ -177,5 +177,15 @@ module Subroutine
|
|
177
177
|
assert_equal false, op.field_provided?(:user_type)
|
178
178
|
end
|
179
179
|
|
180
|
+
def test_association_class_names_can_be_declared_as_classes
|
181
|
+
klass = Class.new(OpWithAssociation) do
|
182
|
+
association :user, class_name: Account
|
183
|
+
end
|
184
|
+
|
185
|
+
account = ::Account.new(id: 1)
|
186
|
+
op = klass.new(user: account)
|
187
|
+
assert_equal account, op.user
|
188
|
+
end
|
189
|
+
|
180
190
|
end
|
181
191
|
end
|
data/test/support/ops.rb
CHANGED
@@ -15,6 +15,10 @@ class User
|
|
15
15
|
|
16
16
|
validates :email_address, presence: true
|
17
17
|
|
18
|
+
def self.all
|
19
|
+
self
|
20
|
+
end
|
21
|
+
|
18
22
|
def self.find(id)
|
19
23
|
new(id: id)
|
20
24
|
end
|
@@ -33,6 +37,10 @@ class Account
|
|
33
37
|
|
34
38
|
attr_accessor :id
|
35
39
|
|
40
|
+
def self.all
|
41
|
+
self
|
42
|
+
end
|
43
|
+
|
36
44
|
def self.find(id)
|
37
45
|
new(id: id)
|
38
46
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: subroutine
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.10.0.
|
4
|
+
version: 0.10.0.beta6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mike Nelson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-01-
|
11
|
+
date: 2020-01-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activemodel
|