Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/diaspora/diaspora.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Changelog.md1
-rw-r--r--app/presenters/statistics_presenter.rb1
-rw-r--r--spec/presenters/statistics_presenter_spec.rb2
3 files changed, 4 insertions, 0 deletions
diff --git a/Changelog.md b/Changelog.md
index fa44e79ee..bc03dc818 100644
--- a/Changelog.md
+++ b/Changelog.md
@@ -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
diff --git a/app/presenters/statistics_presenter.rb b/app/presenters/statistics_presenter.rb
index a3bcb8b32..c21217ac2 100644
--- a/app/presenters/statistics_presenter.rb
+++ b/app/presenters/statistics_presenter.rb
@@ -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
}
diff --git a/spec/presenters/statistics_presenter_spec.rb b/spec/presenters/statistics_presenter_spec.rb
index a020463b1..bceb463f4 100644
--- a/spec/presenters/statistics_presenter_spec.rb
+++ b/spec/presenters/statistics_presenter_spec.rb
@@ -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,