Add network key to statistics.json, close #5042

This commit is contained in:
flaburgan 2014-10-08 01:02:57 +02:00
parent 4cfe3d7005
commit adc839d620
3 changed files with 4 additions and 0 deletions

View file

@ -61,6 +61,7 @@ The default for including jQuery from a CDN has changed. If you want to continue
* Increased the number of notifications shown in drop down bar to 15 [#5129](https://github.com/diaspora/diaspora/pull/5129)
* Increase possible captcha length [#5169](https://github.com/diaspora/diaspora/pull/5169)
* Display visibility icon in publisher aspects dropdown [#4982](https://github.com/diaspora/diaspora/pull/4982)
* Add the "network" key to statistics.json and set it to "Diaspora" [#5308](https://github.com/diaspora/diaspora/pull/5308)
# 0.4.1.1

View file

@ -3,6 +3,7 @@ class StatisticsPresenter
def as_json(options={})
result = {
'name' => AppConfig.settings.pod_name,
'network' => "Diaspora",
'version' => AppConfig.version_string,
'registrations_open' => AppConfig.settings.enable_registrations
}

View file

@ -22,6 +22,7 @@ describe StatisticsPresenter do
it 'provides generic pod data in json' do
expect(@presenter.as_json).to eq({
"name" => AppConfig.settings.pod_name,
"network" => "Diaspora",
"version" => AppConfig.version_string,
"registrations_open" => AppConfig.settings.enable_registrations,
"facebook" => true,
@ -47,6 +48,7 @@ describe StatisticsPresenter do
it 'provides generic pod data and counts in json' do
expect(@presenter.as_json).to eq({
"name" => AppConfig.settings.pod_name,
"network" => "Diaspora",
"version" => AppConfig.version_string,
"registrations_open" => AppConfig.settings.enable_registrations,
"total_users" => User.count,