1
0
Fork 0

Full rubocop run (safe only)

Dieser Commit ist enthalten in:
angusmcleod 2021-02-24 18:50:42 +11:00
Ursprung 6f977049fc
Commit 484bd464d2
83 geänderte Dateien mit 985 neuen und 988 gelöschten Zeilen

Datei anzeigen

@ -85,7 +85,7 @@ class CustomWizard::AdminApiController < CustomWizard::AdminController
CustomWizard::Api::Authorization.set(params[:name], code: params[:code]) CustomWizard::Api::Authorization.set(params[:name], code: params[:code])
CustomWizard::Api::Authorization.get_token(params[:name]) CustomWizard::Api::Authorization.get_token(params[:name])
return redirect_to path('/admin/wizards/apis/' + params[:name]) redirect_to path('/admin/wizards/apis/' + params[:name])
end end
private private

Datei anzeigen

@ -465,7 +465,6 @@ class CustomWizard::Action
name = keyArr.first name = keyArr.first
end end
registered = registered_fields.select { |f| f[:name] == name } registered = registered_fields.select { |f| f[:name] == name }
if registered.first.present? if registered.first.present?
klass = registered.first[:klass] klass = registered.first[:klass]

Datei anzeigen

@ -106,11 +106,11 @@ class CustomWizard::Api::Authorization
connection = Excon.new( connection = Excon.new(
authorization.token_url, authorization.token_url,
:headers => { headers: {
"Content-Type" => "application/x-www-form-urlencoded" "Content-Type" => "application/x-www-form-urlencoded"
}, },
:method => 'GET', method: 'GET',
:query => URI.encode_www_form(body) query: URI.encode_www_form(body)
) )
begin begin
result = connection.request() result = connection.request()

Datei anzeigen

@ -125,7 +125,7 @@ class CustomWizard::Builder
if final_step if final_step
if @wizard.id == @wizard.user.custom_fields['redirect_to_wizard'] if @wizard.id == @wizard.user.custom_fields['redirect_to_wizard']
@wizard.user.custom_fields.delete('redirect_to_wizard'); @wizard.user.custom_fields.delete('redirect_to_wizard')
@wizard.user.save_custom_fields(true) @wizard.user.save_custom_fields(true)
end end

Datei anzeigen

@ -90,7 +90,6 @@ class ::CustomWizard::CustomField
add_error(I18n.t("#{i18n_key}.unsupported_type", type: value)) add_error(I18n.t("#{i18n_key}.unsupported_type", type: value))
end end
if attr == 'name' if attr == 'name'
unless value.is_a?(String) unless value.is_a?(String)
add_error(I18n.t("#{i18n_key}.name_invalid", name: value)) add_error(I18n.t("#{i18n_key}.name_invalid", name: value))

Datei anzeigen

@ -177,7 +177,7 @@ class CustomWizard::Wizard
def can_access? def can_access?
return false unless user return false unless user
return true if user.admin return true if user.admin
return permitted? && (multiple_submissions || !completed?) permitted? && (multiple_submissions || !completed?)
end end
def reset def reset

Datei anzeigen

@ -92,4 +92,3 @@ describe "custom field extensions" do
end end
end end
end end