Full rubocop run (safe only)
Dieser Commit ist enthalten in:
Ursprung
6f977049fc
Commit
484bd464d2
83 geänderte Dateien mit 985 neuen und 988 gelöschten Zeilen
|
@ -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
|
||||||
|
|
|
@ -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]
|
||||||
|
|
|
@ -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()
|
||||||
|
|
|
@ -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
|
||||||
|
|
||||||
|
|
|
@ -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))
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -92,4 +92,3 @@ describe "custom field extensions" do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Laden …
In neuem Issue referenzieren