-
Notifications
You must be signed in to change notification settings - Fork 8
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
Password sign in refactoring #218
Conversation
@@ -0,0 +1,20 @@ | |||
require 'rails_helper' |
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.
Style/FrozenStringLiteralComment: Missing magic comment # frozen_string_literal: true.
@@ -0,0 +1,15 @@ | |||
module Web |
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.
Style/FrozenStringLiteralComment: Missing magic comment # frozen_string_literal: true.
Code Climate has analyzed commit 03f1e58 and detected 2 issues on this pull request. Here's the issue category breakdown:
The test coverage on the diff in this pull request is 100.0% (50% is the threshold). This pull request will bring the total coverage in the repository to 99.1% (0.0% change). View more on Code Climate. |
%h3.masthead-brand= t('landing.brand') | ||
%nav.nav.nav-masthead.justify-content-center | ||
= nav_link t('landing.navigation.home'), root_landing_url, subdomain: 'www', id: 'home' | ||
= link_to t('landing.navigation.dashboard'), dashboard_root_url, class: 'nav-link' if policy(:dashboard).allowed? |
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. [125/120]
|
||
%main.inner.cover{:role => "main"} | ||
- if flash.alert | ||
.alert.alert-danger{role: 'alert'} |
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.
Hash attribute should start with one space after the opening brace
Hash attribute should end with one space before the closing brace
= link_to t('landing.navigation.dashboard'), dashboard_root_url, class: 'nav-link' if policy(:dashboard).allowed? | ||
= link_to t('landing.navigation.logout'), logout_url, method: :delete, class: 'nav-link' if current_user | ||
|
||
%main.inner.cover{:role => "main"} |
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.
Hash attribute should start with one space after the opening brace
Hash attribute should end with one space before the closing brace
app/operations/ops/author/sign_up.rb
Outdated
@@ -0,0 +1,17 @@ | |||
module Ops | |||
module Author | |||
class SignUp < BaseOperation |
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.
Style/Documentation: Missing top-level class documentation comment.
@@ -0,0 +1,17 @@ | |||
module Ops |
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.
Style/FrozenStringLiteralComment: Missing magic comment # frozen_string_literal: true.
@@ -0,0 +1,2 @@ | |||
class BaseForm < Reform::Form |
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.
Style/FrozenStringLiteralComment: Missing magic comment # frozen_string_literal: true.
app/forms/author/registration.rb
Outdated
@@ -0,0 +1,19 @@ | |||
module Author | |||
class Registration < BaseForm |
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.
Style/Documentation: Missing top-level class documentation comment.
app/forms/author/registration.rb
Outdated
@@ -0,0 +1,19 @@ | |||
module Author |
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.
Style/FrozenStringLiteralComment: Missing magic comment # frozen_string_literal: true.
|
||
def author_params | ||
params.require(:user) | ||
.permit(:email, :first_name, :last_name, :location, :timezone, :password) |
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.
Layout/MultilineMethodCallIndentation: Align .permit with .require on line 25.
|
||
def author_params | ||
params.require(:user) | ||
.permit(:email, :first_name, :last_name, :location, :timezone, :password) |
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.
Layout/MultilineMethodCallIndentation: Align .permit with .require on line 24.
end | ||
|
||
it 'does not create new user' do | ||
expect { post :create, params: params } |
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.
Lint/AmbiguousBlockAssociation: Parenthesize the param change { User.count } to make sure that the block will be associated with the change method call.
@@ -0,0 +1,102 @@ | |||
require 'rails_helper' |
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.
Style/FrozenStringLiteralComment: Missing magic comment # frozen_string_literal: true.
|
||
def author_params | ||
params.require(:user) | ||
.permit(:email, :first_name, :last_name, :location, :timezone, :password) |
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.
Layout/MultilineMethodCallIndentation: Align .permit with .require on line 24.
end | ||
|
||
it 'does not create new user' do | ||
expect { post :create, params: params } |
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.
Lint/AmbiguousBlockAssociation: Parenthesize the param change { User.count } to make sure that the block will be associated with the change method call.
@@ -0,0 +1,102 @@ | |||
require 'rails_helper' |
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.
Style/FrozenStringLiteralComment: Missing magic comment # frozen_string_literal: true.
Issue #179
Description
Adds the ability of password authentication/registration in Ideas namespace.
Also introduces form objects for users profile registration.
Testing steps
Features PR URL
PR #8
Checklist
Make sure that all steps a checked before the merge
bin/cop -a
does not return any warnings