FIX: Make Discourse.redis change backwards compatible
25ea0b3a
broke docker manager when it was run against earlier versions
of Discourse, this attempts to work around the issue by introducing
the method if it is missing.
This commit is contained in:
parent
57f3864e7a
commit
1356552674
10
plugin.rb
10
plugin.rb
|
@ -6,6 +6,16 @@
|
|||
# authors: Robin Ward, Sam Saffron
|
||||
# url: https://github.com/discourse/docker_manager
|
||||
|
||||
|
||||
if !defined? ::Discourse.redis
|
||||
# HACK: make Discourse.redis work on old versions of Discourse
|
||||
module ::Discourse
|
||||
def self.redis
|
||||
$redis # rubocop:disable Style/GlobalVars
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
module ::DockerManager
|
||||
# should be automatic, but something is weird
|
||||
load File.expand_path(File.dirname(__FILE__)) + '/app/helpers/application_helper.rb'
|
||||
|
|
Loading…
Reference in New Issue