rbs_rails 0.5.0 → 0.8.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.dependabot/config.yml +8 -0
- data/.github/workflows/ci.yml +29 -0
- data/.gitignore +4 -2
- data/.gitmodules +0 -3
- data/CHANGELOG.md +22 -0
- data/Gemfile +2 -2
- data/Gemfile.lock +61 -0
- data/README.md +16 -44
- data/Steepfile +3 -0
- data/bin/add-type-params.rb +2 -1
- data/bin/gem_rbs +94 -0
- data/bin/postprocess.rb +1 -1
- data/bin/rbs +1 -1
- data/bin/rbs-prototype-rb.rb +5 -1
- data/bin/setup +1 -0
- data/lib/rbs_rails.rb +4 -0
- data/lib/rbs_rails/active_record.rb +91 -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/activerecord.rbs +4 -0
- data/sig/fileutils.rbs +1 -0
- data/sig/rake.rbs +6 -0
- data/sig/rbs_rails/active_record.rbs +11 -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 +19 -30
- data/.travis.yml +0 -11
- data/assets/sig/action_mailer.rbs +0 -8
- 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/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/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/sig/fileutils.rbs
CHANGED
data/sig/rake.rbs
ADDED
@@ -1,22 +1,27 @@
|
|
1
1
|
module RbsRails::ActiveRecord
|
2
|
-
def self.class_to_rbs: (untyped klass) -> untyped
|
2
|
+
def self.class_to_rbs: (untyped klass, ?dependencies: Array[String]) -> untyped
|
3
|
+
def self.generatable?: (untyped klass) -> boolish
|
3
4
|
end
|
4
5
|
|
5
6
|
class RbsRails::ActiveRecord::Generator
|
6
7
|
@parse_model_file: nil | Parser::AST::Node
|
7
8
|
|
8
|
-
def initialize: (singleton(ActiveRecord::Base) klass) -> untyped
|
9
|
+
def initialize: (singleton(ActiveRecord::Base) klass, dependencies: Array[String]) -> untyped
|
9
10
|
|
10
11
|
def generate: () -> String
|
11
12
|
|
12
13
|
def klass_decl: () -> String
|
13
14
|
|
15
|
+
def pk_type: () -> String
|
16
|
+
|
14
17
|
def relation_decl: () -> String
|
15
18
|
|
16
19
|
def collection_proxy_decl: () -> String
|
17
20
|
|
18
21
|
def header: () -> String
|
19
22
|
|
23
|
+
def footer: () -> String
|
24
|
+
|
20
25
|
def associations: () -> String
|
21
26
|
|
22
27
|
def has_many: () -> String
|
@@ -55,5 +60,9 @@ class RbsRails::ActiveRecord::Generator
|
|
55
60
|
|
56
61
|
def optional: (String) -> String
|
57
62
|
|
63
|
+
private
|
64
|
+
|
58
65
|
attr_reader klass: singleton(ActiveRecord::Base)
|
66
|
+
|
67
|
+
attr_reader klass_name: String
|
59
68
|
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
module RbsRails
|
2
|
+
class RakeTask < Rake::TaskLib
|
3
|
+
interface _Filter
|
4
|
+
def call: (Class) -> boolish
|
5
|
+
end
|
6
|
+
attr_accessor ignore_model_if: _Filter | nil
|
7
|
+
|
8
|
+
attr_accessor name: Symbol
|
9
|
+
|
10
|
+
attr_accessor signature_root_dir: Pathname
|
11
|
+
|
12
|
+
def initialize: (?::Symbol name) { (self) -> void } -> void
|
13
|
+
|
14
|
+
def def_all: () -> void
|
15
|
+
|
16
|
+
def def_copy_signature_files: () -> void
|
17
|
+
|
18
|
+
def def_generate_rbs_for_models: () -> void
|
19
|
+
|
20
|
+
def def_generate_rbs_for_path_helpers: () -> void
|
21
|
+
|
22
|
+
private
|
23
|
+
|
24
|
+
def setup_signature_root_dir!: () -> void
|
25
|
+
end
|
26
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rbs_rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.8.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Masataka Pocke Kuwabara
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-02-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: parser
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '1'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
40
|
+
version: '1'
|
41
41
|
description: A RBS files generator for Rails application
|
42
42
|
email:
|
43
43
|
- kuwabara@pocke.me
|
@@ -45,40 +45,20 @@ executables: []
|
|
45
45
|
extensions: []
|
46
46
|
extra_rdoc_files: []
|
47
47
|
files:
|
48
|
+
- ".dependabot/config.yml"
|
49
|
+
- ".github/workflows/ci.yml"
|
48
50
|
- ".gitignore"
|
49
51
|
- ".gitmodules"
|
50
|
-
-
|
52
|
+
- CHANGELOG.md
|
51
53
|
- Gemfile
|
54
|
+
- Gemfile.lock
|
52
55
|
- LICENSE
|
53
56
|
- README.md
|
54
57
|
- Rakefile
|
55
58
|
- Steepfile
|
56
|
-
- assets/sig/action_mailer.rbs
|
57
|
-
- assets/sig/builtin.rbs
|
58
|
-
- assets/sig/capybara.rbs
|
59
|
-
- assets/sig/concurrent.rbs
|
60
|
-
- assets/sig/erb.rbs
|
61
|
-
- assets/sig/erubi.rbs
|
62
|
-
- assets/sig/i18n.rbs
|
63
|
-
- assets/sig/libxml.rbs
|
64
|
-
- assets/sig/minitest.rbs
|
65
|
-
- assets/sig/nokogiri.rbs
|
66
|
-
- assets/sig/pg.rbs
|
67
|
-
- assets/sig/que.rbs
|
68
|
-
- assets/sig/queue_classic.rbs
|
69
|
-
- assets/sig/racc.rbs
|
70
|
-
- assets/sig/rack-test.rbs
|
71
|
-
- assets/sig/rack.rbs
|
72
|
-
- assets/sig/rails.rbs
|
73
|
-
- assets/sig/rdoc.rbs
|
74
|
-
- assets/sig/sidekiq.rbs
|
75
|
-
- assets/sig/sneakers.rbs
|
76
|
-
- assets/sig/stdlib.rbs
|
77
|
-
- assets/sig/sucker_punch.rbs
|
78
|
-
- assets/sig/thor.rbs
|
79
|
-
- assets/sig/tzinfo.rbs
|
80
59
|
- bin/add-type-params.rb
|
81
60
|
- bin/console
|
61
|
+
- bin/gem_rbs
|
82
62
|
- bin/postprocess.rb
|
83
63
|
- bin/rbs
|
84
64
|
- bin/rbs-prototype-rb.rb
|
@@ -86,14 +66,22 @@ files:
|
|
86
66
|
- bin/to-ascii.rb
|
87
67
|
- lib/rbs_rails.rb
|
88
68
|
- lib/rbs_rails/active_record.rb
|
69
|
+
- lib/rbs_rails/dependency_builder.rb
|
89
70
|
- lib/rbs_rails/path_helpers.rb
|
71
|
+
- lib/rbs_rails/rake_task.rb
|
72
|
+
- lib/rbs_rails/util.rb
|
90
73
|
- lib/rbs_rails/version.rb
|
91
74
|
- rbs_rails.gemspec
|
75
|
+
- sig/activerecord.rbs
|
92
76
|
- sig/fileutils.rbs
|
93
77
|
- sig/parser.rbs
|
78
|
+
- sig/rake.rbs
|
94
79
|
- sig/rbs_rails.rbs
|
95
80
|
- sig/rbs_rails/active_record.rbs
|
81
|
+
- sig/rbs_rails/dependency_builder.rbs
|
96
82
|
- sig/rbs_rails/path_helpers.rbs
|
83
|
+
- sig/rbs_rails/rake_task.rbs
|
84
|
+
- sig/rbs_rails/util.rbs
|
97
85
|
- sig/rbs_rails/version.rbs
|
98
86
|
homepage: https://github.com/pocke/rbs_rails
|
99
87
|
licenses:
|
@@ -101,6 +89,7 @@ licenses:
|
|
101
89
|
metadata:
|
102
90
|
homepage_uri: https://github.com/pocke/rbs_rails
|
103
91
|
source_code_uri: https://github.com/pocke/rbs_rails
|
92
|
+
changelog_uri: https://github.com/pocke/rbs_rails/blob/master/CHANGELOG.md
|
104
93
|
post_install_message:
|
105
94
|
rdoc_options: []
|
106
95
|
require_paths:
|
@@ -116,7 +105,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
116
105
|
- !ruby/object:Gem::Version
|
117
106
|
version: '0'
|
118
107
|
requirements: []
|
119
|
-
rubygems_version: 3.2.
|
108
|
+
rubygems_version: 3.2.3
|
120
109
|
signing_key:
|
121
110
|
specification_version: 4
|
122
111
|
summary: A RBS files generator for Rails application
|
data/.travis.yml
DELETED
data/assets/sig/builtin.rbs
DELETED
data/assets/sig/capybara.rbs
DELETED
data/assets/sig/concurrent.rbs
DELETED
data/assets/sig/erb.rbs
DELETED
data/assets/sig/erubi.rbs
DELETED
data/assets/sig/i18n.rbs
DELETED
data/assets/sig/libxml.rbs
DELETED
data/assets/sig/minitest.rbs
DELETED
data/assets/sig/nokogiri.rbs
DELETED
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