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.get_token(params[:name])
return redirect_to path('/admin/wizards/apis/' + params[:name])
redirect_to path('/admin/wizards/apis/' + params[:name])
end
private

Datei anzeigen

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

Datei anzeigen

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

Datei anzeigen

@ -125,7 +125,7 @@ class CustomWizard::Builder
if final_step
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)
end

Datei anzeigen

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

Datei anzeigen

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

Datei anzeigen

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