orthoses-rails 0.8.0 → 0.9.0
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: a43ce53af9e7aec6ef02751c5649146d817e76770a9b15bb2fb5a24fa1b0447b
|
4
|
+
data.tar.gz: 83c78756ff7794059a1001902f887509d8be7b42f116a2ce30b1cdb27d75ff6a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bce1abdf1faf93222005ba51aa4c74675fc98edef98a546faecd52280bf03ce11dc896379ab7269c3c7bda3be43eddae81cf01ab6fc701e8a2e96d4f841dd7b8
|
7
|
+
data.tar.gz: be065396c52d757e110c2668e5eb90ada5f58275376bc93f0e9e4d25be4968735bccae5ace6d2ad7e08c8642b75b1ff5f5bd63b93c4019faba66101f1de34757
|
@@ -117,11 +117,11 @@ module Orthoses
|
|
117
117
|
if argument
|
118
118
|
return [:multi, member.types]
|
119
119
|
else
|
120
|
-
|
120
|
+
method_type = member.overloads.map(&:method_type).find do |method_type|
|
121
121
|
method_type.type.required_positionals.empty? && method_type.type.required_keywords.empty?
|
122
122
|
end
|
123
|
-
next unless
|
124
|
-
return [:single,
|
123
|
+
next unless method_type
|
124
|
+
return [:single, method_type.type.return_type]
|
125
125
|
end
|
126
126
|
when RBS::AST::Members::Var
|
127
127
|
next unless member.name == name
|
@@ -35,19 +35,25 @@ module Orthoses
|
|
35
35
|
-
|
36
36
|
])
|
37
37
|
|
38
|
+
def add_signature(env, content)
|
39
|
+
buffer, directives, decls = RBS::Parser.parse_signature(content.to_rbs)
|
40
|
+
env.add_signature(buffer: buffer, directives: directives, decls: decls)
|
41
|
+
end
|
42
|
+
|
38
43
|
def each_line_from_core_time_definition(store)
|
39
44
|
type_name_time = TypeName("::Time")
|
40
45
|
type_name_time_with_zone = TypeName("::ActiveSupport::TimeWithZone")
|
41
46
|
env = Utils.rbs_environment(collection: true, cache: false)
|
42
|
-
|
43
|
-
env
|
44
|
-
env
|
45
|
-
env
|
46
|
-
env
|
47
|
-
env
|
48
|
-
env
|
49
|
-
env
|
50
|
-
env
|
47
|
+
|
48
|
+
add_signature(env, store["Time"])
|
49
|
+
add_signature(env, store["DateAndTime"])
|
50
|
+
add_signature(env, store["DateAndTime::Zones"])
|
51
|
+
add_signature(env, store["DateAndTime::Calculations"])
|
52
|
+
add_signature(env, store["DateAndTime::Compatibility"])
|
53
|
+
add_signature(env, store["ActiveSupport"])
|
54
|
+
add_signature(env, store["ActiveSupport::TimeZone"])
|
55
|
+
add_signature(env, store["ActiveSupport::Duration"])
|
56
|
+
add_signature(env, store["ActiveSupport::TimeWithZone"])
|
51
57
|
|
52
58
|
builder = RBS::DefinitionBuilder.new(env: env.resolve_type_names)
|
53
59
|
one_ancestors = builder.ancestor_builder.one_instance_ancestors(type_name_time)
|
data/orthoses-rails.gemspec
CHANGED
metadata
CHANGED
@@ -1,29 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: orthoses-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ksss
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-04-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: orthoses
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '1.
|
19
|
+
version: '1.6'
|
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.6'
|
27
27
|
description: Orthoses middleware collection for Ruby on Rails
|
28
28
|
email:
|
29
29
|
- co000ri@gmail.com
|
@@ -120,7 +120,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
120
120
|
- !ruby/object:Gem::Version
|
121
121
|
version: '0'
|
122
122
|
requirements: []
|
123
|
-
rubygems_version: 3.
|
123
|
+
rubygems_version: 3.4.6
|
124
124
|
signing_key:
|
125
125
|
specification_version: 4
|
126
126
|
summary: Orthoses middleware collection for Ruby on Rails
|