From 3f86282544791592288f873b021d3f705ef9ca26 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Fri, 23 Mar 2012 02:21:40 -0400 Subject: [PATCH] Change some plugin module names to be a bit more generic. * less -> css * git -> vcs * uglify -> js --- hyde/ext/plugins/{less.py => css.py} | 2 +- hyde/ext/plugins/{uglify.py => js.py} | 2 +- hyde/ext/plugins/{git.py => vcs.py} | 3 ++- hyde/tests/ext/test_less.py | 2 +- hyde/tests/ext/test_uglify.py | 6 +++--- 5 files changed, 8 insertions(+), 7 deletions(-) rename hyde/ext/plugins/{less.py => css.py} (99%) rename hyde/ext/plugins/{uglify.py => js.py} (98%) rename hyde/ext/plugins/{git.py => vcs.py} (96%) diff --git a/hyde/ext/plugins/less.py b/hyde/ext/plugins/css.py similarity index 99% rename from hyde/ext/plugins/less.py rename to hyde/ext/plugins/css.py index 8b1e3f5..e53ead1 100644 --- a/hyde/ext/plugins/less.py +++ b/hyde/ext/plugins/css.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- """ -Less css plugin +CSS plugins """ from hyde.plugin import CLTransformer diff --git a/hyde/ext/plugins/uglify.py b/hyde/ext/plugins/js.py similarity index 98% rename from hyde/ext/plugins/uglify.py rename to hyde/ext/plugins/js.py index de4f848..00a6537 100644 --- a/hyde/ext/plugins/uglify.py +++ b/hyde/ext/plugins/js.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- """ -Uglify plugin +JavaScript plugins """ from hyde.plugin import CLTransformer diff --git a/hyde/ext/plugins/git.py b/hyde/ext/plugins/vcs.py similarity index 96% rename from hyde/ext/plugins/git.py rename to hyde/ext/plugins/vcs.py index 4636e17..65ec951 100644 --- a/hyde/ext/plugins/git.py +++ b/hyde/ext/plugins/vcs.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- """ -Contains classes and utilities to extract information from git repository +Contains classes and utilities to extract information from repositories """ from hyde.plugin import Plugin @@ -60,3 +60,4 @@ class GitDatesPlugin(Plugin): modified = datetime.utcfromtimestamp(os.path.getmtime(resource.path)) modified = modified.replace(tzinfo=None) resource.meta.modified = modified + diff --git a/hyde/tests/ext/test_less.py b/hyde/tests/ext/test_less.py index ad555ba..1fd1cad 100644 --- a/hyde/tests/ext/test_less.py +++ b/hyde/tests/ext/test_less.py @@ -28,7 +28,7 @@ class TestLess(object): def test_can_execute_less(self): s = Site(TEST_SITE) - s.config.plugins = ['hyde.ext.plugins.less.LessCSSPlugin'] + s.config.plugins = ['hyde.ext.plugins.css.LessCSSPlugin'] source = TEST_SITE.child('content/media/css/site.less') target = File(Folder(s.config.deploy_root_path).child('media/css/site.css')) gen = Generator(s) diff --git a/hyde/tests/ext/test_uglify.py b/hyde/tests/ext/test_uglify.py index 65dcb6b..11d307f 100644 --- a/hyde/tests/ext/test_uglify.py +++ b/hyde/tests/ext/test_uglify.py @@ -30,7 +30,7 @@ class TestUglify(object): def test_can_uglify(self): s = Site(TEST_SITE) - s.config.plugins = ['hyde.ext.plugins.uglify.UglifyPlugin'] + s.config.plugins = ['hyde.ext.plugins.js.UglifyPlugin'] s.config.mode = "production" source = TEST_SITE.child('content/media/js/jquery.js') target = File(Folder(s.config.deploy_root_path).child('media/js/jquery.js')) @@ -44,7 +44,7 @@ class TestUglify(object): def test_uglify_with_extra_options(self): s = Site(TEST_SITE) - s.config.plugins = ['hyde.ext.plugins.uglify.UglifyPlugin'] + s.config.plugins = ['hyde.ext.plugins.js.UglifyPlugin'] s.config.mode = "production" s.config.uglify = Expando(dict(args={"nc":""})) source = TEST_SITE.child('content/media/js/jquery.js') @@ -60,7 +60,7 @@ class TestUglify(object): def test_no_uglify_in_dev_mode(self): s = Site(TEST_SITE) - s.config.plugins = ['hyde.ext.plugins.uglify.UglifyPlugin'] + s.config.plugins = ['hyde.ext.plugins.js.UglifyPlugin'] s.config.mode = "dev" source = TEST_SITE.child('content/media/js/jquery.js') target = File(Folder(s.config.deploy_root_path).child('media/js/jquery.js'))