orthoses-rails 1.1.0 → 1.2.0
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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d9681e80e9a106b8d984c304a0f26777deb5e2077aba6f8a0321f52976e24bcc
|
|
4
|
+
data.tar.gz: c1f248d0e236bc72491e507da185317d55d607cebf4d6364209cd1601cacb6aa
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8ff02244b5844c28186021d4379818a5a0b56ffcb693425f500e3145ff36da721a278c972a6a324e3b3b26bcb3ce9652c98f9fb3c15549fd51924371362d37fb
|
|
7
|
+
data.tar.gz: 284d60f37efb290cf6e5230dd10cda55066278e89e4b81866896793c535b4864edc7cb13c389d0c98a861c34630fba09df3bb04b1035291f7c4cc46666d22b9b
|
|
@@ -18,15 +18,7 @@ module Orthoses
|
|
|
18
18
|
type = if ref.polymorphic?
|
|
19
19
|
'untyped'
|
|
20
20
|
else
|
|
21
|
-
|
|
22
|
-
Utils.module_name(ref.klass) or next
|
|
23
|
-
rescue NameError => e
|
|
24
|
-
while e
|
|
25
|
-
Orthoses.logger.warn(e.message)
|
|
26
|
-
e = e.cause
|
|
27
|
-
end
|
|
28
|
-
next
|
|
29
|
-
end
|
|
21
|
+
Orthoses::ActiveRecord.reflection_klass_name(ref) or next
|
|
30
22
|
end
|
|
31
23
|
opt = "#{type}?"
|
|
32
24
|
|
|
@@ -15,16 +15,7 @@ module Orthoses
|
|
|
15
15
|
|
|
16
16
|
lines = base.reflect_on_all_associations(:has_many).flat_map do |ref|
|
|
17
17
|
singular_name = ref.name.to_s.singularize
|
|
18
|
-
type =
|
|
19
|
-
begin
|
|
20
|
-
Utils.module_name(ref.klass)
|
|
21
|
-
rescue NameError => e
|
|
22
|
-
while e
|
|
23
|
-
Orthoses.logger.warn(e.message)
|
|
24
|
-
e = e.cause
|
|
25
|
-
end
|
|
26
|
-
next
|
|
27
|
-
end
|
|
18
|
+
type = Orthoses::ActiveRecord.reflection_klass_name(ref) or next
|
|
28
19
|
|
|
29
20
|
collection_proxy = "::#{type}::ActiveRecord_Associations_CollectionProxy"
|
|
30
21
|
[
|
|
@@ -14,16 +14,7 @@ module Orthoses
|
|
|
14
14
|
base_name = Utils.module_name(base) || next
|
|
15
15
|
|
|
16
16
|
lines = base.reflect_on_all_associations(:has_one).flat_map do |ref|
|
|
17
|
-
type =
|
|
18
|
-
begin
|
|
19
|
-
Utils.module_name(ref.klass) or next
|
|
20
|
-
rescue NameError => e
|
|
21
|
-
while e
|
|
22
|
-
Orthoses.logger.warn(e.message)
|
|
23
|
-
e = e.cause
|
|
24
|
-
end
|
|
25
|
-
next
|
|
26
|
-
end
|
|
17
|
+
type = Orthoses::ActiveRecord.reflection_klass_name(ref) or next
|
|
27
18
|
opt = "#{type}?"
|
|
28
19
|
|
|
29
20
|
[
|
|
@@ -43,5 +43,16 @@ module Orthoses
|
|
|
43
43
|
'untyped'
|
|
44
44
|
end
|
|
45
45
|
end
|
|
46
|
+
|
|
47
|
+
def self.reflection_klass_name(ref)
|
|
48
|
+
Utils.module_name(ref.klass)
|
|
49
|
+
rescue NameError, ArgumentError => e
|
|
50
|
+
while e
|
|
51
|
+
Orthoses.logger.warn(e.message)
|
|
52
|
+
e = e.cause
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
nil
|
|
56
|
+
end
|
|
46
57
|
end
|
|
47
58
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: orthoses-rails
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.2.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- ksss
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2023-
|
|
11
|
+
date: 2023-09-02 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: orthoses
|
|
@@ -16,14 +16,14 @@ dependencies:
|
|
|
16
16
|
requirements:
|
|
17
17
|
- - ">="
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
|
-
version: '1.
|
|
19
|
+
version: '1.11'
|
|
20
20
|
type: :runtime
|
|
21
21
|
prerelease: false
|
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
|
23
23
|
requirements:
|
|
24
24
|
- - ">="
|
|
25
25
|
- !ruby/object:Gem::Version
|
|
26
|
-
version: '1.
|
|
26
|
+
version: '1.11'
|
|
27
27
|
description: Orthoses middleware collection for Ruby on Rails
|
|
28
28
|
email:
|
|
29
29
|
- co000ri@gmail.com
|