Merge pull request #5308 from Flaburgan/add-network-key-to-statistics

Add network key to statistics.json

Conflicts:
	Changelog.md
This commit is contained in:
Jonne Haß 2014-10-14 13:25:16 +02:00
commit a7c702d631
3 changed files with 4 additions and 0 deletions

View file

@ -80,6 +80,7 @@ The keys will still be available in the root level within the 0.5 release. The o
* Display visibility icon in publisher aspects dropdown [#4982](https://github.com/diaspora/diaspora/pull/4982)
* Add a link to the reported comment in the admin panel [#5337](https://github.com/diaspora/diaspora/pull/5337)
* Strip search query from leading and trailing whitespace [#5317](https://github.com/diaspora/diaspora/pull/5317)
* 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,
'services' => []

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,
"services"=> ["facebook",],
@ -48,6 +49,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,