hello-gem/hello

View on GitHub

Showing 310 of 310 total issues

Assignment Branch Condition size for parse is too high. [26.44/15]
Open

def parse(user_agent_string)
obj = user_agent_parser.parse(user_agent_string)
a_browser = obj.to_s
a_os = obj.os.to_s
a_browser = "#{obj.name} #{obj.version && obj.version.major}".strip
Severity: Minor
Found in lib/hello/utils/device_name.rb by rubocop

Assignment Branch Condition size for create_layout_file is too high. [24.82/15]
Open

def create_layout_file
destination = 'app/views/layouts/application.html.erb'
 
answer = ask('Replace application.html.erb automatically? [Yn]')
answer_yes = answer.blank? || answer.downcase.starts_with?('y')

Block has too many lines. [49/25]
Open

Hello::Engine.routes.draw do
# root 'management/profiles#show'
 
#
# REGISTRATION
Severity: Minor
Found in config/routes.rb by rubocop

Method has too many lines. [15/10]
Open

def create_layout_file
destination = 'app/views/layouts/application.html.erb'
 
answer = ask('Replace application.html.erb automatically? [Yn]')
answer_yes = answer.blank? || answer.downcase.starts_with?('y')

Assignment Branch Condition size for destroy is too high. [19.26/15]
Open

def destroy
@cancel_account = Business::Management::CancelAccount.new(current_user)
 
if @cancel_account.cancel_account
flash[:notice] = @cancel_account.success_message

Method has too many lines. [14/10]
Open

def copy_locales
case
when selected_locales == []
puts_usage
puts

Method has too many lines. [14/10]
Open

def destroy
@cancel_account = Business::Management::CancelAccount.new(current_user)
 
if @cancel_account.cancel_account
flash[:notice] = @cancel_account.success_message

Method has too many lines. [14/10]
Open

def parse(user_agent_string)
obj = user_agent_parser.parse(user_agent_string)
a_browser = obj.to_s
a_os = obj.os.to_s
a_browser = "#{obj.name} #{obj.version && obj.version.major}".strip
Severity: Minor
Found in lib/hello/utils/device_name.rb by rubocop

Method has too many lines. [12/10]
Open

def update
@password_credential.password = password_credential_params[:password]
# @password_credential.password_confirmation = password_credential_params[:password_confirmation] if password_credential_params[:password_confirmation]
 
if @password_credential.save

Assignment Branch Condition size for update is too high. [17.06/15]
Open

def update
@password_credential.password = password_credential_params[:password]
# @password_credential.password_confirmation = password_credential_params[:password_confirmation] if password_credential_params[:password_confirmation]
 
if @password_credential.save

Assignment Branch Condition size for update is too high. [16.06/15]
Open

def update
if @user_business.update(user_params)
use_locale(current_user.locale)
flash[:notice] = @user_business.success_message
respond_to do |format|

Assignment Branch Condition size for copy_locales is too high. [16.28/15]
Open

def copy_locales
case
when selected_locales == []
puts_usage
puts

Assignment Branch Condition size for update is too high. [16.06/15]
Open

def update
business = Business::Internationalization::UpdateLocale.new(params['locale'])
 
current_user && current_user.update!(locale: business.locale)
use_locale(business.locale)

Method has too many lines. [11/10]
Open

def to_sign_in
respond_to do |format|
format.html do
hello_store_url_on_session!
redirect_to hello.sign_in_path

Cyclomatic complexity for current_access is too high. [7/6]
Open

def current_access
@current_access ||= begin
return nil unless string = param || header
return nil unless user_id = string.split('-').first
return nil unless user = ::User.find_by_id(user_id)

Method has too many lines. [11/10]
Open

def authenticate(login, password)
@ignited = true
@login = login
@password = password
 
 

Assignment Branch Condition size for hello_around_action is too high. [16.06/15]
Open

def hello_around_action(&block)
use_locale(nil)
 
if current_user
# begin keep-alive
Severity: Minor
Found in lib/hello/rails_controller.rb by rubocop

Assignment Branch Condition size for continue is too high. [15.03/15]
Open

def continue
respond_to do |format|
if update(params[:role])
format.html { redirect_to root_path, notice: 'Welcome!' }
format.json { render json: { user: current_user.as_json_web_api }, status: :ok }

Block has too many lines. [28/25]
Open

scope module: 'management' do
resources :accesses, only: [:index, :destroy]
 
root 'profiles#show'
resource :profile, only: [:show, :update, :destroy] do
Severity: Minor
Found in config/routes.rb by rubocop

Avoid too many return statements within this method.
Open

return nil unless model.active_token_or_destroy
Severity: Major
Found in lib/hello/request_manager/stateless.rb - About 30 mins to fix
Severity
Category
Status
Source
Language