-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #180 from fcheung/add-basic-devise-annotation
add basic devise annotation
- Loading branch information
Showing
2 changed files
with
147 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49,6 +49,8 @@ | |
}, | ||
"delayed_job": { | ||
}, | ||
"devise": { | ||
}, | ||
"elasticsearch-dsl": { | ||
"requires": [ | ||
"elasticsearch/dsl" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,145 @@ | ||
# typed: true | ||
|
||
# @shim: Devise controllers are loaded by rails | ||
class DeviseController | ||
protected | ||
|
||
sig {returns(T.untyped)} | ||
def resource; end | ||
|
||
# Proxy to devise map name | ||
sig {returns(String)} | ||
def resource_name; end | ||
|
||
sig {returns(String)} | ||
def scope_name; end | ||
|
||
# Proxy to devise map class | ||
sig {returns(T::Class[T.anything])} | ||
def resource_class; end | ||
|
||
# Returns a signed in resource from session (if one exists) | ||
sig {returns(T.untyped)} | ||
def signed_in_resource; end | ||
|
||
# Attempt to find the mapped route for devise based on request path | ||
sig {returns(T.untyped)} | ||
def devise_mapping; end | ||
|
||
sig {returns(T.untyped)} | ||
def navigational_formats; end | ||
|
||
sig {returns(ActionController::Parameters)} | ||
def resource_params; end | ||
|
||
sig {returns(String)} | ||
def translation_scope; end | ||
end | ||
|
||
# @shim: Devise controllers are loaded by rails | ||
class Devise::ConfirmationsController < DeviseController | ||
sig {returns(T.untyped)} | ||
def new; end | ||
# POST /resource/confirmation | ||
sig {returns(T.untyped)} | ||
def create; end | ||
# GET /resource/confirmation?confirmation_token=abcdef | ||
sig {returns(T.untyped)} | ||
def show; end | ||
end | ||
|
||
# @shim: Devise controllers are loaded by rails | ||
class Devise::PasswordsController < DeviseController | ||
# GET /resource/password/new | ||
sig {returns(T.untyped)} | ||
def new; end | ||
|
||
# POST /resource/password | ||
sig {returns(T.untyped)} | ||
def create; end | ||
|
||
# GET /resource/password/edit?reset_password_token=abcdef | ||
sig {returns(T.untyped)} | ||
def edit; end | ||
|
||
# PUT /resource/password | ||
sig {returns(T.untyped)} | ||
def update; end | ||
end | ||
|
||
# @shim: Devise controllers are loaded by rails | ||
class Devise::RegistrationsController < DeviseController | ||
sig {returns(T.untyped)} | ||
def new; end | ||
|
||
# POST /resource | ||
sig {returns(T.untyped)} | ||
def create; end | ||
|
||
# GET /resource/edit | ||
sig {returns(T.untyped)} | ||
def edit; end | ||
|
||
# PUT /resource | ||
# We need to use a copy of the resource because we don't want to change | ||
# the current user in place. | ||
sig {returns(T.untyped)} | ||
def update; end | ||
|
||
# DELETE /resource | ||
sig {returns(T.untyped)} | ||
def destroy; end | ||
|
||
# GET /resource/cancel | ||
# Forces the session data which is usually expired after sign | ||
# in to be expired now. This is useful if the user wants to | ||
# cancel oauth signing in/up in the middle of the process, | ||
# removing all OAuth session data. | ||
sig {returns(T.untyped)} | ||
def cancel; end | ||
end | ||
|
||
# @shim: Devise controllers are loaded by rails | ||
class Devise::SessionsController < DeviseController | ||
# GET /resource/sign_in | ||
sig {returns(T.untyped)} | ||
def new; end | ||
|
||
# POST /resource/sign_in | ||
sig {returns(T.untyped)} | ||
def create; end | ||
|
||
# DELETE /resource/sign_out | ||
sig {returns(T.untyped)} | ||
def destroy; end | ||
|
||
protected | ||
|
||
sig { returns(ActionController::Parameters)} | ||
def sign_in_params; end | ||
end | ||
|
||
# @shim: Devise controllers are loaded by rails | ||
class Devise::UnlocksController < DeviseController | ||
# GET /resource/unlock/new | ||
sig {returns(T.untyped)} | ||
def new; end | ||
|
||
# POST /resource/unlock | ||
sig {returns(T.untyped)} | ||
def create; end | ||
|
||
# GET /resource/unlock?unlock_token=abcdef | ||
sig {returns(T.untyped)} | ||
def show; end | ||
|
||
protected | ||
|
||
# The path used after sending unlock password instructions | ||
sig {params(resource: T.untyped).returns(String)} | ||
def after_sending_unlock_instructions_path_for(resource); end | ||
|
||
sig {params(resource: T.untyped).returns(String)} | ||
# The path used after unlocking the resource | ||
def after_unlock_path_for(resource); end | ||
end |