Permalink
Browse files

Added badges and coverage

  • Loading branch information...
noirbizarre committed Jul 30, 2013
1 parent 5494f58 commit 8704d2b21d1948646654b3b6a6a73d1222863dbb
Showing with 47 additions and 21 deletions.
  1. +1 −0 .gitignore
  2. +5 −2 .travis.yml
  3. +7 −0 README.rst
  4. +28 −0 coverage.rc
  5. +2 −2 ember/tests.py
  6. +0 −17 ember/urls.py
  7. +4 −0 setup.py
View
@@ -13,3 +13,4 @@ dist/
.codeintel/
.tox
/doc/_build
+.coverage
View
@@ -16,5 +16,8 @@ matrix:
install:
- pip install $DJANGO --use-mirrors
- pip install . --use-mirrors
-# command to run tests
-script: python manage.py test ember
+ - pip install python-coveralls --use-mirrors
+script:
+ - coverage run --rcfile=coverage.rc manage.py test ember
+after_success:
+ - coveralls -c coverage.rc
View
@@ -3,6 +3,13 @@ Django Ember
.. image:: https://secure.travis-ci.org/noirbizarre/django-ember.png
:target: http://travis-ci.org/noirbizarre/django-ember
+.. image:: https://coveralls.io/repos/noirbizarre/django-ember/badge.png?branch=master
+ :target: https://coveralls.io/r/noirbizarre/django-ember
+.. image:: https://pypip.in/v/django-ember/badge.png
+ :target: https://crate.io/packages/django-ember
+.. image:: https://pypip.in/d/django-ember/badge.png
+ :target: https://crate.io/packages/django-ember
+
Django Ember help integrates Ember.js in Django.
It use `Django.js`_ as base and is inspired from:
View
@@ -0,0 +1,28 @@
+[run]
+source = ember
+branch = True
+omit =
+ ember/models.py
+ ember/settings.py
+ ember/test_urls.py
+ ember/wsgi.py
+
+[report]
+# Regexes for lines to exclude from consideration
+exclude_lines =
+ # Have to re-enable the standard pragma
+ pragma: no cover
+
+ # Don't complain about missing debug-only code:
+ def __repr__
+ if self\.debug
+
+ # Don't complain if tests don't hit defensive assertion code:
+ raise AssertionError
+ raise NotImplementedError
+
+ # Don't complain if non-runnable code isn't run:
+ if 0:
+ if __name__ == .__main__.:
+
+ignore_errors = True
View
@@ -111,8 +111,8 @@ def test_rendering_ember(self):
self.assertIn('{{else}}', rendered)
self.assertIn('{{/if}}', rendered)
self.assertIn('<h1>' + msg1 + ' {{User.firstName}}</h1>', rendered)
- self.assertIn('<p>' + msg2 + '</p>', rendered)
-
+ self.assertIn('<p>' + msg2 + '</p>', rendered)
+
@override_settings(DEBUG=True)
def test_handlebars_js_unminified(self):
'''Should include unminified Handlebars library when DEBUG=True'''
View
@@ -1,17 +0,0 @@
-from django.conf.urls import patterns, include, url
-
-# Uncomment the next two lines to enable the admin:
-# from django.contrib import admin
-# admin.autodiscover()
-
-urlpatterns = patterns('',
- # Examples:
- # url(r'^$', 'ember.views.home', name='home'),
- # url(r'^ember/', include('ember.foo.urls')),
-
- # Uncomment the admin/doc line below to enable admin documentation:
- # url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
-
- # Uncomment the next line to enable the admin:
- # url(r'^admin/', include(admin.site.urls)),
-)
View
@@ -10,6 +10,10 @@
(r'\.\.\s? code-block::\s*(\w|\+)+', '::'),
# Remove travis ci badge
(r'.*travis-ci\.org/.*', ''),
+ # Remove pypip.in badges
+ (r'.*pypip\.in/.*', ''),
+ (r'.*crate\.io/.*', ''),
+ (r'.*coveralls\.io/.*', ''),
)

0 comments on commit 8704d2b

Please sign in to comment.