From 735c6b7dbd65fe4e25d25b3249587303643c8c2b Mon Sep 17 00:00:00 2001 From: Alen Mistric Date: Sun, 16 Sep 2018 05:06:08 +0200 Subject: [PATCH 1/6] Replace travis build --- README.rst => README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename README.rst => README.md (95%) diff --git a/README.rst b/README.md similarity index 95% rename from README.rst rename to README.md index 1d0047f..1349e26 100644 --- a/README.rst +++ b/README.md @@ -2,8 +2,8 @@ Bottle-SQLite ===================== -.. image:: https://travis-ci.org/bottlepy/bottle-sqlite.png?branch=master - :target: https://travis-ci.org/bottlepy/bottle-sqlite +.. image:: https://travis-ci.com/alenmeister/bottle-sqlite.png?branch=master + :target: https://travis-ci.org/alenmeister/bottle-sqlite :alt: Build Status - Travis CI SQLite is a self-contained SQL database engine that runs locally and does not From 96f3286babbd534b8b3b36f972b679a457bc5b61 Mon Sep 17 00:00:00 2001 From: Alen Mistric Date: Sun, 16 Sep 2018 05:50:47 +0200 Subject: [PATCH 2/6] Add shebang and coding attributes --- bottle_sqlite.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bottle_sqlite.py b/bottle_sqlite.py index c4014a9..efe8440 100755 --- a/bottle_sqlite.py +++ b/bottle_sqlite.py @@ -1,3 +1,5 @@ +#!/usr/bin/python3 +# -*- coding: utf-8 -*- ''' Bottle-sqlite is a plugin that integrates SQLite3 with your Bottle application. It automatically connects to a database at the beginning of a From d42cb93775729ecf38873316116cc4e12c76e541 Mon Sep 17 00:00:00 2001 From: Alen Mistric Date: Sun, 16 Sep 2018 05:51:43 +0200 Subject: [PATCH 3/6] Add proper build status image --- README.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/README.md b/README.md index 1349e26..d090fa9 100644 --- a/README.md +++ b/README.md @@ -2,9 +2,7 @@ Bottle-SQLite ===================== -.. image:: https://travis-ci.com/alenmeister/bottle-sqlite.png?branch=master - :target: https://travis-ci.org/alenmeister/bottle-sqlite - :alt: Build Status - Travis CI +[![Build Status](https://travis-ci.org/alenmeister/bottle-sqlite.svg?branch=master)](https://travis-ci.org/alenmeister/bottle-sqlite) SQLite is a self-contained SQL database engine that runs locally and does not require any additional server software or setup. The sqlite3 module is part of the From 0551e4e3a55d91fd52db495741005f3419c55cbb Mon Sep 17 00:00:00 2001 From: Alen Mistric Date: Sun, 16 Sep 2018 05:51:58 +0200 Subject: [PATCH 4/6] Fix failed builds --- .travis.yml | 26 ++++++++++++++++++++++++-- tox.ini | 24 ++++++------------------ 2 files changed, 30 insertions(+), 20 deletions(-) diff --git a/.travis.yml b/.travis.yml index d21c7e4..20763ee 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,27 @@ +os: linux language: python +sudo: false # faster builds -before_install: pip install tox +matrix: + include: + - python: 3.6 + env: TOXENV=py,devel + - python: 3.5 + env: TOXENV=py,devel + - python: 3.4 + env: TOXENV=py,devel + - python: 2.7 + env: TOXENV=py,devel -script: tox +install: + - pip install tox + +script: + - tox + +branches: + only: + - master + +notifications: + email: false diff --git a/tox.ini b/tox.ini index d5a8b53..f334d05 100644 --- a/tox.ini +++ b/tox.ini @@ -1,22 +1,10 @@ [tox] -envlist = py27-bottledev,py27-bottle012,py27-bottle011,py27-bottle010,py27-bottle09,py26,py27,py32,py33,pypy +envlist = + py{36,35,34,27,py} + py{36,27}-devel [testenv] -deps=bottle -commands={envpython} test.py -sitepackages=False +deps = + bottle -[testenv:py27-bottle09] -deps=bottle>=0.9,<0.10 - -[testenv:py27-bottle010] -deps=bottle>=0.10,<0.11 - -[testenv:py27-bottle011] -deps=bottle>=0.11,<0.12 - -[testenv:py27-bottle012] -deps=bottle>=0.12,<0.13 - -[testenv:py27-bottledev] -deps=git+https://github.com/defnull/bottle.git#egg=bottle + devel: https://github.com/bottlepy/bottle/archive/master.zip From 13f7d6c60fcef3659babc9e2c47af7916edaa697 Mon Sep 17 00:00:00 2001 From: Alen Mistric Date: Sun, 16 Sep 2018 05:56:40 +0200 Subject: [PATCH 5/6] Clean up readme --- README.md | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index d090fa9..783cd5a 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,5 @@ -===================== Bottle-SQLite -===================== +============= [![Build Status](https://travis-ci.org/alenmeister/bottle-sqlite.svg?branch=master)](https://travis-ci.org/alenmeister/bottle-sqlite) @@ -15,7 +14,7 @@ Once installed, all you have to do is to add a ``db`` keyword argument (configurable) to route callbacks that need a database connection. Installation -=============== +------------ Install with one of the following commands:: @@ -29,7 +28,7 @@ or download the latest version from github:: $ python setup.py install Usage -=============== +----- Once installed to an application, the plugin passes an open :class:`sqlite3.Connection` instance to all routes that require a ``db`` keyword @@ -57,7 +56,7 @@ closed automatically. If an error occurs, any changes to the database since the last commit are rolled back to keep the database in a consistent state. Configuration -============= +------------- The following configuration options exist for the plugin class: From 7cf6d5a6305daa860a81b99b6424e8ba180a505e Mon Sep 17 00:00:00 2001 From: Alen Mistric Date: Sun, 16 Sep 2018 06:01:21 +0200 Subject: [PATCH 6/6] Clean up readme --- README.md | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 783cd5a..743afa2 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ Install with one of the following commands:: $ pip install bottle-sqlite $ easy_install bottle-sqlite -or download the latest version from github:: +or download the latest version from github: $ git clone git://github.com/bottlepy/bottle-sqlite.git $ cd bottle-sqlite @@ -30,9 +30,8 @@ or download the latest version from github:: Usage ----- -Once installed to an application, the plugin passes an open -:class:`sqlite3.Connection` instance to all routes that require a ``db`` keyword -argument:: +Once installed to an application, the plugin passes an open `sqlite3.Connection` +instance to all routes that require a ``db`` keyword argument: import bottle @@ -60,10 +59,10 @@ Configuration The following configuration options exist for the plugin class: -* **dbfile**: Database filename (default: in-memory database). -* **keyword**: The keyword argument name that triggers the plugin (default: 'db'). -* **autocommit**: Whether or not to commit outstanding transactions at the end of the request cycle (default: True). -* **dictrows**: Whether or not to support dict-like access to row objects (default: True). +* **dbfile**: Database filename (default: in-memory database) +* **keyword**: The keyword argument name that triggers the plugin (default: 'db') +* **autocommit**: Whether or not to commit outstanding transactions at the end of the request cycle (default: True) +* **dictrows**: Whether or not to support dict-like access to row objects (default: True) You can override each of these values on a per-route basis:: @@ -71,7 +70,7 @@ You can override each of these values on a per-route basis:: def cache(item, db): ... -or install two plugins with different ``keyword`` settings to the same application:: +or install two plugins with different ``keyword`` settings to the same application: app = bottle.Bottle() test_db = bottle.ext.sqlite.Plugin(dbfile='/tmp/test.db')