Removed setting for statistics, showing both instead.
This commit is contained in:
parent
03f3c74cee
commit
acc7377e5f
4 changed files with 7 additions and 11 deletions
|
|
@ -19,10 +19,8 @@ class StatisticsPresenter
|
||||||
result['local_comments'] = self.local_comments
|
result['local_comments'] = self.local_comments
|
||||||
end
|
end
|
||||||
result["services"] = Configuration::KNOWN_SERVICES.select {|service| AppConfig["services.#{service}.enable"]}.map(&:to_s)
|
result["services"] = Configuration::KNOWN_SERVICES.select {|service| AppConfig["services.#{service}.enable"]}.map(&:to_s)
|
||||||
if AppConfig.privacy.statistics.deprecated_format?
|
Configuration::KNOWN_SERVICES.each do |service, options|
|
||||||
Configuration::KNOWN_SERVICES.each do |service, options|
|
result[service.to_s] = AppConfig["services.#{service}.enable"]
|
||||||
result[service.to_s] = AppConfig["services.#{service}.enable"]
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
result
|
result
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,6 @@ defaults:
|
||||||
user_counts: false
|
user_counts: false
|
||||||
post_counts: false
|
post_counts: false
|
||||||
comment_counts: false
|
comment_counts: false
|
||||||
deprecated_format: true
|
|
||||||
settings:
|
settings:
|
||||||
pod_name: 'diaspora*'
|
pod_name: 'diaspora*'
|
||||||
enable_registrations: true
|
enable_registrations: true
|
||||||
|
|
|
||||||
|
|
@ -210,9 +210,6 @@ configuration: ## Section
|
||||||
#post_counts: true
|
#post_counts: true
|
||||||
#comment_counts: true
|
#comment_counts: true
|
||||||
|
|
||||||
## Also show old services block (enabled by default)
|
|
||||||
#deprecated_format: false
|
|
||||||
|
|
||||||
## General settings
|
## General settings
|
||||||
settings: ## Section
|
settings: ## Section
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,6 @@ describe StatisticsPresenter do
|
||||||
AppConfig.privacy.statistics.user_counts = false
|
AppConfig.privacy.statistics.user_counts = false
|
||||||
AppConfig.privacy.statistics.post_counts = false
|
AppConfig.privacy.statistics.post_counts = false
|
||||||
AppConfig.privacy.statistics.comment_counts = false
|
AppConfig.privacy.statistics.comment_counts = false
|
||||||
AppConfig.privacy.statistics.deprecated_format = false
|
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'provides generic pod data in json' do
|
it 'provides generic pod data in json' do
|
||||||
|
|
@ -25,7 +24,11 @@ describe StatisticsPresenter do
|
||||||
"name" => AppConfig.settings.pod_name,
|
"name" => AppConfig.settings.pod_name,
|
||||||
"version" => AppConfig.version_string,
|
"version" => AppConfig.version_string,
|
||||||
"registrations_open" => AppConfig.settings.enable_registrations,
|
"registrations_open" => AppConfig.settings.enable_registrations,
|
||||||
"services"=> ["facebook",]
|
"services"=> ["facebook",],
|
||||||
|
"facebook" => true,
|
||||||
|
"tumblr" => false,
|
||||||
|
"twitter" => false,
|
||||||
|
"wordpress" => false,
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -34,7 +37,6 @@ describe StatisticsPresenter do
|
||||||
AppConfig.privacy.statistics.user_counts = true
|
AppConfig.privacy.statistics.user_counts = true
|
||||||
AppConfig.privacy.statistics.post_counts = true
|
AppConfig.privacy.statistics.post_counts = true
|
||||||
AppConfig.privacy.statistics.comment_counts = true
|
AppConfig.privacy.statistics.comment_counts = true
|
||||||
AppConfig.privacy.statistics.deprecated_format = true
|
|
||||||
AppConfig.services = {
|
AppConfig.services = {
|
||||||
"facebook" => {"enable" => true},
|
"facebook" => {"enable" => true},
|
||||||
"twitter" => {"enable" => true},
|
"twitter" => {"enable" => true},
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue