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
|
before_action :ensure_logged_in
|
||||||
|
|
||||||
def update
|
def update
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
module Jobs
|
module Jobs
|
||||||
class ClearAfterTimeWizard < Jobs::Base
|
class ClearAfterTimeWizard < ::Jobs::Base
|
||||||
sidekiq_options queue: 'critical'
|
sidekiq_options queue: 'critical'
|
||||||
|
|
||||||
def execute(args)
|
def execute(args)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
module Jobs
|
module Jobs
|
||||||
class RefreshApiAccessToken < Jobs::Base
|
class RefreshApiAccessToken < ::Jobs::Base
|
||||||
def execute(args)
|
def execute(args)
|
||||||
CustomWizard::Api::Authorization.get_token(args[:name], refresh: true)
|
CustomWizard::Api::Authorization.get_token(args[:name], refresh: true)
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
module Jobs
|
module Jobs
|
||||||
class SetAfterTimeWizard < Jobs::Base
|
class SetAfterTimeWizard < ::Jobs::Base
|
||||||
def execute(args)
|
def execute(args)
|
||||||
if CustomWizard::Wizard.find(args[:wizard_id])
|
if CustomWizard::Wizard.find(args[:wizard_id])
|
||||||
user_ids = []
|
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
|
class CustomWizard::Wizard
|
||||||
|
|
||||||
attr_reader :steps, :user
|
attr_reader :steps, :user
|
||||||
|
|
|
@ -1,7 +1,3 @@
|
||||||
require_dependency 'wizard'
|
|
||||||
require_dependency 'wizard/field'
|
|
||||||
require_dependency 'wizard/step'
|
|
||||||
|
|
||||||
::Wizard.class_eval do
|
::Wizard.class_eval do
|
||||||
def self.user_requires_completion?(user)
|
def self.user_requires_completion?(user)
|
||||||
wizard_result = self.new(user).requires_completion?
|
wizard_result = self.new(user).requires_completion?
|
||||||
|
|
|
@ -36,7 +36,6 @@ end
|
||||||
after_initialize do
|
after_initialize do
|
||||||
UserHistory.actions[:custom_wizard_step] = 1000
|
UserHistory.actions[:custom_wizard_step] = 1000
|
||||||
|
|
||||||
require_dependency 'application_controller'
|
|
||||||
module ::CustomWizard
|
module ::CustomWizard
|
||||||
class Engine < ::Rails::Engine
|
class Engine < ::Rails::Engine
|
||||||
engine_name 'custom_wizard'
|
engine_name 'custom_wizard'
|
||||||
|
@ -52,7 +51,6 @@ after_initialize do
|
||||||
put ':wizard_id/steps/:step_id' => 'steps#update'
|
put ':wizard_id/steps/:step_id' => 'steps#update'
|
||||||
end
|
end
|
||||||
|
|
||||||
require_dependency 'admin_constraint'
|
|
||||||
Discourse::Application.routes.append do
|
Discourse::Application.routes.append do
|
||||||
mount ::CustomWizard::Engine, at: 'w'
|
mount ::CustomWizard::Engine, at: 'w'
|
||||||
post 'wizard/authorization/callback' => "custom_wizard/authorization#callback"
|
post 'wizard/authorization/callback' => "custom_wizard/authorization#callback"
|
||||||
|
@ -139,7 +137,6 @@ after_initialize do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
require_dependency 'invites_controller'
|
|
||||||
class ::InvitesController
|
class ::InvitesController
|
||||||
prepend InvitesControllerCustomWizard
|
prepend InvitesControllerCustomWizard
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class CustomWizard::ApiSerializer < ApplicationSerializer
|
class CustomWizard::ApiSerializer < ::ApplicationSerializer
|
||||||
attributes :name,
|
attributes :name,
|
||||||
:title,
|
:title,
|
||||||
:authorization,
|
:authorization,
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class CustomWizard::Api::AuthorizationSerializer < ApplicationSerializer
|
class CustomWizard::Api::AuthorizationSerializer < ::ApplicationSerializer
|
||||||
attributes :auth_type,
|
attributes :auth_type,
|
||||||
:auth_url,
|
:auth_url,
|
||||||
:token_url,
|
:token_url,
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class CustomWizard::BasicApiSerializer < ApplicationSerializer
|
class CustomWizard::BasicApiSerializer < ::ApplicationSerializer
|
||||||
attributes :name,
|
attributes :name,
|
||||||
:title,
|
:title,
|
||||||
:endpoints
|
:endpoints
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class CustomWizard::Api::BasicEndpointSerializer < ApplicationSerializer
|
class CustomWizard::Api::BasicEndpointSerializer < ::ApplicationSerializer
|
||||||
attributes :id,
|
attributes :id,
|
||||||
:name
|
:name
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class CustomWizard::Api::EndpointSerializer < ApplicationSerializer
|
class CustomWizard::Api::EndpointSerializer < ::ApplicationSerializer
|
||||||
attributes :id,
|
attributes :id,
|
||||||
:name,
|
:name,
|
||||||
:method,
|
:method,
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
class CustomWizard::Api::LogSerializer < ApplicationSerializer
|
class CustomWizard::Api::LogSerializer < ::ApplicationSerializer
|
||||||
attributes :log_id,
|
attributes :log_id,
|
||||||
:time,
|
:time,
|
||||||
:status,
|
:status,
|
||||||
|
|
Laden …
In neuem Issue referenzieren