From 621aff22c9771a40f4c5f8de0560507c81068dee Mon Sep 17 00:00:00 2001 From: Stein Magnus Jodal Date: Tue, 31 Dec 2013 14:04:25 +0100 Subject: [PATCH] http: Move mopidy.{frontends => }.http --- MANIFEST.in | 2 +- docs/api/frontends.rst | 2 +- docs/api/http.rst | 4 ++-- docs/ext/http.rst | 8 +------- js/Gruntfile.js | 4 ++-- js/README.md | 6 +++--- mopidy/{frontends => }/http/__init__.py | 0 mopidy/{frontends => }/http/actor.py | 2 +- mopidy/{frontends => }/http/data/favicon.png | Bin mopidy/{frontends => }/http/data/index.html | 0 mopidy/{frontends => }/http/data/mopidy.css | 0 mopidy/{frontends => }/http/data/mopidy.html | 0 mopidy/{frontends => }/http/data/mopidy.js | 0 mopidy/{frontends => }/http/data/mopidy.min.js | 0 mopidy/{frontends => }/http/ext.conf | 0 mopidy/{frontends => }/http/ws.py | 2 +- setup.py | 2 +- tests/{frontends => }/http/__init__.py | 0 tests/{frontends => }/http/events_test.py | 2 +- 19 files changed, 14 insertions(+), 20 deletions(-) rename mopidy/{frontends => }/http/__init__.py (100%) rename mopidy/{frontends => }/http/actor.py (98%) rename mopidy/{frontends => }/http/data/favicon.png (100%) rename mopidy/{frontends => }/http/data/index.html (100%) rename mopidy/{frontends => }/http/data/mopidy.css (100%) rename mopidy/{frontends => }/http/data/mopidy.html (100%) rename mopidy/{frontends => }/http/data/mopidy.js (100%) rename mopidy/{frontends => }/http/data/mopidy.min.js (100%) rename mopidy/{frontends => }/http/ext.conf (100%) rename mopidy/{frontends => }/http/ws.py (97%) rename tests/{frontends => }/http/__init__.py (100%) rename tests/{frontends => }/http/events_test.py (97%) diff --git a/MANIFEST.in b/MANIFEST.in index cacaa924..b3a70f17 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -7,6 +7,6 @@ recursive-include docs * prune docs/_build recursive-include mopidy *.conf -recursive-include mopidy/frontends/http/data * +recursive-include mopidy/http/data * recursive-include tests *.py recursive-include tests/data * diff --git a/docs/api/frontends.rst b/docs/api/frontends.rst index 70bd73cf..add6871a 100644 --- a/docs/api/frontends.rst +++ b/docs/api/frontends.rst @@ -47,5 +47,5 @@ The following requirements applies to any frontend implementation: Frontend implementations ======================== -* :mod:`mopidy.frontends.http` +* :mod:`mopidy.http` * :mod:`mopidy.frontends.mpd` diff --git a/docs/api/http.rst b/docs/api/http.rst index 16546683..c57597c7 100644 --- a/docs/api/http.rst +++ b/docs/api/http.rst @@ -113,8 +113,8 @@ HTML file: If you don't use Mopidy to host your web client, you can find the JS files in the Git repo at: -- ``mopidy/frontends/http/data/mopidy.js`` -- ``mopidy/frontends/http/data/mopidy.min.js`` +- ``mopidy/http/data/mopidy.js`` +- ``mopidy/http/data/mopidy.min.js`` Getting the library for Node.js use diff --git a/docs/ext/http.rst b/docs/ext/http.rst index d011a4b9..83881292 100644 --- a/docs/ext/http.rst +++ b/docs/ext/http.rst @@ -9,12 +9,6 @@ from a web based client. See :ref:`http-api` for details on how to integrate with Mopidy over HTTP. -Known issues -============ - -https://github.com/mopidy/mopidy/issues?labels=HTTP+frontend - - Dependencies ============ @@ -32,7 +26,7 @@ install Mopidy with the extra dependencies for required for Mopidy-HTTP:: Default configuration ===================== -.. literalinclude:: ../../mopidy/frontends/http/ext.conf +.. literalinclude:: ../../mopidy/http/ext.conf :language: ini diff --git a/js/Gruntfile.js b/js/Gruntfile.js index 43a4770b..c1e687c9 100644 --- a/js/Gruntfile.js +++ b/js/Gruntfile.js @@ -11,8 +11,8 @@ module.exports = function (grunt) { " * Licensed under the Apache License, Version 2.0 */\n", files: { own: ["Gruntfile.js", "src/**/*.js", "test/**/*-test.js"], - concat: "../mopidy/frontends/http/data/mopidy.js", - minified: "../mopidy/frontends/http/data/mopidy.min.js" + concat: "../mopidy/http/data/mopidy.js", + minified: "../mopidy/http/data/mopidy.min.js" } }, buster: { diff --git a/js/README.md b/js/README.md index eddfa99f..753e858a 100644 --- a/js/README.md +++ b/js/README.md @@ -21,8 +21,8 @@ You may need to adjust hostname and port for your local setup. In the source repo, you can find the files at: -- `mopidy/frontends/http/data/mopidy.js` -- `mopidy/frontends/http/data/mopidy.min.js` +- `mopidy/http/data/mopidy.js` +- `mopidy/http/data/mopidy.min.js` Getting it for Node.js use @@ -72,7 +72,7 @@ To run tests automatically when you save a file: npm start To run tests, concatenate, minify the source, and update the JavaScript files -in `mopidy/frontends/http/data/`: +in `mopidy/http/data/`: npm run-script build diff --git a/mopidy/frontends/http/__init__.py b/mopidy/http/__init__.py similarity index 100% rename from mopidy/frontends/http/__init__.py rename to mopidy/http/__init__.py diff --git a/mopidy/frontends/http/actor.py b/mopidy/http/actor.py similarity index 98% rename from mopidy/frontends/http/actor.py rename to mopidy/http/actor.py index 5aef3506..cc7c11a1 100644 --- a/mopidy/frontends/http/actor.py +++ b/mopidy/http/actor.py @@ -14,7 +14,7 @@ from mopidy.core import CoreListener from . import ws -logger = logging.getLogger('mopidy.frontends.http') +logger = logging.getLogger('mopidy.http') class HttpFrontend(pykka.ThreadingActor, CoreListener): diff --git a/mopidy/frontends/http/data/favicon.png b/mopidy/http/data/favicon.png similarity index 100% rename from mopidy/frontends/http/data/favicon.png rename to mopidy/http/data/favicon.png diff --git a/mopidy/frontends/http/data/index.html b/mopidy/http/data/index.html similarity index 100% rename from mopidy/frontends/http/data/index.html rename to mopidy/http/data/index.html diff --git a/mopidy/frontends/http/data/mopidy.css b/mopidy/http/data/mopidy.css similarity index 100% rename from mopidy/frontends/http/data/mopidy.css rename to mopidy/http/data/mopidy.css diff --git a/mopidy/frontends/http/data/mopidy.html b/mopidy/http/data/mopidy.html similarity index 100% rename from mopidy/frontends/http/data/mopidy.html rename to mopidy/http/data/mopidy.html diff --git a/mopidy/frontends/http/data/mopidy.js b/mopidy/http/data/mopidy.js similarity index 100% rename from mopidy/frontends/http/data/mopidy.js rename to mopidy/http/data/mopidy.js diff --git a/mopidy/frontends/http/data/mopidy.min.js b/mopidy/http/data/mopidy.min.js similarity index 100% rename from mopidy/frontends/http/data/mopidy.min.js rename to mopidy/http/data/mopidy.min.js diff --git a/mopidy/frontends/http/ext.conf b/mopidy/http/ext.conf similarity index 100% rename from mopidy/frontends/http/ext.conf rename to mopidy/http/ext.conf diff --git a/mopidy/frontends/http/ws.py b/mopidy/http/ws.py similarity index 97% rename from mopidy/frontends/http/ws.py rename to mopidy/http/ws.py index d773b422..5a0f2039 100644 --- a/mopidy/frontends/http/ws.py +++ b/mopidy/http/ws.py @@ -9,7 +9,7 @@ from mopidy import core, models from mopidy.utils import jsonrpc -logger = logging.getLogger('mopidy.frontends.http') +logger = logging.getLogger('mopidy.http') class WebSocketResource(object): diff --git a/setup.py b/setup.py index bc2fe222..5ad9ddf2 100644 --- a/setup.py +++ b/setup.py @@ -41,7 +41,7 @@ setup( 'mopidy-convert-config = mopidy.config.convert:main', ], 'mopidy.ext': [ - 'http = mopidy.frontends.http:Extension [http]', + 'http = mopidy.http:Extension [http]', 'local = mopidy.backends.local:Extension', 'local-json = mopidy.backends.local.json:Extension', 'mpd = mopidy.frontends.mpd:Extension', diff --git a/tests/frontends/http/__init__.py b/tests/http/__init__.py similarity index 100% rename from tests/frontends/http/__init__.py rename to tests/http/__init__.py diff --git a/tests/frontends/http/events_test.py b/tests/http/events_test.py similarity index 97% rename from tests/frontends/http/events_test.py rename to tests/http/events_test.py index 5150db9b..dbfa8413 100644 --- a/tests/frontends/http/events_test.py +++ b/tests/http/events_test.py @@ -15,7 +15,7 @@ except ImportError: ws4py = False if cherrypy and ws4py: - from mopidy.frontends.http import actor + from mopidy.http import actor @unittest.skipUnless(cherrypy, 'cherrypy not found')