Skip to content
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

Merged
merged 10 commits into from
Jun 21, 2018
Merged

Password sign in refactoring #218

merged 10 commits into from
Jun 21, 2018

Conversation

Mehonoshin
Copy link
Member

@Mehonoshin Mehonoshin commented Jun 15, 2018

Issue #179

Description

Adds the ability of password authentication/registration in Ideas namespace.
Also introduces form objects for users profile registration.

Testing steps

  • Visit [idea.lvh.me:3000/sessions/new]
  • Visit [idea.lvh.me:3000/registrations/new]
  • Test how profile step in sign in wizard works
  • Test user profile editing in dashboard
  • Test how the staff can edit user

Features PR URL

PR #8

Checklist

Make sure that all steps a checked before the merge

  • RSpec tests are passing on CI
  • Cucumber features are passing localy
  • bin/cop -a does not return any warnings
  • Tested manually

@Mehonoshin Mehonoshin added the WIP label Jun 15, 2018
@Mehonoshin Mehonoshin self-assigned this Jun 15, 2018
@@ -0,0 +1,20 @@
require 'rails_helper'

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

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.

@codeclimate
Copy link

codeclimate bot commented Jun 15, 2018

Code Climate has analyzed commit 03f1e58 and detected 2 issues on this pull request.

Here's the issue category breakdown:

Category Count
Complexity 1
Style 1

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?

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'}

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"}

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

@@ -0,0 +1,17 @@
module Ops
module Author
class SignUp < BaseOperation

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

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

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,19 @@
module Author
class Registration < BaseForm

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,19 @@
module Author

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)

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)

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 }

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'

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)

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 }

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'

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.

@Mehonoshin Mehonoshin removed the WIP label Jun 21, 2018
@Mehonoshin Mehonoshin merged commit 3a2abfb into master Jun 21, 2018
@Mehonoshin Mehonoshin deleted the email-password-auth branch June 21, 2018 18:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants