1
0
Fork 0

zeitwork compatibility

Dieser Commit ist enthalten in:
Angus McLeod 2019-10-03 15:17:21 +10:00
Ursprung 82d98892a3
Commit 954dea0af9
13 geänderte Dateien mit 10 neuen und 22 gelöschten Zeilen

Datei anzeigen

@ -1,4 +1,4 @@
class CustomWizard::StepsController < ApplicationController
class CustomWizard::StepsController < ::ApplicationController
before_action :ensure_logged_in
def update

Datei anzeigen

@ -1,5 +1,5 @@
module Jobs
class ClearAfterTimeWizard < Jobs::Base
class ClearAfterTimeWizard < ::Jobs::Base
sidekiq_options queue: 'critical'
def execute(args)

Datei anzeigen

@ -1,5 +1,5 @@
module Jobs
class RefreshApiAccessToken < Jobs::Base
class RefreshApiAccessToken < ::Jobs::Base
def execute(args)
CustomWizard::Api::Authorization.get_token(args[:name], refresh: true)
end

Datei anzeigen

@ -1,5 +1,5 @@
module Jobs
class SetAfterTimeWizard < Jobs::Base
class SetAfterTimeWizard < ::Jobs::Base
def execute(args)
if CustomWizard::Wizard.find(args[:wizard_id])
user_ids = []

Datei anzeigen

@ -1,8 +1,3 @@
require_dependency 'wizard/step'
require_dependency 'wizard/field'
require_dependency 'wizard/step_updater'
require_dependency 'wizard/builder'
class CustomWizard::Wizard
attr_reader :steps, :user

Datei anzeigen

@ -1,7 +1,3 @@
require_dependency 'wizard'
require_dependency 'wizard/field'
require_dependency 'wizard/step'
::Wizard.class_eval do
def self.user_requires_completion?(user)
wizard_result = self.new(user).requires_completion?

Datei anzeigen

@ -36,7 +36,6 @@ end
after_initialize do
UserHistory.actions[:custom_wizard_step] = 1000
require_dependency 'application_controller'
module ::CustomWizard
class Engine < ::Rails::Engine
engine_name 'custom_wizard'
@ -52,7 +51,6 @@ after_initialize do
put ':wizard_id/steps/:step_id' => 'steps#update'
end
require_dependency 'admin_constraint'
Discourse::Application.routes.append do
mount ::CustomWizard::Engine, at: 'w'
post 'wizard/authorization/callback' => "custom_wizard/authorization#callback"
@ -139,7 +137,6 @@ after_initialize do
end
end
require_dependency 'invites_controller'
class ::InvitesController
prepend InvitesControllerCustomWizard
end

Datei anzeigen

@ -1,4 +1,4 @@
class CustomWizard::ApiSerializer < ApplicationSerializer
class CustomWizard::ApiSerializer < ::ApplicationSerializer
attributes :name,
:title,
:authorization,

Datei anzeigen

@ -1,4 +1,4 @@
class CustomWizard::Api::AuthorizationSerializer < ApplicationSerializer
class CustomWizard::Api::AuthorizationSerializer < ::ApplicationSerializer
attributes :auth_type,
:auth_url,
:token_url,

Datei anzeigen

@ -1,4 +1,4 @@
class CustomWizard::BasicApiSerializer < ApplicationSerializer
class CustomWizard::BasicApiSerializer < ::ApplicationSerializer
attributes :name,
:title,
:endpoints

Datei anzeigen

@ -1,4 +1,4 @@
class CustomWizard::Api::BasicEndpointSerializer < ApplicationSerializer
class CustomWizard::Api::BasicEndpointSerializer < ::ApplicationSerializer
attributes :id,
:name
end

Datei anzeigen

@ -1,4 +1,4 @@
class CustomWizard::Api::EndpointSerializer < ApplicationSerializer
class CustomWizard::Api::EndpointSerializer < ::ApplicationSerializer
attributes :id,
:name,
:method,

Datei anzeigen

@ -1,4 +1,4 @@
class CustomWizard::Api::LogSerializer < ApplicationSerializer
class CustomWizard::Api::LogSerializer < ::ApplicationSerializer
attributes :log_id,
:time,
:status,