rbs_rails 0.4.1 → 0.8.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 +4 -4
- data/.github/workflows/ci.yml +29 -0
- data/.gitignore +4 -1
- data/.gitmodules +0 -0
- data/CHANGELOG.md +17 -0
- data/Gemfile +2 -2
- data/README.md +28 -44
- data/Rakefile +2 -1
- data/Steepfile +12 -1
- data/bin/add-type-params.rb +2 -1
- data/bin/gem_rbs +94 -0
- data/bin/postprocess.rb +1 -1
- data/bin/rbs +29 -2
- data/bin/rbs-prototype-rb.rb +59 -6
- data/bin/setup +1 -0
- data/lib/rbs_rails.rb +4 -0
- data/lib/rbs_rails/active_record.rb +80 -46
- data/lib/rbs_rails/dependency_builder.rb +43 -0
- data/lib/rbs_rails/rake_task.rb +72 -0
- data/lib/rbs_rails/util.rb +25 -0
- data/lib/rbs_rails/version.rb +1 -1
- data/rbs_rails.gemspec +2 -2
- data/sig/fileutils.rbs +1 -0
- data/sig/rake.rbs +6 -0
- data/sig/rbs_rails/active_record.rbs +9 -2
- data/sig/rbs_rails/dependency_builder.rbs +9 -0
- data/sig/rbs_rails/rake_task.rbs +26 -0
- data/sig/rbs_rails/util.rbs +11 -0
- metadata +17 -48
- data/.travis.yml +0 -11
- data/assets/sig/action_controller.rbs +0 -49
- data/assets/sig/action_mailer.rbs +0 -8
- data/assets/sig/active_record.rbs +0 -137
- data/assets/sig/builtin.rbs +0 -7
- data/assets/sig/capybara.rbs +0 -14
- data/assets/sig/concurrent.rbs +0 -4
- data/assets/sig/erb.rbs +0 -4
- data/assets/sig/erubi.rbs +0 -4
- data/assets/sig/generated/actionpack.rbs +0 -11831
- data/assets/sig/generated/actionview.rbs +0 -10591
- data/assets/sig/generated/activejob.rbs +0 -1920
- data/assets/sig/generated/activemodel.rbs +0 -4214
- data/assets/sig/generated/activerecord-meta-programming.rbs +0 -98
- data/assets/sig/generated/activerecord.rbs +0 -24602
- data/assets/sig/generated/activesupport.rbs +0 -12613
- data/assets/sig/generated/railties.rbs +0 -4687
- data/assets/sig/i18n.rbs +0 -4
- data/assets/sig/libxml.rbs +0 -10
- data/assets/sig/minitest.rbs +0 -13
- data/assets/sig/nokogiri.rbs +0 -8
- data/assets/sig/patches/README.md +0 -4
- data/assets/sig/patches/for_actionpack.rbs +0 -74
- data/assets/sig/patches/for_actionview.rbs +0 -19
- data/assets/sig/patches/for_activemodel.rbs +0 -11
- data/assets/sig/patches/for_activerecord.rbs +0 -84
- data/assets/sig/patches/for_activesupport.rbs +0 -48
- data/assets/sig/patches/for_railties.rbs +0 -30
- data/assets/sig/pg.rbs +0 -5
- data/assets/sig/que.rbs +0 -4
- data/assets/sig/queue_classic.rbs +0 -4
- data/assets/sig/racc.rbs +0 -4
- data/assets/sig/rack-test.rbs +0 -6
- data/assets/sig/rack.rbs +0 -47
- data/assets/sig/rails.rbs +0 -14
- data/assets/sig/rdoc.rbs +0 -9
- data/assets/sig/sidekiq.rbs +0 -4
- data/assets/sig/sneakers.rbs +0 -4
- data/assets/sig/stdlib.rbs +0 -24
- data/assets/sig/sucker_punch.rbs +0 -4
- data/assets/sig/thor.rbs +0 -12
- data/assets/sig/tzinfo.rbs +0 -4
- data/bin/generate_rbs_from_rails_source_code.rb +0 -201
data/assets/sig/i18n.rbs
DELETED
data/assets/sig/libxml.rbs
DELETED
data/assets/sig/minitest.rbs
DELETED
data/assets/sig/nokogiri.rbs
DELETED
@@ -1,74 +0,0 @@
|
|
1
|
-
|
2
|
-
module AbstractController
|
3
|
-
class Base
|
4
|
-
# alias bug: https://github.com/ruby/rbs/issues/458
|
5
|
-
def send: (String | Symbol name, *untyped args) ?{ (*untyped) -> untyped } -> untyped
|
6
|
-
|
7
|
-
# bug: rbs prototype rb isn't aware of `class << self` for attr_reader
|
8
|
-
# https://github.com/rails/rails/blob/fbe2433be6e052a1acac63c7faf287c52ed3c5ba/actionpack/lib/abstract_controller/base.rb#L34-L35
|
9
|
-
def self.abstract: () -> untyped
|
10
|
-
end
|
11
|
-
end
|
12
|
-
|
13
|
-
module ActionController
|
14
|
-
class Metal
|
15
|
-
# alias bug?: https://github.com/ruby/rbs/issues/458
|
16
|
-
def status: -> untyped
|
17
|
-
end
|
18
|
-
|
19
|
-
class LiveTestResponse < Live::Response
|
20
|
-
# alias bug?: https://github.com/ruby/rbs/issues/458
|
21
|
-
def successful?: -> untyped
|
22
|
-
def not_found?: -> untyped
|
23
|
-
def server_error?: -> untyped
|
24
|
-
end
|
25
|
-
end
|
26
|
-
|
27
|
-
module ActionDispatch
|
28
|
-
class Response
|
29
|
-
# alias bug: https://github.com/ruby/rbs/issues/458
|
30
|
-
attr_accessor cache_control: untyped
|
31
|
-
|
32
|
-
# alias bug: https://github.com/ruby/rbs/issues/458
|
33
|
-
def location: () -> untyped
|
34
|
-
end
|
35
|
-
|
36
|
-
class Cookies
|
37
|
-
class CookieJar
|
38
|
-
# alias bug: https://github.com/ruby/rbs/issues/458
|
39
|
-
def to_h: () -> ::Hash[untyped, untyped]
|
40
|
-
| [T, U] () { (untyped) -> [T, U] } -> ::Hash[T, U]
|
41
|
-
end
|
42
|
-
end
|
43
|
-
|
44
|
-
module Journey
|
45
|
-
module Nodes
|
46
|
-
class Terminal < Node
|
47
|
-
# alias bug: https://github.com/ruby/rbs/issues/458
|
48
|
-
def left: () -> untyped
|
49
|
-
end
|
50
|
-
end
|
51
|
-
end
|
52
|
-
|
53
|
-
module Routing
|
54
|
-
class Mapper
|
55
|
-
module Resources
|
56
|
-
class SingletonResource < Resource
|
57
|
-
# alias bug: https://github.com/ruby/rbs/issues/458
|
58
|
-
attr_reader path: untyped
|
59
|
-
end
|
60
|
-
end
|
61
|
-
end
|
62
|
-
|
63
|
-
class OptionRedirect < Redirect
|
64
|
-
# alias bug: https://github.com/ruby/rbs/issues/458
|
65
|
-
attr_reader block: untyped
|
66
|
-
end
|
67
|
-
|
68
|
-
class RouteSet
|
69
|
-
# alias bug: https://github.com/ruby/rbs/issues/458
|
70
|
-
def to_s: () -> String
|
71
|
-
end
|
72
|
-
end
|
73
|
-
end
|
74
|
-
|
@@ -1,19 +0,0 @@
|
|
1
|
-
|
2
|
-
module ActionView
|
3
|
-
class OutputBuffer < ActiveSupport::SafeBuffer
|
4
|
-
# alias bug: https://github.com/ruby/rbs/issues/458
|
5
|
-
def safe_concat: (untyped value) -> untyped
|
6
|
-
end
|
7
|
-
|
8
|
-
class LookupContext
|
9
|
-
class DetailsKey
|
10
|
-
# alias bug: https://github.com/ruby/rbs/issues/458
|
11
|
-
def equal?: (untyped other) -> bool
|
12
|
-
end
|
13
|
-
end
|
14
|
-
|
15
|
-
class Resolver
|
16
|
-
# Defined with meta-programming
|
17
|
-
def self.caching: () -> untyped
|
18
|
-
end
|
19
|
-
end
|
@@ -1,11 +0,0 @@
|
|
1
|
-
module ActiveModel
|
2
|
-
module Serialization
|
3
|
-
# alias bug: https://github.com/ruby/rbs/issues/458
|
4
|
-
def `send`: (String name, *untyped args) ?{ (*untyped) -> untyped } -> untyped
|
5
|
-
end
|
6
|
-
|
7
|
-
module Validations
|
8
|
-
# alias bug: https://github.com/ruby/rbs/issues/458
|
9
|
-
def `send`: (String name, *untyped args) ?{ (*untyped) -> untyped } -> untyped
|
10
|
-
end
|
11
|
-
end
|
@@ -1,84 +0,0 @@
|
|
1
|
-
module ActiveRecord
|
2
|
-
class Relation
|
3
|
-
# alias bug: https://github.com/ruby/rbs/issues/458
|
4
|
-
def lock_value: () -> untyped
|
5
|
-
end
|
6
|
-
|
7
|
-
module QueryMethods
|
8
|
-
# It is defined with meta programming
|
9
|
-
def extending_values: () -> untyped
|
10
|
-
end
|
11
|
-
|
12
|
-
module ConnectionAdapters
|
13
|
-
module PostgreSQL
|
14
|
-
module OID
|
15
|
-
class Uuid < ActiveModel::Type::Value
|
16
|
-
# alias bug: https://github.com/ruby/rbs/issues/458
|
17
|
-
def deserialize: (*untyped) -> untyped
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|
22
|
-
|
23
|
-
module ConnectionAdapters
|
24
|
-
class PostgreSQLAdapter < AbstractAdapter
|
25
|
-
def database_version: (*untyped) -> untyped
|
26
|
-
end
|
27
|
-
end
|
28
|
-
|
29
|
-
class Migration
|
30
|
-
class CommandRecorder
|
31
|
-
# They are defined with meta programming
|
32
|
-
def add_reference: (*untyped) -> untyped
|
33
|
-
def remove_reference: (*untyped) -> untyped
|
34
|
-
def invert_add_reference: (*untyped) -> untyped
|
35
|
-
def invert_remove_reference: (*untyped) -> untyped
|
36
|
-
end
|
37
|
-
end
|
38
|
-
|
39
|
-
class Result
|
40
|
-
# alias bug: https://github.com/ruby/rbs/issues/458
|
41
|
-
def map: [U] () { (untyped arg0) -> U } -> ::Array[U]
|
42
|
-
| () -> ::Enumerator[untyped, ::Array[untyped]]
|
43
|
-
end
|
44
|
-
end
|
45
|
-
|
46
|
-
module Arel
|
47
|
-
module Nodes
|
48
|
-
class Quoted < Arel::Nodes::Unary
|
49
|
-
# alias bug: https://github.com/ruby/rbs/issues/458
|
50
|
-
def value: () -> untyped
|
51
|
-
end
|
52
|
-
|
53
|
-
class Equality < Arel::Nodes::Binary
|
54
|
-
# alias bug: https://github.com/ruby/rbs/issues/458
|
55
|
-
def left: () -> untyped
|
56
|
-
# alias bug: https://github.com/ruby/rbs/issues/458
|
57
|
-
def right: () -> untyped
|
58
|
-
end
|
59
|
-
|
60
|
-
class TableAlias < Arel::Nodes::Binary
|
61
|
-
# alias bug: https://github.com/ruby/rbs/issues/458
|
62
|
-
def left: () -> untyped
|
63
|
-
# alias bug: https://github.com/ruby/rbs/issues/458
|
64
|
-
def right: () -> untyped
|
65
|
-
end
|
66
|
-
|
67
|
-
class UnqualifiedColumn < Arel::Nodes::Unary
|
68
|
-
# alias bug: https://github.com/ruby/rbs/issues/458
|
69
|
-
def expr: () -> untyped
|
70
|
-
# alias bug: https://github.com/ruby/rbs/issues/458
|
71
|
-
def expr=: (untyped) -> untyped
|
72
|
-
end
|
73
|
-
|
74
|
-
class ValuesList < Unary
|
75
|
-
# alias bug: https://github.com/ruby/rbs/issues/458
|
76
|
-
def expr: () -> untyped
|
77
|
-
end
|
78
|
-
|
79
|
-
class With < Arel::Nodes::Unary
|
80
|
-
# alias bug: https://github.com/ruby/rbs/issues/458
|
81
|
-
def expr: () -> untyped
|
82
|
-
end
|
83
|
-
end
|
84
|
-
end
|
@@ -1,48 +0,0 @@
|
|
1
|
-
class Object
|
2
|
-
# Object#sum is actually not defined, but rbs prototype rb generates it mistakenly due to `class << Benchmark`.
|
3
|
-
# So we need to define it to suppress the alias error.
|
4
|
-
def sum: () -> untyped
|
5
|
-
end
|
6
|
-
|
7
|
-
class Time
|
8
|
-
# alias bug: https://github.com/ruby/rbs/issues/458
|
9
|
-
def xmlschema: (?::Integer fraction_digits) -> ::String
|
10
|
-
end
|
11
|
-
|
12
|
-
module ActiveSupport
|
13
|
-
class TestCase < ::Minitest::Test
|
14
|
-
# alias bug: https://github.com/ruby/rbs/issues/458
|
15
|
-
def name: () -> untyped
|
16
|
-
def assert_raises: (*untyped) -> untyped
|
17
|
-
def refute_empty: (*untyped) -> untyped
|
18
|
-
def refute_equal: (*untyped) -> untyped
|
19
|
-
def refute_in_delta: (*untyped) -> untyped
|
20
|
-
def refute_in_epsilon: (*untyped) -> untyped
|
21
|
-
def refute_includes: (*untyped) -> untyped
|
22
|
-
def refute_instance_of: (*untyped) -> untyped
|
23
|
-
def refute_kind_of: (*untyped) -> untyped
|
24
|
-
def refute_match: (*untyped) -> untyped
|
25
|
-
def refute_nil: (*untyped) -> untyped
|
26
|
-
def refute_operator: (*untyped) -> untyped
|
27
|
-
def refute_predicate: (*untyped) -> untyped
|
28
|
-
def refute_respond_to: (*untyped) -> untyped
|
29
|
-
def refute_same: (*untyped) -> untyped
|
30
|
-
end
|
31
|
-
|
32
|
-
module Notifications
|
33
|
-
class Fanout
|
34
|
-
module Subscribers
|
35
|
-
class AllMessages
|
36
|
-
# alias bug: https://github.com/ruby/rbs/issues/458
|
37
|
-
def ===: (untyped) -> bool
|
38
|
-
end
|
39
|
-
end
|
40
|
-
end
|
41
|
-
end
|
42
|
-
|
43
|
-
class TimeWithZone
|
44
|
-
# alias bug: https://github.com/ruby/rbs/issues/458
|
45
|
-
def <: (untyped) -> bool
|
46
|
-
def >: (untyped) -> bool
|
47
|
-
end
|
48
|
-
end
|
@@ -1,30 +0,0 @@
|
|
1
|
-
|
2
|
-
module Rails
|
3
|
-
class Application < Engine
|
4
|
-
# alias bug: https://github.com/ruby/rbs/issues/458
|
5
|
-
def app: () -> untyped
|
6
|
-
end
|
7
|
-
|
8
|
-
class Engine < Railtie
|
9
|
-
# bug: rbs prototype rb isn't aware of `class << self` for attr_*
|
10
|
-
def self.isolated: () -> untyped
|
11
|
-
def self.isolated=: (untyped) -> untyped
|
12
|
-
|
13
|
-
# alias bug: https://github.com/ruby/rbs/issues/458
|
14
|
-
def self.railtie_name: (?untyped? name) -> untyped
|
15
|
-
end
|
16
|
-
|
17
|
-
module Generators
|
18
|
-
class PluginGenerator < AppBase
|
19
|
-
# alias bug: https://github.com/ruby/rbs/issues/458
|
20
|
-
def app_path: () -> untyped
|
21
|
-
end
|
22
|
-
end
|
23
|
-
|
24
|
-
module Initializable
|
25
|
-
class Collection[T] < Array[T]
|
26
|
-
def each: () -> ::Enumerator[T, self]
|
27
|
-
| () { (T item) -> void } -> self
|
28
|
-
end
|
29
|
-
end
|
30
|
-
end
|
data/assets/sig/pg.rbs
DELETED
data/assets/sig/que.rbs
DELETED
data/assets/sig/racc.rbs
DELETED
data/assets/sig/rack-test.rbs
DELETED
data/assets/sig/rack.rbs
DELETED
@@ -1,47 +0,0 @@
|
|
1
|
-
module Rack
|
2
|
-
class Server
|
3
|
-
end
|
4
|
-
|
5
|
-
class Response
|
6
|
-
module Helpers
|
7
|
-
def location: () -> untyped
|
8
|
-
end
|
9
|
-
end
|
10
|
-
|
11
|
-
class Request
|
12
|
-
module Helpers
|
13
|
-
end
|
14
|
-
|
15
|
-
module Env
|
16
|
-
end
|
17
|
-
end
|
18
|
-
|
19
|
-
module Session
|
20
|
-
module Abstract
|
21
|
-
class SessionHash
|
22
|
-
end
|
23
|
-
|
24
|
-
class PersistedSecure
|
25
|
-
class SecureSessionHash
|
26
|
-
end
|
27
|
-
end
|
28
|
-
|
29
|
-
class Persisted
|
30
|
-
end
|
31
|
-
end
|
32
|
-
|
33
|
-
class SessionId
|
34
|
-
end
|
35
|
-
|
36
|
-
class Dalli
|
37
|
-
end
|
38
|
-
end
|
39
|
-
|
40
|
-
module Cache
|
41
|
-
class MetaStore
|
42
|
-
end
|
43
|
-
|
44
|
-
class EntityStore
|
45
|
-
end
|
46
|
-
end
|
47
|
-
end
|
data/assets/sig/rails.rbs
DELETED
data/assets/sig/rdoc.rbs
DELETED
data/assets/sig/sidekiq.rbs
DELETED
data/assets/sig/sneakers.rbs
DELETED
data/assets/sig/stdlib.rbs
DELETED
@@ -1,24 +0,0 @@
|
|
1
|
-
module DRb
|
2
|
-
end
|
3
|
-
|
4
|
-
module DRb::DRbUndumped
|
5
|
-
end
|
6
|
-
|
7
|
-
module TSort
|
8
|
-
end
|
9
|
-
|
10
|
-
class SimpleDelegator
|
11
|
-
end
|
12
|
-
|
13
|
-
module Gem
|
14
|
-
class Version
|
15
|
-
end
|
16
|
-
end
|
17
|
-
|
18
|
-
module OpenSSL
|
19
|
-
class Cipher
|
20
|
-
end
|
21
|
-
end
|
22
|
-
|
23
|
-
module FileUtils
|
24
|
-
end
|