Skip to content
This repository has been archived by the owner on Mar 15, 2018. It is now read-only.

Commit

Permalink
Remove rocketfuel code, keep a small compatibility layer for the API …
Browse files Browse the repository at this point in the history
…(bug 1106586, bug 1058292)
  • Loading branch information
diox committed Dec 8, 2014
1 parent 7f12782 commit 2a705d6
Show file tree
Hide file tree
Showing 38 changed files with 142 additions and 4,006 deletions.
7 changes: 1 addition & 6 deletions migrations/645-collection-backfill-slugs.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,2 @@
from mkt.collections.models import Collection


def run():
"""Backfill slugs."""
for c in Collection.objects.all():
c.save()
return
3 changes: 3 additions & 0 deletions migrations/876-remove-rocketfuel-collections.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
DROP TABLE `app_collections_curators`;
DROP TABLE `app_collection_membership`;
DROP TABLE `app_collections`;
4 changes: 0 additions & 4 deletions mkt/api/tests/nose.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@ tests=mkt.abuse.tests.test_views,
mkt.api.tests.test_urls,
mkt.api.tests.test_views,
mkt.comm.tests.test_views,
mkt.collections.tests.test_authorization,
mkt.collections.tests.test_fields,
mkt.collections.tests.test_serializers,
mkt.collections.tests.test_views,
mkt.developers.tests.test_api_payments,
mkt.developers.tests.test_views_api,
mkt.features.tests.test_serializers,
Expand Down
12 changes: 4 additions & 8 deletions mkt/api/tests/test_urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,9 @@ class TestAPIv1URLs(BaseTestAPIVersionURLs, amo.tests.TestCase):

def test_collections(self):
"""
Tests the v1 half of a move of the collection endpoints from:
- v1: /rocketfuel/collections/
- v2: /feed/collections/
Tests the v1 endpoints removed in v2 still work with v1.
"""
self.assertViewName('/rocketfuel/collections/', 'CollectionViewSet')
self.assertViewName('/apps/search/featured/', 'FeaturedSearchView')


class TestAPIv2URLs(BaseTestAPIVersionURLs, amo.tests.TestCase):
Expand All @@ -94,8 +92,6 @@ class TestAPIv2URLs(BaseTestAPIVersionURLs, amo.tests.TestCase):

def test_collections(self):
"""
Tests the v2 half of a move of the collection endpoints from:
- v1: /rocketfuel/collections/
- v2: /feed/collections/
Tests the v2 endpoints removal.
"""
self.assertView404('/rocketfuel/collections/')
self.assertView404('/apps/search/featured/')
12 changes: 1 addition & 11 deletions mkt/api/v1/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,11 @@

from mkt.abuse.urls import api_patterns as abuse_api_patterns
from mkt.account.urls import api_patterns as account_api_patterns
from mkt.api.base import SubRouter, SubRouterWithFormat
from mkt.api.base import SubRouter
from mkt.api.views import (CarrierViewSet, CategoryViewSet,
error_reporter, ErrorViewSet, PriceTierViewSet,
PriceCurrencyViewSet, RefreshManifestViewSet,
RegionViewSet, site_config)
from mkt.collections.views import CollectionImageViewSet, CollectionViewSet
from mkt.comm.urls import api_patterns as comm_api_patterns
from mkt.developers.urls import dev_api_patterns, payments_api_patterns
from mkt.features.views import AppFeaturesList
Expand All @@ -22,13 +21,6 @@
from mkt.submit.views import PreviewViewSet, StatusViewSet, ValidationViewSet
from mkt.webapps.views import AppTagViewSet, AppViewSet, PrivacyPolicyViewSet

rocketfuel = SimpleRouter()
rocketfuel.register(r'collections', CollectionViewSet,
base_name='collections')

subcollections = SubRouterWithFormat()
subcollections.register('image', CollectionImageViewSet,
base_name='collection-image')

apps = SimpleRouter()
apps.register(r'preview', PreviewViewSet, base_name='app-preview')
Expand Down Expand Up @@ -70,8 +62,6 @@
url(r'^services/', include(services.urls)),
url(r'^services/config/site/', site_config, name='site-config'),
url(r'^fireplace/report_error/\d*', error_reporter, name='error-reporter'),
url(r'^rocketfuel/', include(rocketfuel.urls)),
url(r'^rocketfuel/collections/', include(subcollections.urls)),
url(r'^apps/', include('mkt.versions.urls')),
url(r'^apps/', include('mkt.ratings.urls')),
url(r'^apps/features/', AppFeaturesList.as_view(),
Expand Down
Empty file removed mkt/collections/__init__.py
Empty file.
102 changes: 0 additions & 102 deletions mkt/collections/authorization.py

This file was deleted.

12 changes: 0 additions & 12 deletions mkt/collections/constants.py

This file was deleted.

24 changes: 0 additions & 24 deletions mkt/collections/fields.py

This file was deleted.

Loading

0 comments on commit 2a705d6

Please sign in to comment.