Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixes bug 1058283 - Make a contribute.json endpoint #2313

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
32 changes: 32 additions & 0 deletions contribute.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"name": "Socorro",
"description": "Socorro is a server to accept and process Breakpad crash reports from Firefox, Thunderbird, etc.",
"repository": {
"url": "https://github.com/mozilla/socorro",
"license": "MPL2",
"tests": "https://travis-ci.org/mozilla/socorro"
},
"participate": {
"home": "https://wiki.mozilla.org/Socorro",
"docs": "http://socorro.readthedocs.org/",
"irc": "irc://irc.mozilla.org/#breakpad",
"mailing-list": "https://www.mozilla.org/en-US/about/forums/#tools-socorro"
},
"bugs": {
"list": "https://bugzilla.mozilla.org/buglist.cgi?resolution=---&query_format=advanced&product=Socorro",
"report": "https://bugzilla.mozilla.org/enter_bug.cgi?product=Socorro"
},
"urls": {
"prod": "https://crash-stats.mozilla.com/",
"stage": "https://crash-stats.allizom.org/"
},
"keywords": [
"django",
"jquery",
"postgresql",
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LESS, CSS, I know it is not a large part of the project but, there are always things to do ;)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added css but less is basically just CSS but with a little sugar on it.

"elasticsearch",
"rabbitmq",
"python",
"css"
]
}
7 changes: 7 additions & 0 deletions webapp-django/crashstats/crashstats/tests/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,13 @@ def mocked_get(url, params, **options):

class TestViews(BaseTestViews):

def test_contribute_json(self):
response = self.client.get('/contribute.json')
eq_(response.status_code, 200)
# should be valid JSON
ok_(json.loads(response.content))
eq_(response['Content-Type'], 'application/json')

@mock.patch('requests.get')
def test_handler500(self, rget):
root_urlconf = __import__(
Expand Down
4 changes: 4 additions & 0 deletions webapp-django/crashstats/urls.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import os

from django.conf import settings
from django.conf.urls import patterns, include
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
Expand All @@ -15,6 +17,8 @@

urlpatterns = patterns(
'',
(r'^(?P<path>contribute\.json)$', 'django.views.static.serve',
{'document_root': os.path.join(settings.ROOT, '..')}),
(r'', include(urls, namespace='crashstats')),
(r'', include(supersearch_urls)),
(r'^signature/', include(
Expand Down