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:
commit
a7c702d631
3 changed files with 4 additions and 0 deletions
|
|
@ -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)
|
* 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)
|
* 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)
|
* 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
|
# 0.4.1.1
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@ class StatisticsPresenter
|
||||||
def as_json(options={})
|
def as_json(options={})
|
||||||
result = {
|
result = {
|
||||||
'name' => AppConfig.settings.pod_name,
|
'name' => AppConfig.settings.pod_name,
|
||||||
|
'network' => "Diaspora",
|
||||||
'version' => AppConfig.version_string,
|
'version' => AppConfig.version_string,
|
||||||
'registrations_open' => AppConfig.settings.enable_registrations,
|
'registrations_open' => AppConfig.settings.enable_registrations,
|
||||||
'services' => []
|
'services' => []
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,7 @@ describe StatisticsPresenter do
|
||||||
it 'provides generic pod data in json' do
|
it 'provides generic pod data in json' do
|
||||||
expect(@presenter.as_json).to eq({
|
expect(@presenter.as_json).to eq({
|
||||||
"name" => AppConfig.settings.pod_name,
|
"name" => AppConfig.settings.pod_name,
|
||||||
|
"network" => "Diaspora",
|
||||||
"version" => AppConfig.version_string,
|
"version" => AppConfig.version_string,
|
||||||
"registrations_open" => AppConfig.settings.enable_registrations,
|
"registrations_open" => AppConfig.settings.enable_registrations,
|
||||||
"services"=> ["facebook",],
|
"services"=> ["facebook",],
|
||||||
|
|
@ -48,6 +49,7 @@ describe StatisticsPresenter do
|
||||||
it 'provides generic pod data and counts in json' do
|
it 'provides generic pod data and counts in json' do
|
||||||
expect(@presenter.as_json).to eq({
|
expect(@presenter.as_json).to eq({
|
||||||
"name" => AppConfig.settings.pod_name,
|
"name" => AppConfig.settings.pod_name,
|
||||||
|
"network" => "Diaspora",
|
||||||
"version" => AppConfig.version_string,
|
"version" => AppConfig.version_string,
|
||||||
"registrations_open" => AppConfig.settings.enable_registrations,
|
"registrations_open" => AppConfig.settings.enable_registrations,
|
||||||
"total_users" => User.count,
|
"total_users" => User.count,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue