diff options
author | Duda Dornelles <ddornell@thoughtworks.com> | 2014-10-15 16:39:32 +0200 |
---|---|---|
committer | Duda Dornelles <ddornell@thoughtworks.com> | 2014-10-15 16:39:37 +0200 |
commit | b2334df7a677047749d411dda4cd4cd58474ee8a (patch) | |
tree | cc0b28ce9d55d9c68f9a284ebdfdccec47fbcab0 /service/pixelated | |
parent | c526bab6a5cc91182481d2565b0e762a66572bef (diff) |
getting rid of "pixelated" in the names of many classes - redundant
Diffstat (limited to 'service/pixelated')
-rw-r--r-- | service/pixelated/adapter/mail_sender.py (renamed from service/pixelated/adapter/pixelated_mail_sender.py) | 2 | ||||
-rw-r--r-- | service/pixelated/adapter/mailbox.py (renamed from service/pixelated/adapter/pixelated_mailbox.py) | 4 | ||||
-rw-r--r-- | service/pixelated/adapter/mailbox_indexer_listener.py (renamed from service/pixelated/adapter/listener.py) | 4 | ||||
-rw-r--r-- | service/pixelated/adapter/mailboxes.py (renamed from service/pixelated/adapter/pixelated_mailboxes.py) | 12 | ||||
-rw-r--r-- | service/pixelated/config/app_factory.py | 12 |
5 files changed, 17 insertions, 17 deletions
diff --git a/service/pixelated/adapter/pixelated_mail_sender.py b/service/pixelated/adapter/mail_sender.py index bae86cd2..1802a9d5 100644 --- a/service/pixelated/adapter/pixelated_mail_sender.py +++ b/service/pixelated/adapter/mail_sender.py @@ -18,7 +18,7 @@ import smtplib from pixelated.support.functional import flatten -class PixelatedMailSender(): +class MailSender(): def __init__(self, account_email_address, smtp_client=None): self.account_email_address = account_email_address self.smtp_client = smtp_client or smtplib.SMTP('localhost', 4650) diff --git a/service/pixelated/adapter/pixelated_mailbox.py b/service/pixelated/adapter/mailbox.py index 283567db..b5f2e6ea 100644 --- a/service/pixelated/adapter/pixelated_mailbox.py +++ b/service/pixelated/adapter/mailbox.py @@ -15,7 +15,7 @@ # along with Pixelated. If not, see <http://www.gnu.org/licenses/>. -class PixelatedMailbox: +class Mailbox: def __init__(self, mailbox_name, querier): self.mailbox_name = mailbox_name @@ -50,4 +50,4 @@ class PixelatedMailbox: @classmethod def create(cls, mailbox_name, soledad_querier): - return PixelatedMailbox(mailbox_name, soledad_querier) + return Mailbox(mailbox_name, soledad_querier) diff --git a/service/pixelated/adapter/listener.py b/service/pixelated/adapter/mailbox_indexer_listener.py index 67d75df7..a7309118 100644 --- a/service/pixelated/adapter/listener.py +++ b/service/pixelated/adapter/mailbox_indexer_listener.py @@ -15,14 +15,14 @@ # along with Pixelated. If not, see <http://www.gnu.org/licenses/>. -class MailboxListener(object): +class MailboxIndexerListener(object): """ Listens for new mails, keeping the index updated """ SEARCH_ENGINE = None @classmethod def listen(cls, account, mailbox_name, soledad_querier): - listener = MailboxListener(mailbox_name, soledad_querier) + listener = MailboxIndexerListener(mailbox_name, soledad_querier) if listener not in account.getMailbox(mailbox_name).listeners: account.getMailbox(mailbox_name).addListener(listener) diff --git a/service/pixelated/adapter/pixelated_mailboxes.py b/service/pixelated/adapter/mailboxes.py index 79c007cb..241a8050 100644 --- a/service/pixelated/adapter/pixelated_mailboxes.py +++ b/service/pixelated/adapter/mailboxes.py @@ -13,24 +13,24 @@ # # You should have received a copy of the GNU Affero General Public License # along with Pixelated. If not, see <http://www.gnu.org/licenses/>. -from pixelated.adapter.pixelated_mailbox import PixelatedMailbox -from pixelated.adapter.listener import MailboxListener +from pixelated.adapter.mailbox import Mailbox +from pixelated.adapter.mailbox_indexer_listener import MailboxIndexerListener -class PixelatedMailBoxes(): +class Mailboxes(): def __init__(self, account, soledad_querier): self.account = account self.querier = soledad_querier for mailbox_name in account.mailboxes: - MailboxListener.listen(self.account, mailbox_name, soledad_querier) + MailboxIndexerListener.listen(self.account, mailbox_name, soledad_querier) def _create_or_get(self, mailbox_name): mailbox_name = mailbox_name.upper() if mailbox_name not in self.account.mailboxes: self.account.addMailbox(mailbox_name) - MailboxListener.listen(self.account, mailbox_name, self.querier) - return PixelatedMailbox.create(mailbox_name, self.querier) + MailboxIndexerListener.listen(self.account, mailbox_name, self.querier) + return Mailbox.create(mailbox_name, self.querier) def inbox(self): return self._create_or_get('INBOX') diff --git a/service/pixelated/config/app_factory.py b/service/pixelated/config/app_factory.py index 596046c1..6c9c07fe 100644 --- a/service/pixelated/config/app_factory.py +++ b/service/pixelated/config/app_factory.py @@ -16,12 +16,12 @@ from pixelated.adapter.mail_service import MailService from pixelated.adapter.mail import InputMail -from pixelated.adapter.pixelated_mail_sender import PixelatedMailSender -from pixelated.adapter.pixelated_mailboxes import PixelatedMailBoxes +from pixelated.adapter.mail_sender import MailSender +from pixelated.adapter.mailboxes import Mailboxes from pixelated.adapter.soledad_querier import SoledadQuerier from pixelated.adapter.search import SearchEngine from pixelated.adapter.draft_service import DraftService -from pixelated.adapter.listener import MailboxListener +from pixelated.adapter.mailbox_indexer_listener import MailboxIndexerListener import pixelated.bitmask_libraries.session as LeapSession from pixelated.controllers import * from pixelated.adapter.tag_service import TagService @@ -55,14 +55,14 @@ def create_app(debug_enabled, app): app.config['LEAP_SERVER_NAME']) tag_service = TagService() soledad_querier = SoledadQuerier(soledad=leap_session.account._soledad) - pixelated_mailboxes = PixelatedMailBoxes(leap_session.account, soledad_querier) - pixelated_mail_sender = PixelatedMailSender(leap_session.account_email()) + pixelated_mailboxes = Mailboxes(leap_session.account, soledad_querier) + pixelated_mail_sender = MailSender(leap_session.account_email()) mail_service = MailService(pixelated_mailboxes, pixelated_mail_sender, tag_service, soledad_querier) search_engine = SearchEngine() search_engine.index_mails(mail_service.all_mails()) draft_service = DraftService(pixelated_mailboxes) - MailboxListener.SEARCH_ENGINE = search_engine + MailboxIndexerListener.SEARCH_ENGINE = search_engine InputMail.FROM_EMAIL_ADDRESS = leap_session.account_email() home_controller = HomeController() |