rbs_devise 0.2.0 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/generators/rbs_devise/install_generator.rb +3 -0
- data/lib/rbs_devise/devise.rb +11 -9
- data/lib/rbs_devise/version.rb +1 -1
- data/rbs_collection.lock.yaml +29 -21
- data/rbs_collection.yaml +2 -0
- data/rbs_devise.gemspec +0 -1
- data/sig/rbs_devise/devise.rbs +4 -2
- data/sig/shims/thor.rbs +5 -0
- metadata +3 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fd4c536fbe59fc26ef81179db2db89569a7f8dd5e723b44a8839e17514596ea2
|
4
|
+
data.tar.gz: 77ed4e72d3c15f6205faa054c994bc1d791947942df57ba04de8b2c8f7bfa22d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e8dba99124059fd5fdbd66edf0383eebaeaa1a91f9641206c6b672709cae504e844e81b103c2db799f0c64c13ef9579c9dbe90795a8a7b4c7ea3bba999c7f9c4
|
7
|
+
data.tar.gz: b1cc1530f23b41d12522f4e590066762c740579c70c8f42a46a9eebc30c6a12cb18bd42dfead8717ac730da3169bc5f1b1290b8e3e9cf601126d8d7c3d039768
|
@@ -6,8 +6,11 @@ module RbsDevise
|
|
6
6
|
class InstallGenerator < ::Rails::Generators::Base
|
7
7
|
def create_raketask
|
8
8
|
create_file "lib/tasks/rbs_devise.rake", <<~RUBY
|
9
|
+
# frozen_string_literal: true
|
10
|
+
|
9
11
|
begin
|
10
12
|
require "rbs_devise/rake_task"
|
13
|
+
|
11
14
|
RbsDevise::RakeTask.new
|
12
15
|
rescue LoadError
|
13
16
|
# failed to load rbs_devise. Skip to load rbs_devise tasks.
|
data/lib/rbs_devise/devise.rb
CHANGED
@@ -2,7 +2,6 @@
|
|
2
2
|
|
3
3
|
require "devise"
|
4
4
|
require "rbs"
|
5
|
-
require "rbs_rails"
|
6
5
|
|
7
6
|
module RbsDevise
|
8
7
|
module Devise
|
@@ -18,13 +17,7 @@ module RbsDevise
|
|
18
17
|
|
19
18
|
class Generator
|
20
19
|
def generate
|
21
|
-
|
22
|
-
end
|
23
|
-
|
24
|
-
private
|
25
|
-
|
26
|
-
def klass_decl
|
27
|
-
<<~RBS
|
20
|
+
format <<~RBS
|
28
21
|
module Devise
|
29
22
|
#{devise_controllers_signinout_decl}
|
30
23
|
#{device_helpers_decl}
|
@@ -38,6 +31,15 @@ module RbsDevise
|
|
38
31
|
RBS
|
39
32
|
end
|
40
33
|
|
34
|
+
private
|
35
|
+
|
36
|
+
def format(rbs)
|
37
|
+
parsed = RBS::Parser.parse_signature(rbs)
|
38
|
+
StringIO.new.tap do |out|
|
39
|
+
RBS::Writer.new(out: out).write(parsed[1] + parsed[2])
|
40
|
+
end.string
|
41
|
+
end
|
42
|
+
|
41
43
|
def devise_controllers_signinout_decl
|
42
44
|
resource_type = resource_classes.join(" | ")
|
43
45
|
<<~RBS
|
@@ -117,7 +119,7 @@ module RbsDevise
|
|
117
119
|
def activerecord_base_decl
|
118
120
|
<<~RBS
|
119
121
|
class ActiveRecord::Base
|
120
|
-
|
122
|
+
extend Devise::Models
|
121
123
|
end
|
122
124
|
RBS
|
123
125
|
end
|
data/lib/rbs_devise/version.rb
CHANGED
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: 5666e737d2b27a8425b4e3855c1a38cae54989f7
|
6
6
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
7
7
|
repo_dir: gems
|
8
8
|
path: ".gem_rbs_collection"
|
@@ -12,7 +12,7 @@ gems:
|
|
12
12
|
source:
|
13
13
|
type: git
|
14
14
|
name: ruby/gem_rbs_collection
|
15
|
-
revision:
|
15
|
+
revision: 5666e737d2b27a8425b4e3855c1a38cae54989f7
|
16
16
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
17
17
|
repo_dir: gems
|
18
18
|
- name: actionpack
|
@@ -20,7 +20,7 @@ gems:
|
|
20
20
|
source:
|
21
21
|
type: git
|
22
22
|
name: ruby/gem_rbs_collection
|
23
|
-
revision:
|
23
|
+
revision: 5666e737d2b27a8425b4e3855c1a38cae54989f7
|
24
24
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
25
25
|
repo_dir: gems
|
26
26
|
- name: actionview
|
@@ -28,7 +28,7 @@ gems:
|
|
28
28
|
source:
|
29
29
|
type: git
|
30
30
|
name: ruby/gem_rbs_collection
|
31
|
-
revision:
|
31
|
+
revision: 5666e737d2b27a8425b4e3855c1a38cae54989f7
|
32
32
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
33
33
|
repo_dir: gems
|
34
34
|
- name: activejob
|
@@ -36,7 +36,7 @@ gems:
|
|
36
36
|
source:
|
37
37
|
type: git
|
38
38
|
name: ruby/gem_rbs_collection
|
39
|
-
revision:
|
39
|
+
revision: 5666e737d2b27a8425b4e3855c1a38cae54989f7
|
40
40
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
41
41
|
repo_dir: gems
|
42
42
|
- name: activemodel
|
@@ -44,7 +44,7 @@ gems:
|
|
44
44
|
source:
|
45
45
|
type: git
|
46
46
|
name: ruby/gem_rbs_collection
|
47
|
-
revision:
|
47
|
+
revision: 5666e737d2b27a8425b4e3855c1a38cae54989f7
|
48
48
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
49
49
|
repo_dir: gems
|
50
50
|
- name: activerecord
|
@@ -52,7 +52,7 @@ gems:
|
|
52
52
|
source:
|
53
53
|
type: git
|
54
54
|
name: ruby/gem_rbs_collection
|
55
|
-
revision:
|
55
|
+
revision: 5666e737d2b27a8425b4e3855c1a38cae54989f7
|
56
56
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
57
57
|
repo_dir: gems
|
58
58
|
- name: activestorage
|
@@ -60,7 +60,7 @@ gems:
|
|
60
60
|
source:
|
61
61
|
type: git
|
62
62
|
name: ruby/gem_rbs_collection
|
63
|
-
revision:
|
63
|
+
revision: 5666e737d2b27a8425b4e3855c1a38cae54989f7
|
64
64
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
65
65
|
repo_dir: gems
|
66
66
|
- name: activesupport
|
@@ -68,7 +68,7 @@ gems:
|
|
68
68
|
source:
|
69
69
|
type: git
|
70
70
|
name: ruby/gem_rbs_collection
|
71
|
-
revision:
|
71
|
+
revision: 5666e737d2b27a8425b4e3855c1a38cae54989f7
|
72
72
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
73
73
|
repo_dir: gems
|
74
74
|
- name: ast
|
@@ -76,7 +76,7 @@ gems:
|
|
76
76
|
source:
|
77
77
|
type: git
|
78
78
|
name: ruby/gem_rbs_collection
|
79
|
-
revision:
|
79
|
+
revision: 5666e737d2b27a8425b4e3855c1a38cae54989f7
|
80
80
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
81
81
|
repo_dir: gems
|
82
82
|
- name: base64
|
@@ -88,7 +88,7 @@ gems:
|
|
88
88
|
source:
|
89
89
|
type: git
|
90
90
|
name: ruby/gem_rbs_collection
|
91
|
-
revision:
|
91
|
+
revision: 5666e737d2b27a8425b4e3855c1a38cae54989f7
|
92
92
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
93
93
|
repo_dir: gems
|
94
94
|
- name: cgi
|
@@ -100,19 +100,23 @@ gems:
|
|
100
100
|
source:
|
101
101
|
type: git
|
102
102
|
name: ruby/gem_rbs_collection
|
103
|
-
revision:
|
103
|
+
revision: 5666e737d2b27a8425b4e3855c1a38cae54989f7
|
104
104
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
105
105
|
repo_dir: gems
|
106
106
|
- name: date
|
107
107
|
version: '0'
|
108
108
|
source:
|
109
109
|
type: stdlib
|
110
|
+
- name: erb
|
111
|
+
version: '0'
|
112
|
+
source:
|
113
|
+
type: stdlib
|
110
114
|
- name: globalid
|
111
115
|
version: '1.1'
|
112
116
|
source:
|
113
117
|
type: git
|
114
118
|
name: ruby/gem_rbs_collection
|
115
|
-
revision:
|
119
|
+
revision: 5666e737d2b27a8425b4e3855c1a38cae54989f7
|
116
120
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
117
121
|
repo_dir: gems
|
118
122
|
- name: i18n
|
@@ -120,7 +124,7 @@ gems:
|
|
120
124
|
source:
|
121
125
|
type: git
|
122
126
|
name: ruby/gem_rbs_collection
|
123
|
-
revision:
|
127
|
+
revision: 5666e737d2b27a8425b4e3855c1a38cae54989f7
|
124
128
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
125
129
|
repo_dir: gems
|
126
130
|
- name: json
|
@@ -136,7 +140,7 @@ gems:
|
|
136
140
|
source:
|
137
141
|
type: git
|
138
142
|
name: ruby/gem_rbs_collection
|
139
|
-
revision:
|
143
|
+
revision: 5666e737d2b27a8425b4e3855c1a38cae54989f7
|
140
144
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
141
145
|
repo_dir: gems
|
142
146
|
- name: minitest
|
@@ -156,7 +160,7 @@ gems:
|
|
156
160
|
source:
|
157
161
|
type: git
|
158
162
|
name: ruby/gem_rbs_collection
|
159
|
-
revision:
|
163
|
+
revision: 5666e737d2b27a8425b4e3855c1a38cae54989f7
|
160
164
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
161
165
|
repo_dir: gems
|
162
166
|
- name: openssl
|
@@ -168,15 +172,19 @@ gems:
|
|
168
172
|
source:
|
169
173
|
type: git
|
170
174
|
name: ruby/gem_rbs_collection
|
171
|
-
revision:
|
175
|
+
revision: 5666e737d2b27a8425b4e3855c1a38cae54989f7
|
172
176
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
173
177
|
repo_dir: gems
|
178
|
+
- name: pathname
|
179
|
+
version: '0'
|
180
|
+
source:
|
181
|
+
type: stdlib
|
174
182
|
- name: rack
|
175
183
|
version: '2.2'
|
176
184
|
source:
|
177
185
|
type: git
|
178
186
|
name: ruby/gem_rbs_collection
|
179
|
-
revision:
|
187
|
+
revision: 5666e737d2b27a8425b4e3855c1a38cae54989f7
|
180
188
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
181
189
|
repo_dir: gems
|
182
190
|
- name: rails-dom-testing
|
@@ -184,7 +192,7 @@ gems:
|
|
184
192
|
source:
|
185
193
|
type: git
|
186
194
|
name: ruby/gem_rbs_collection
|
187
|
-
revision:
|
195
|
+
revision: 5666e737d2b27a8425b4e3855c1a38cae54989f7
|
188
196
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
189
197
|
repo_dir: gems
|
190
198
|
- name: railties
|
@@ -192,7 +200,7 @@ gems:
|
|
192
200
|
source:
|
193
201
|
type: git
|
194
202
|
name: ruby/gem_rbs_collection
|
195
|
-
revision:
|
203
|
+
revision: 5666e737d2b27a8425b4e3855c1a38cae54989f7
|
196
204
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
197
205
|
repo_dir: gems
|
198
206
|
- name: rainbow
|
@@ -200,7 +208,7 @@ gems:
|
|
200
208
|
source:
|
201
209
|
type: git
|
202
210
|
name: ruby/gem_rbs_collection
|
203
|
-
revision:
|
211
|
+
revision: 5666e737d2b27a8425b4e3855c1a38cae54989f7
|
204
212
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
205
213
|
repo_dir: gems
|
206
214
|
- name: securerandom
|
data/rbs_collection.yaml
CHANGED
data/rbs_devise.gemspec
CHANGED
@@ -30,7 +30,6 @@ Gem::Specification.new do |spec|
|
|
30
30
|
|
31
31
|
spec.add_dependency "devise"
|
32
32
|
spec.add_dependency "rails"
|
33
|
-
spec.add_dependency "rbs_rails"
|
34
33
|
|
35
34
|
# For more information and examples about making a new gem, check out our
|
36
35
|
# guide at: https://bundler.io/guides/creating_gem.html
|
data/sig/rbs_devise/devise.rbs
CHANGED
@@ -8,13 +8,15 @@ module RbsDevise
|
|
8
8
|
|
9
9
|
private
|
10
10
|
|
11
|
-
def
|
12
|
-
def sessions_controller_decl: () -> String
|
11
|
+
def format: (String rbs) -> String
|
13
12
|
def devise_controllers_signinout_decl: () -> String
|
14
13
|
def device_helpers_decl: () -> String
|
15
14
|
def device_helpers_methods: () -> String
|
15
|
+
def device_models_decl: () -> String
|
16
16
|
def devise_controller_decl: () -> String
|
17
|
+
def devise_sessions_controller_decl: () -> String
|
17
18
|
def actioncontroller_base_decl: () -> String
|
19
|
+
def activerecord_base_decl: () -> String
|
18
20
|
def parent_controller: () -> String
|
19
21
|
def resource_classes: () -> Array[String]
|
20
22
|
end
|
data/sig/shims/thor.rbs
ADDED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rbs_devise
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
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-
|
11
|
+
date: 2023-09-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: devise
|
@@ -38,20 +38,6 @@ dependencies:
|
|
38
38
|
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
|
-
- !ruby/object:Gem::Dependency
|
42
|
-
name: rbs_rails
|
43
|
-
requirement: !ruby/object:Gem::Requirement
|
44
|
-
requirements:
|
45
|
-
- - ">="
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
version: '0'
|
48
|
-
type: :runtime
|
49
|
-
prerelease: false
|
50
|
-
version_requirements: !ruby/object:Gem::Requirement
|
51
|
-
requirements:
|
52
|
-
- - ">="
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
version: '0'
|
55
41
|
description: A RBS files generator for discard gem
|
56
42
|
email:
|
57
43
|
- i.tkomiya@gmail.com
|
@@ -81,6 +67,7 @@ files:
|
|
81
67
|
- sig/rbs_devise/devise.rbs
|
82
68
|
- sig/rbs_devise/rake_task.rbs
|
83
69
|
- sig/shims/rake.rbs
|
70
|
+
- sig/shims/thor.rbs
|
84
71
|
homepage: https://github.com/tk0miya/rbs_devise
|
85
72
|
licenses:
|
86
73
|
- MIT
|