rbs_heuristic_prototype 0.5.0 → 0.5.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/Gemfile +1 -1
- data/Gemfile.lock +27 -24
- data/README.md +1 -9
- data/lib/generators/rbs_heuristic_prototype/install_generator.rb +1 -1
- data/lib/rbs_heuristic_prototype/rake_task.rb +8 -6
- data/lib/rbs_heuristic_prototype/version.rb +1 -1
- data/rbs_collection.lock.yaml +20 -16
- data/rbs_heuristic_prototype.gemspec +1 -0
- data/sig/rbs_heuristic_prototype/rake_task.rbs +1 -1
- metadata +16 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 27bbb60b69e731dbd572ba5ccb38e312c9620082e0aadd454be79f82cfd78bbe
|
|
4
|
+
data.tar.gz: 329389107d5a1180a80cc5e51394915a4901f23eb40a74a268ce8a59c82239f0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 07a7565cf27c7be5128971b5b95eb91574f801f997c683aa43b8644c204f79d3f2bcba85c746d452372b0c2f30242beb21bcd6fa1c6cbe8d490f69470000904c
|
|
7
|
+
data.tar.gz: 563a9a8d48b267a009c8640adcfb47c37e52f9a4fd88b172ed6f0356e6a05130fc522977e18f6ba99ae79c657a57bec326c10149f07cdb9edb6cf4e4b04145c2
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
|
@@ -1,36 +1,38 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
rbs_heuristic_prototype (0.5.
|
|
4
|
+
rbs_heuristic_prototype (0.5.1)
|
|
5
|
+
activesupport
|
|
5
6
|
rbs
|
|
6
7
|
|
|
7
8
|
GEM
|
|
8
9
|
remote: https://rubygems.org/
|
|
9
10
|
specs:
|
|
10
|
-
actionpack (7.0.
|
|
11
|
-
actionview (= 7.0.
|
|
12
|
-
activesupport (= 7.0.
|
|
11
|
+
actionpack (7.0.7)
|
|
12
|
+
actionview (= 7.0.7)
|
|
13
|
+
activesupport (= 7.0.7)
|
|
13
14
|
rack (~> 2.0, >= 2.2.4)
|
|
14
15
|
rack-test (>= 0.6.3)
|
|
15
16
|
rails-dom-testing (~> 2.0)
|
|
16
17
|
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
|
17
|
-
actionview (7.0.
|
|
18
|
-
activesupport (= 7.0.
|
|
18
|
+
actionview (7.0.7)
|
|
19
|
+
activesupport (= 7.0.7)
|
|
19
20
|
builder (~> 3.1)
|
|
20
21
|
erubi (~> 1.4)
|
|
21
22
|
rails-dom-testing (~> 2.0)
|
|
22
23
|
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
|
23
|
-
activemodel (7.0.
|
|
24
|
-
activesupport (= 7.0.
|
|
25
|
-
activerecord (7.0.
|
|
26
|
-
activemodel (= 7.0.
|
|
27
|
-
activesupport (= 7.0.
|
|
28
|
-
activesupport (7.0.
|
|
24
|
+
activemodel (7.0.7)
|
|
25
|
+
activesupport (= 7.0.7)
|
|
26
|
+
activerecord (7.0.7)
|
|
27
|
+
activemodel (= 7.0.7)
|
|
28
|
+
activesupport (= 7.0.7)
|
|
29
|
+
activesupport (7.0.7)
|
|
29
30
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
|
30
31
|
i18n (>= 1.6, < 2)
|
|
31
32
|
minitest (>= 5.1)
|
|
32
33
|
tzinfo (~> 2.0)
|
|
33
34
|
ast (2.4.2)
|
|
35
|
+
base64 (0.1.1)
|
|
34
36
|
builder (3.2.4)
|
|
35
37
|
coderay (1.1.3)
|
|
36
38
|
concurrent-ruby (1.2.2)
|
|
@@ -53,9 +55,9 @@ GEM
|
|
|
53
55
|
nokogiri (>= 1.12.0)
|
|
54
56
|
method_source (1.0.0)
|
|
55
57
|
minitest (5.19.0)
|
|
56
|
-
nokogiri (1.15.
|
|
58
|
+
nokogiri (1.15.4-x86_64-darwin)
|
|
57
59
|
racc (~> 1.4)
|
|
58
|
-
nokogiri (1.15.
|
|
60
|
+
nokogiri (1.15.4-x86_64-linux)
|
|
59
61
|
racc (~> 1.4)
|
|
60
62
|
parallel (1.23.0)
|
|
61
63
|
parser (3.2.2.3)
|
|
@@ -65,19 +67,19 @@ GEM
|
|
|
65
67
|
coderay (~> 1.1)
|
|
66
68
|
method_source (~> 1.0)
|
|
67
69
|
racc (1.7.1)
|
|
68
|
-
rack (2.2.
|
|
70
|
+
rack (2.2.8)
|
|
69
71
|
rack-test (2.1.0)
|
|
70
72
|
rack (>= 1.3)
|
|
71
|
-
rails-dom-testing (2.
|
|
73
|
+
rails-dom-testing (2.2.0)
|
|
72
74
|
activesupport (>= 5.0.0)
|
|
73
75
|
minitest
|
|
74
76
|
nokogiri (>= 1.6)
|
|
75
77
|
rails-html-sanitizer (1.6.0)
|
|
76
78
|
loofah (~> 2.21)
|
|
77
79
|
nokogiri (~> 1.14)
|
|
78
|
-
railties (7.0.
|
|
79
|
-
actionpack (= 7.0.
|
|
80
|
-
activesupport (= 7.0.
|
|
80
|
+
railties (7.0.7)
|
|
81
|
+
actionpack (= 7.0.7)
|
|
82
|
+
activesupport (= 7.0.7)
|
|
81
83
|
method_source
|
|
82
84
|
rake (>= 12.2)
|
|
83
85
|
thor (~> 1.0)
|
|
@@ -87,7 +89,7 @@ GEM
|
|
|
87
89
|
rb-fsevent (0.11.2)
|
|
88
90
|
rb-inotify (0.10.1)
|
|
89
91
|
ffi (~> 1.0)
|
|
90
|
-
rbs (3.1.
|
|
92
|
+
rbs (3.1.3)
|
|
91
93
|
regexp_parser (2.8.1)
|
|
92
94
|
rexml (3.2.6)
|
|
93
95
|
rspec (3.12.0)
|
|
@@ -106,7 +108,8 @@ GEM
|
|
|
106
108
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
107
109
|
rspec-support (~> 3.12.0)
|
|
108
110
|
rspec-support (3.12.0)
|
|
109
|
-
rubocop (1.
|
|
111
|
+
rubocop (1.56.0)
|
|
112
|
+
base64 (~> 0.1.1)
|
|
110
113
|
json (~> 2.3)
|
|
111
114
|
language_server-protocol (>= 3.17.0)
|
|
112
115
|
parallel (~> 1.10)
|
|
@@ -121,7 +124,7 @@ GEM
|
|
|
121
124
|
parser (>= 3.2.1.0)
|
|
122
125
|
ruby-progressbar (1.13.0)
|
|
123
126
|
securerandom (0.2.2)
|
|
124
|
-
steep (1.5.
|
|
127
|
+
steep (1.5.3)
|
|
125
128
|
activesupport (>= 5.1)
|
|
126
129
|
concurrent-ruby (>= 1.1.10)
|
|
127
130
|
csv (>= 3.0.9)
|
|
@@ -143,7 +146,7 @@ GEM
|
|
|
143
146
|
tzinfo (2.0.6)
|
|
144
147
|
concurrent-ruby (~> 1.0)
|
|
145
148
|
unicode-display_width (2.4.2)
|
|
146
|
-
zeitwerk (2.6.
|
|
149
|
+
zeitwerk (2.6.11)
|
|
147
150
|
|
|
148
151
|
PLATFORMS
|
|
149
152
|
x86_64-darwin-19
|
|
@@ -157,7 +160,7 @@ DEPENDENCIES
|
|
|
157
160
|
rbs_heuristic_prototype!
|
|
158
161
|
rspec
|
|
159
162
|
rspec-daemon
|
|
160
|
-
rubocop (~> 1.
|
|
163
|
+
rubocop (~> 1.56)
|
|
161
164
|
steep
|
|
162
165
|
|
|
163
166
|
BUNDLED WITH
|
data/README.md
CHANGED
|
@@ -8,7 +8,7 @@ Add a new entry to your Gemfile and run bundle install:
|
|
|
8
8
|
|
|
9
9
|
```
|
|
10
10
|
group :development do
|
|
11
|
-
gem 'rbs_heuristic_prototype'
|
|
11
|
+
gem 'rbs_heuristic_prototype', require: false
|
|
12
12
|
end
|
|
13
13
|
```
|
|
14
14
|
|
|
@@ -18,14 +18,6 @@ After the installation, please run rake task generator:
|
|
|
18
18
|
bundle exec rails g rbs_heuristic_prototype:install
|
|
19
19
|
```
|
|
20
20
|
|
|
21
|
-
Additionally, it would be better to add the following entry to your rbs_collection.yml:
|
|
22
|
-
|
|
23
|
-
```
|
|
24
|
-
gems:
|
|
25
|
-
- name: rbs_heuristic_prototype
|
|
26
|
-
ignore: true
|
|
27
|
-
```
|
|
28
|
-
|
|
29
21
|
## Usage
|
|
30
22
|
|
|
31
23
|
1. Run `rbs prototype rb` or `rbs prototype runtime` first
|
|
@@ -7,7 +7,7 @@ module RbsHeuristicPrototype
|
|
|
7
7
|
def create_raketask
|
|
8
8
|
create_file "lib/tasks/rbs_heuristic_prototype.rake", <<~RUBY
|
|
9
9
|
begin
|
|
10
|
-
require 'rbs_heuristic_prototype'
|
|
10
|
+
require 'rbs_heuristic_prototype/rake_task'
|
|
11
11
|
RbsHeuristicPrototype::RakeTask.new
|
|
12
12
|
rescue LoadError
|
|
13
13
|
# failed to load rbs_heuristic_prototype. Skip to load rbs_heuristic_prototype tasks.
|
|
@@ -7,11 +7,11 @@ require "rake/tasklib"
|
|
|
7
7
|
module RbsHeuristicPrototype
|
|
8
8
|
class RakeTask < Rake::TaskLib
|
|
9
9
|
FILTERS = {
|
|
10
|
-
active_model_validations: Filters::ActiveModelValidationsFilter,
|
|
11
|
-
boolean_methods: Filters::BooleanMethodsFilter,
|
|
12
|
-
deep_module: Filters::DeepModuleFilter,
|
|
13
|
-
symbol_array_constants: Filters::SymbolArrayConstantsFilter,
|
|
14
|
-
type_args: Filters::TypeArgsFilter
|
|
10
|
+
active_model_validations: "RbsHeuristicPrototype::Filters::ActiveModelValidationsFilter",
|
|
11
|
+
boolean_methods: "RbsHeuristicPrototype::Filters::BooleanMethodsFilter",
|
|
12
|
+
deep_module: "RbsHeuristicPrototype::Filters::DeepModuleFilter",
|
|
13
|
+
symbol_array_constants: "RbsHeuristicPrototype::Filters::SymbolArrayConstantsFilter",
|
|
14
|
+
type_args: "RbsHeuristicPrototype::Filters::TypeArgsFilter"
|
|
15
15
|
}.freeze
|
|
16
16
|
|
|
17
17
|
attr_reader :name, :path
|
|
@@ -38,11 +38,13 @@ module RbsHeuristicPrototype
|
|
|
38
38
|
def define_apply_task
|
|
39
39
|
desc "Apply heuristic filters to prototype signatures"
|
|
40
40
|
task("#{name}:apply": :environment) do
|
|
41
|
+
require "rbs_heuristic_prototype" # load RbsHeuristicPrototype lazily
|
|
42
|
+
|
|
41
43
|
path.find do |entry|
|
|
42
44
|
next unless entry.file?
|
|
43
45
|
|
|
44
46
|
env = FILTERS.inject(load_env(entry)) do |result, (_name, filter)|
|
|
45
|
-
filter.new(result).apply
|
|
47
|
+
filter.constantize.new(result).apply
|
|
46
48
|
end
|
|
47
49
|
|
|
48
50
|
write_env(entry, env)
|
data/rbs_collection.lock.yaml
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
sources:
|
|
3
3
|
- type: git
|
|
4
4
|
name: ruby/gem_rbs_collection
|
|
5
|
-
revision:
|
|
5
|
+
revision: a4c633634493ab7ae73219022f56acff56ab69af
|
|
6
6
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
|
7
7
|
repo_dir: gems
|
|
8
8
|
path: ".gem_rbs_collection"
|
|
@@ -16,7 +16,7 @@ gems:
|
|
|
16
16
|
source:
|
|
17
17
|
type: git
|
|
18
18
|
name: ruby/gem_rbs_collection
|
|
19
|
-
revision:
|
|
19
|
+
revision: a4c633634493ab7ae73219022f56acff56ab69af
|
|
20
20
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
|
21
21
|
repo_dir: gems
|
|
22
22
|
- name: actionview
|
|
@@ -24,7 +24,7 @@ gems:
|
|
|
24
24
|
source:
|
|
25
25
|
type: git
|
|
26
26
|
name: ruby/gem_rbs_collection
|
|
27
|
-
revision:
|
|
27
|
+
revision: a4c633634493ab7ae73219022f56acff56ab69af
|
|
28
28
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
|
29
29
|
repo_dir: gems
|
|
30
30
|
- name: activemodel
|
|
@@ -32,7 +32,7 @@ gems:
|
|
|
32
32
|
source:
|
|
33
33
|
type: git
|
|
34
34
|
name: ruby/gem_rbs_collection
|
|
35
|
-
revision:
|
|
35
|
+
revision: a4c633634493ab7ae73219022f56acff56ab69af
|
|
36
36
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
|
37
37
|
repo_dir: gems
|
|
38
38
|
- name: activerecord
|
|
@@ -40,7 +40,7 @@ gems:
|
|
|
40
40
|
source:
|
|
41
41
|
type: git
|
|
42
42
|
name: ruby/gem_rbs_collection
|
|
43
|
-
revision:
|
|
43
|
+
revision: a4c633634493ab7ae73219022f56acff56ab69af
|
|
44
44
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
|
45
45
|
repo_dir: gems
|
|
46
46
|
- name: activesupport
|
|
@@ -48,7 +48,7 @@ gems:
|
|
|
48
48
|
source:
|
|
49
49
|
type: git
|
|
50
50
|
name: ruby/gem_rbs_collection
|
|
51
|
-
revision:
|
|
51
|
+
revision: a4c633634493ab7ae73219022f56acff56ab69af
|
|
52
52
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
|
53
53
|
repo_dir: gems
|
|
54
54
|
- name: ast
|
|
@@ -56,9 +56,13 @@ gems:
|
|
|
56
56
|
source:
|
|
57
57
|
type: git
|
|
58
58
|
name: ruby/gem_rbs_collection
|
|
59
|
-
revision:
|
|
59
|
+
revision: a4c633634493ab7ae73219022f56acff56ab69af
|
|
60
60
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
|
61
61
|
repo_dir: gems
|
|
62
|
+
- name: base64
|
|
63
|
+
version: '0'
|
|
64
|
+
source:
|
|
65
|
+
type: stdlib
|
|
62
66
|
- name: cgi
|
|
63
67
|
version: '0'
|
|
64
68
|
source:
|
|
@@ -68,7 +72,7 @@ gems:
|
|
|
68
72
|
source:
|
|
69
73
|
type: git
|
|
70
74
|
name: ruby/gem_rbs_collection
|
|
71
|
-
revision:
|
|
75
|
+
revision: a4c633634493ab7ae73219022f56acff56ab69af
|
|
72
76
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
|
73
77
|
repo_dir: gems
|
|
74
78
|
- name: date
|
|
@@ -80,7 +84,7 @@ gems:
|
|
|
80
84
|
source:
|
|
81
85
|
type: git
|
|
82
86
|
name: ruby/gem_rbs_collection
|
|
83
|
-
revision:
|
|
87
|
+
revision: a4c633634493ab7ae73219022f56acff56ab69af
|
|
84
88
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
|
85
89
|
repo_dir: gems
|
|
86
90
|
- name: json
|
|
@@ -108,7 +112,7 @@ gems:
|
|
|
108
112
|
source:
|
|
109
113
|
type: git
|
|
110
114
|
name: ruby/gem_rbs_collection
|
|
111
|
-
revision:
|
|
115
|
+
revision: a4c633634493ab7ae73219022f56acff56ab69af
|
|
112
116
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
|
113
117
|
repo_dir: gems
|
|
114
118
|
- name: optparse
|
|
@@ -120,7 +124,7 @@ gems:
|
|
|
120
124
|
source:
|
|
121
125
|
type: git
|
|
122
126
|
name: ruby/gem_rbs_collection
|
|
123
|
-
revision:
|
|
127
|
+
revision: a4c633634493ab7ae73219022f56acff56ab69af
|
|
124
128
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
|
125
129
|
repo_dir: gems
|
|
126
130
|
- name: pathname
|
|
@@ -132,7 +136,7 @@ gems:
|
|
|
132
136
|
source:
|
|
133
137
|
type: git
|
|
134
138
|
name: ruby/gem_rbs_collection
|
|
135
|
-
revision:
|
|
139
|
+
revision: a4c633634493ab7ae73219022f56acff56ab69af
|
|
136
140
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
|
137
141
|
repo_dir: gems
|
|
138
142
|
- name: rails-dom-testing
|
|
@@ -140,7 +144,7 @@ gems:
|
|
|
140
144
|
source:
|
|
141
145
|
type: git
|
|
142
146
|
name: ruby/gem_rbs_collection
|
|
143
|
-
revision:
|
|
147
|
+
revision: a4c633634493ab7ae73219022f56acff56ab69af
|
|
144
148
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
|
145
149
|
repo_dir: gems
|
|
146
150
|
- name: railties
|
|
@@ -148,7 +152,7 @@ gems:
|
|
|
148
152
|
source:
|
|
149
153
|
type: git
|
|
150
154
|
name: ruby/gem_rbs_collection
|
|
151
|
-
revision:
|
|
155
|
+
revision: a4c633634493ab7ae73219022f56acff56ab69af
|
|
152
156
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
|
153
157
|
repo_dir: gems
|
|
154
158
|
- name: rainbow
|
|
@@ -156,11 +160,11 @@ gems:
|
|
|
156
160
|
source:
|
|
157
161
|
type: git
|
|
158
162
|
name: ruby/gem_rbs_collection
|
|
159
|
-
revision:
|
|
163
|
+
revision: a4c633634493ab7ae73219022f56acff56ab69af
|
|
160
164
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
|
161
165
|
repo_dir: gems
|
|
162
166
|
- name: rbs
|
|
163
|
-
version: 3.1.
|
|
167
|
+
version: 3.1.3
|
|
164
168
|
source:
|
|
165
169
|
type: rubygems
|
|
166
170
|
- name: rdoc
|
metadata
CHANGED
|
@@ -1,15 +1,29 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rbs_heuristic_prototype
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.5.
|
|
4
|
+
version: 0.5.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Takeshi KOMIYA
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2023-08-
|
|
11
|
+
date: 2023-08-25 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
|
+
- !ruby/object:Gem::Dependency
|
|
14
|
+
name: activesupport
|
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
|
16
|
+
requirements:
|
|
17
|
+
- - ">="
|
|
18
|
+
- !ruby/object:Gem::Version
|
|
19
|
+
version: '0'
|
|
20
|
+
type: :runtime
|
|
21
|
+
prerelease: false
|
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
23
|
+
requirements:
|
|
24
|
+
- - ">="
|
|
25
|
+
- !ruby/object:Gem::Version
|
|
26
|
+
version: '0'
|
|
13
27
|
- !ruby/object:Gem::Dependency
|
|
14
28
|
name: rbs
|
|
15
29
|
requirement: !ruby/object:Gem::Requirement
|