forked from zammad/zammad
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Maintenance: Hide experimental mobile app behind an ENV switch.
- Loading branch information
1 parent
cc963eb
commit 1ddec70
Showing
12 changed files
with
91 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,6 +36,8 @@ variables: | |
MAIL_SERVER_EMAIL: "[email protected]" | ||
KEEP_ON_MAIL_SERVER: "mail" | ||
KEEP_ON_MAIL_SERVER_ACCOUNT: "[email protected]:zammad" | ||
# Temporary switch to enable the mobile front end for testing. | ||
ENABLE_EXPERIMENTAL_MOBILE_FRONTEND: 'true' | ||
|
||
# Cache gems in between jobs and pipelines | ||
# ATTENTION: We use a combination of the Ruby major and minor version number | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,30 @@ | ||
# Copyright (C) 2012-2022 Zammad Foundation, https://zammad-foundation.org/ | ||
|
||
if ENV['REDIS_URL'].present? | ||
Rails.application.config.action_cable.cable = { | ||
'adapter' => 'redis', | ||
'url' => ENV['REDIS_URL'], | ||
'channel_prefix' => "zammad_#{Rails.env}" | ||
} | ||
Rails.logger.info 'Using the "Redis" adapter for ActionCable.' | ||
else | ||
if ActiveRecord::Base.connection_config[:adapter] == 'mysql' | ||
raise 'Please provide a working redis instance via REDIS_URL - this is required on MySQL databases.' | ||
end | ||
|
||
# The 'postgresql' adapter does not work correctly in Capybara currently, so use | ||
# 'test' instead. | ||
if Rails.env.test? | ||
if ENV['ENABLE_EXPERIMENTAL_MOBILE_FRONTEND'] == 'true' | ||
if ENV['REDIS_URL'].present? | ||
Rails.application.config.action_cable.cable = { | ||
'adapter' => 'test', | ||
'adapter' => 'redis', | ||
'url' => ENV['REDIS_URL'], | ||
'channel_prefix' => "zammad_#{Rails.env}" | ||
} | ||
Rails.logger.info 'Using the "test" adapter for ActionCable.' | ||
Rails.logger.info 'Using the "Redis" adapter for ActionCable.' | ||
else | ||
Rails.application.config.action_cable.cable = { | ||
'adapter' => 'postgresql', | ||
} | ||
Rails.logger.info 'Using the "PostgreSQL" adapter for ActionCable.' | ||
if ActiveRecord::Base.connection_db_config.configuration_hash[:adapter] == 'mysql' | ||
raise 'Please provide a working redis instance via REDIS_URL - this is required on MySQL databases.' | ||
end | ||
|
||
# The 'postgresql' adapter does not work correctly in Capybara currently, so use | ||
# 'test' instead. | ||
if Rails.env.test? | ||
Rails.application.config.action_cable.cable = { | ||
'adapter' => 'test', | ||
} | ||
Rails.logger.info 'Using the "test" adapter for ActionCable.' | ||
else | ||
Rails.application.config.action_cable.cable = { | ||
'adapter' => 'postgresql', | ||
} | ||
Rails.logger.info 'Using the "PostgreSQL" adapter for ActionCable.' | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,10 @@ | ||
# Copyright (C) 2012-2022 Zammad Foundation, https://zammad-foundation.org/ | ||
|
||
Zammad::Application.routes.draw do | ||
match '/graphql', to: 'graphql#execute', via: %i[options post] | ||
# Temporary Hack: only process trigger events if ActionCable is enabled. | ||
# TODO: Remove when this switch is not needed any more. | ||
|
||
if ENV['ENABLE_EXPERIMENTAL_MOBILE_FRONTEND'] == 'true' | ||
Zammad::Application.routes.draw do | ||
match '/graphql', to: 'graphql#execute', via: %i[options post] | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,11 @@ | ||
# Copyright (C) 2012-2022 Zammad Foundation, https://zammad-foundation.org/ | ||
|
||
Zammad::Application.routes.draw do | ||
get '/mobile', to: 'mobile#index' | ||
get '/mobile/*path', to: 'mobile#index' | ||
# Temporary Hack: only process trigger events if ActionCable is enabled. | ||
# TODO: Remove when this switch is not needed any more. | ||
|
||
if ENV['ENABLE_EXPERIMENTAL_MOBILE_FRONTEND'] == 'true' | ||
Zammad::Application.routes.draw do | ||
get '/mobile', to: 'mobile#index' | ||
get '/mobile/*path', to: 'mobile#index' | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters