Skip to content

Commit

Permalink
Merge pull request #5308 from Flaburgan/add-network-key-to-statistics
Browse files Browse the repository at this point in the history
Add network key to statistics.json

Conflicts:
	Changelog.md
  • Loading branch information
jhass committed Oct 14, 2014
2 parents 0a20d6a + adc839d commit a7c702d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions Changelog.md
Expand Up @@ -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

Expand Down
1 change: 1 addition & 0 deletions app/presenters/statistics_presenter.rb
Expand Up @@ -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' => []
Expand Down
2 changes: 2 additions & 0 deletions spec/presenters/statistics_presenter_spec.rb
Expand Up @@ -22,6 +22,7 @@
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",],
Expand All @@ -48,6 +49,7 @@
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,
Expand Down

0 comments on commit a7c702d

Please sign in to comment.