Spiegel von
https://github.com/paviliondev/discourse-custom-wizard.git
synchronisiert 2024-11-09 20:02:54 +01:00
zeitwork compatibility
Dieser Commit ist enthalten in:
Ursprung
82d98892a3
Commit
954dea0af9
13 geänderte Dateien mit 10 neuen und 22 gelöschten Zeilen
|
@ -1,4 +1,4 @@
|
|||
class CustomWizard::StepsController < ApplicationController
|
||||
class CustomWizard::StepsController < ::ApplicationController
|
||||
before_action :ensure_logged_in
|
||||
|
||||
def update
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
module Jobs
|
||||
class ClearAfterTimeWizard < Jobs::Base
|
||||
class ClearAfterTimeWizard < ::Jobs::Base
|
||||
sidekiq_options queue: 'critical'
|
||||
|
||||
def execute(args)
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 = []
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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?
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
class CustomWizard::ApiSerializer < ApplicationSerializer
|
||||
class CustomWizard::ApiSerializer < ::ApplicationSerializer
|
||||
attributes :name,
|
||||
:title,
|
||||
:authorization,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
class CustomWizard::Api::AuthorizationSerializer < ApplicationSerializer
|
||||
class CustomWizard::Api::AuthorizationSerializer < ::ApplicationSerializer
|
||||
attributes :auth_type,
|
||||
:auth_url,
|
||||
:token_url,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
class CustomWizard::BasicApiSerializer < ApplicationSerializer
|
||||
class CustomWizard::BasicApiSerializer < ::ApplicationSerializer
|
||||
attributes :name,
|
||||
:title,
|
||||
:endpoints
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
class CustomWizard::Api::BasicEndpointSerializer < ApplicationSerializer
|
||||
class CustomWizard::Api::BasicEndpointSerializer < ::ApplicationSerializer
|
||||
attributes :id,
|
||||
:name
|
||||
end
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
class CustomWizard::Api::EndpointSerializer < ApplicationSerializer
|
||||
class CustomWizard::Api::EndpointSerializer < ::ApplicationSerializer
|
||||
attributes :id,
|
||||
:name,
|
||||
:method,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
class CustomWizard::Api::LogSerializer < ApplicationSerializer
|
||||
class CustomWizard::Api::LogSerializer < ::ApplicationSerializer
|
||||
attributes :log_id,
|
||||
:time,
|
||||
:status,
|
||||
|
|
Laden …
In neuem Issue referenzieren