-
-
Notifications
You must be signed in to change notification settings - Fork 87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Api docs (and rubocop) #5
Conversation
test/test_helper.rb
Outdated
ActionDispatch::IntegrationTest.fixture_path = ActiveSupport::TestCase.fixture_path | ||
ActiveSupport::TestCase.file_fixture_path = ActiveSupport::TestCase.fixture_path + "/files" | ||
ActiveSupport::TestCase.file_fixture_path = ActiveSupport::TestCase.fixture_path + '/files' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line is too long. [93/80]
test/test_helper.rb
Outdated
# Load fixtures from the engine | ||
if ActiveSupport::TestCase.respond_to?(:fixture_path=) | ||
ActiveSupport::TestCase.fixture_path = File.expand_path("../fixtures", __FILE__) | ||
ActiveSupport::TestCase.fixture_path = File.expand_path('../fixtures', __FILE__) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line is too long. [82/80]
test/test_helper.rb
Outdated
# frozen_string_literal: true | ||
|
||
require File.expand_path('../../test/dummy/config/environment.rb', __FILE__) | ||
ActiveRecord::Migrator.migrations_paths = [File.expand_path('../../test/dummy/db/migrate', __FILE__)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line is too long. [101/80]
test/passwordless_for_test.rb
Outdated
{ method: :get, path: "/users/sign_in/abc123" }, | ||
{ controller: 'passwordless/sessions', action: 'show', params: { token: 'abc123' }, authenticatable: 'user' } | ||
{ method: :get, path: '/users/sign_in/abc123' }, | ||
controller: 'passwordless/sessions', action: 'show', params: { token: 'abc123' }, authenticatable: 'user' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line is too long. [115/80]
test/passwordless_for_test.rb
Outdated
{ method: :delete, path: "/users/sign_out" }, | ||
{ controller: 'passwordless/sessions', action: 'destroy', authenticatable: 'user' } | ||
{ method: :delete, path: '/users/sign_out' }, | ||
controller: 'passwordless/sessions', action: 'destroy', authenticatable: 'user' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line is too long. [87/80]
test/passwordless_for_test.rb
Outdated
{ method: :post, path: "/users/sign_in", params: { passwordless: { email: 'a@a' } } }, | ||
{ controller: 'passwordless/sessions', action: 'create', authenticatable: 'user' } | ||
{ method: :post, path: '/users/sign_in', params: { passwordless: { email: 'a@a' } } }, | ||
controller: 'passwordless/sessions', action: 'create', authenticatable: 'user' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line is too long. [86/80]
test/passwordless_for_test.rb
Outdated
) | ||
assert_routes( | ||
{ method: :post, path: "/users/sign_in", params: { passwordless: { email: 'a@a' } } }, | ||
{ controller: 'passwordless/sessions', action: 'create', authenticatable: 'user' } | ||
{ method: :post, path: '/users/sign_in', params: { passwordless: { email: 'a@a' } } }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line is too long. [94/80]
test/passwordless_for_test.rb
Outdated
{ method: :get, path: "/users/sign_in" }, | ||
{ controller: 'passwordless/sessions', action: 'new', authenticatable: 'user' } | ||
{ method: :get, path: '/users/sign_in' }, | ||
controller: 'passwordless/sessions', action: 'new', authenticatable: 'user' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line is too long. [83/80]
authenticatable: User.create(email: 'session_test_valid@a') | ||
remote_addr: '0.0.0.0', | ||
user_agent: 'wooden box', | ||
authenticatable: User.create(email: 'session_test_valid@a') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line is too long. [83/80]
app/mailers/passwordless/mailer.rb
Outdated
@@ -11,7 +13,7 @@ def magic_link(session) | |||
send(authenticatable_resource_name).token_sign_in_url(session.token) | |||
|
|||
email_field = @session.authenticatable.class.passwordless_email_field | |||
mail to: @session.authenticatable.send(email_field), subject: "Your magic link ✨" | |||
mail to: @session.authenticatable.send(email_field), subject: 'Your magic link ✨' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line is too long. [87/80]
I have started working on adding documentation. I just want to make sure that the style is aligned with what you are looking for :-) Here is a link to the api-docs branch on my fork. If/When you have a minute to look it over, your feedback would be amazing. Again Thanks for letting me contribute! |
What does this method return? I want to make sure I understand what
Thanks! |
@mftaff It comes from this: https://github.com/mikker/passwordless/blob/master/lib/passwordless/router_helpers.rb#L8 It gets defined when the user does |
@mikker A bit of a technical question... |
The easiest way is probably to create a pull request from your fork. It's based off of this branch, right? Then we can just merge that and delete this PR. |
Merged in #7 |
No description provided.