Permalink
Browse files

merge conflicts solved

  • Loading branch information...
2 parents ce704c1 + 82e17c1 commit c2a072edc716fa34b74f850904ac1f356daba982 Alejandro Gómez committed Apr 22, 2012
Showing with 391 additions and 211 deletions.
  1. +12 −0 HISTORY.rst
  2. +1 −2 MANIFEST
  3. +2 −2 Makefile
  4. +24 −2 bin/turses
  5. +19 −0 tests/test_models.py
  6. +1 −1 turses/__init__.py
  7. +0 −33 turses/cli.py
  8. +171 −63 turses/config.py
  9. +139 −89 turses/{controller.py → core.py}
  10. +7 −6 turses/models.py
  11. +15 −13 turses/ui.py
View
@@ -1,3 +1,15 @@
+0.1.4
+-----
+- update all timelines periodically
+- configurable default timelines
+- bugfix: don't crash with empty timelines
+- bugfix: manual retweet crashed
+- bugfix: don't capture all input
+
+0.1.3
+-----
+- bugfix: packaging error
+
0.1.2
-----
- bugfix: error with packaging
View
@@ -1,9 +1,8 @@
setup.py
bin/turses
turses/__init__.py
-turses/cli.py
turses/config.py
-turses/controller.py
+turses/core.py
turses/models.py
turses/ui.py
turses/utils.py
View
@@ -1,5 +1,5 @@
APPNAME=turses
-VERSION=0.1.3
+VERSION=0.1.4
DISTPKG=dist/$(APPNAME)-$(VERSION).tar.gz
PY=python
@@ -8,7 +8,7 @@ PIPI=pip install
PIPFLAGS=--ignore-installed --no-deps
TESTRUNNER=nosetests
-TESTFLAGS=--with-color --nocapture --logging-clear-handlers --with-coverage --cover-package=turses
+TESTFLAGS=--nocapture --logging-clear-handlers --with-coverage --cover-package=turses
WATCHTESTFLAGS=--verbosity=0
View
@@ -1,5 +1,27 @@
#!/usr/bin/python
-from turses.cli import main
-main()
+from urwid import set_encoding
+
+from turses.utils import parse_arguments
+from turses.config import Configuration
+from turses.ui import CursesInterface
+from turses.api.backends import TweepyApi
+from turses.core import Turses
+
+
+try:
+ set_encoding('utf8')
+
+ args = parse_arguments()
+
+ configuration = Configuration(args)
+ configuration.load()
+ ui = CursesInterface(configuration)
+
+ # start `turses`
+ Turses(configuration=configuration,
+ ui=ui,
+ api_backend=TweepyApi)
+except KeyboardInterrupt:
+ exit(0)
View
@@ -307,6 +307,25 @@ def test_clear(self):
self.timeline.add_statuses([old_status, new_status])
self.assertEqual(len(self.timeline), 2)
+ def test_get_unread_count(self):
+ self.assertEqual(self.timeline.get_unread_count(), 0)
+
+ # a status
+ status = create_status(id=1)
+ self.timeline.add_status(status)
+ self.assertEqual(self.timeline.get_unread_count(), 1)
+
+ self.timeline.mark_all_as_read()
+ self.assertEqual(self.timeline.get_unread_count(), 0)
+
+ # new statuses
+ statuses = [create_status(id=id_num) for id_num in xrange(2, 10)]
+ self.timeline.add_statuses(statuses)
+ self.assertEqual(self.timeline.get_unread_count(), len(statuses))
+
+ self.timeline.mark_all_as_read()
+ self.assertEqual(self.timeline.get_unread_count(), 0)
+
# update function related
def test_extract_with_no_args(self):
View
@@ -13,6 +13,6 @@
__author__ = "Alejandro Gómez"
__copyright__ = "Copyright 2012 turses contributors"
__license__ = "GPL3"
-__version__ = (0, 1, 3)
+__version__ = (0, 1, 4)
version = "%s.%s.%s" % __version__
View
@@ -1,33 +0,0 @@
-# -*- coding: utf-8 -*-
-
-"""
-turses.cli
-~~~~~~~~~~
-
-This module contains the logic to launch `turses` with a curses interface.
-"""
-
-from urwid import set_encoding
-
-from .utils import parse_arguments
-from .config import Configuration
-from .controller import CursesController
-from .ui import CursesInterface
-from .api.backends import TweepyApi
-
-
-def main():
- try:
- set_encoding('utf8')
-
- args = parse_arguments()
- configuration = Configuration(args)
- configuration.load()
- ui = CursesInterface(configuration)
-
- # start `turses`
- CursesController(configuration=configuration,
- ui=ui,
- api_backend=TweepyApi)
- except KeyboardInterrupt:
- exit(0)
Oops, something went wrong.

0 comments on commit c2a072e

Please sign in to comment.