From: "Jauhien Piatlicki" <piatlicki@gmail.com>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/g-sorcery:master commit in: g_sorcery/, g_elpa/, tests/
Date: Mon, 8 Jul 2013 23:53:55 +0000 (UTC) [thread overview]
Message-ID: <1373327618.2b74357f5c51d0e577a56a14bd5eb58dcd11ca2d.jauhien@gentoo> (raw)
commit: 2b74357f5c51d0e577a56a14bd5eb58dcd11ca2d
Author: Jauhien Piatlicki (jauhien) <piatlicki <AT> gmail <DOT> com>
AuthorDate: Mon Jul 8 23:53:38 2013 +0000
Commit: Jauhien Piatlicki <piatlicki <AT> gmail <DOT> com>
CommitDate: Mon Jul 8 23:53:38 2013 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/g-sorcery.git;a=commit;h=2b74357f
g_elpa/backend, g_sorcery/dispatcher: initial commit
---
g_elpa/backend.py | 16 ++++++++++++++++
g_sorcery/dispatcher.py | 30 ++++++++++++++++++++++++++++++
tests/test_dispatcher.py | 29 +++++++++++++++++++++++++++++
3 files changed, 75 insertions(+)
diff --git a/g_elpa/backend.py b/g_elpa/backend.py
new file mode 100644
index 0000000..6738ab1
--- /dev/null
+++ b/g_elpa/backend.py
@@ -0,0 +1,16 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+
+"""
+ backend.py
+ ~~~~~~~~~~
+
+ ELPA backend
+
+ :copyright: (c) 2013 by Jauhien Piatlicki
+ :license: GPL-2, see LICENSE for more details.
+"""
+
+from g_sorcery.dispatcher import Dispatcher
+
+from g_elpa import ebuild
diff --git a/g_sorcery/dispatcher.py b/g_sorcery/dispatcher.py
new file mode 100644
index 0000000..abf9136
--- /dev/null
+++ b/g_sorcery/dispatcher.py
@@ -0,0 +1,30 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+
+"""
+ dispatcher.py
+ ~~~~~~~~~~~~~
+
+ backend dispatcher
+
+ :copyright: (c) 2013 by Jauhien Piatlicki
+ :license: GPL-2, see LICENSE for more details.
+"""
+
+import argparse
+
+class Dispatcher(object):
+
+ def __init__(self, server_backend, user_backend, digest_in_existent_overlay=True):
+ self.server_backend = server_backend
+ self.user_backend = user_backend
+ if digest_in_existent_overlay:
+ self.existent_overlay_backend = self.server_backend
+ else:
+ self.existent_overlay_backend = self.user_backend
+
+ self.parser = argparse.ArgumentParser(description='Automatic ebuild generator.')
+ self.parser.add_argument('--list')
+
+ def __call__(self, args):
+ return self.parser.parse_args(args)
diff --git a/tests/test_dispatcher.py b/tests/test_dispatcher.py
new file mode 100644
index 0000000..517158d
--- /dev/null
+++ b/tests/test_dispatcher.py
@@ -0,0 +1,29 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+
+"""
+ test_dispatcher.py
+ ~~~~~~~~~~~~~~~~~~
+
+ backend dispatcher test suite
+
+ :copyright: (c) 2013 by Jauhien Piatlicki
+ :license: GPL-2, see LICENSE for more details.
+"""
+
+import unittest
+
+from g_sorcery import dispatcher
+
+from tests.base import BaseTest
+
+class TestDispatcher(BaseTest):
+
+ def test_dispatcher(self):
+ pass
+
+
+def suite():
+ suite = unittest.TestSuite()
+ suite.addTest(TestDispatcher('test_dispatcher'))
+ return suite
next reply other threads:[~2013-07-09 22:58 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-08 23:53 Jauhien Piatlicki [this message]
-- strict thread matches above, loose matches on Subject: below --
2013-07-02 12:35 [gentoo-commits] proj/g-sorcery:master commit in: g_sorcery/, g_elpa/, tests/ Jauhien Piatlicki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1373327618.2b74357f5c51d0e577a56a14bd5eb58dcd11ca2d.jauhien@gentoo \
--to=piatlicki@gmail.com \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox