mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-30 19:08:10 -05:00
0b94c3c456
SiteSetting no longer persisted across tests
31 lines
438 B
Ruby
31 lines
438 B
Ruby
module SiteSettings; end
|
|
|
|
class SiteSettings::LocalProcessProvider
|
|
|
|
Setting = Struct.new(:name, :value, :data_type)
|
|
|
|
def initialize
|
|
@settings = {}
|
|
end
|
|
|
|
def all
|
|
@settings.values
|
|
end
|
|
|
|
def find(name)
|
|
@settings[name]
|
|
end
|
|
|
|
def save(name, value, data_type)
|
|
@settings[name] = Setting.new(name,value, data_type)
|
|
end
|
|
|
|
def destroy(name)
|
|
@settings.delete(name)
|
|
end
|
|
|
|
def current_site
|
|
"test"
|
|
end
|
|
|
|
end
|