mirror of
https://github.com/samsonjs/vdirsyncer.git
synced 2026-03-25 08:55:50 +00:00
commit
7290321151
4 changed files with 32 additions and 9 deletions
12
.travis.yml
12
.travis.yml
|
|
@ -26,6 +26,12 @@ matrix:
|
|||
include:
|
||||
- python: 2.7
|
||||
env: BUILD=style
|
||||
- python: 2.7
|
||||
env: BUILD=test REMOTESTORAGE_SERVER=mysteryshack REQUIREMENTS=devel
|
||||
- python: 2.7
|
||||
env: BUILD=test REMOTESTORAGE_SERVER=mysteryshack REQUIREMENTS=release
|
||||
- python: 2.7
|
||||
env: BUILD=test REMOTESTORAGE_SERVER=mysteryshack REQUIREMENTS=minimal
|
||||
- python: 2.7
|
||||
env: BUILD=test DAV_SERVER=radicale REQUIREMENTS=devel
|
||||
- python: 2.7
|
||||
|
|
@ -68,6 +74,12 @@ matrix:
|
|||
env: BUILD=test DAV_SERVER=radicale REQUIREMENTS=minimal
|
||||
- python: 3.5
|
||||
env: BUILD=style
|
||||
- python: 3.5
|
||||
env: BUILD=test REMOTESTORAGE_SERVER=mysteryshack REQUIREMENTS=devel
|
||||
- python: 3.5
|
||||
env: BUILD=test REMOTESTORAGE_SERVER=mysteryshack REQUIREMENTS=release
|
||||
- python: 3.5
|
||||
env: BUILD=test REMOTESTORAGE_SERVER=mysteryshack REQUIREMENTS=minimal
|
||||
- python: 3.5
|
||||
env: BUILD=test DAV_SERVER=radicale REQUIREMENTS=devel
|
||||
- python: 3.5
|
||||
|
|
|
|||
6
Makefile
6
Makefile
|
|
@ -75,7 +75,11 @@ release:
|
|||
python setup.py sdist bdist_wheel upload
|
||||
|
||||
install-dev:
|
||||
pip install -e .
|
||||
set -xe && if [ "$$REMOTESTORAGE_SERVER" != "skip" ]; then \
|
||||
pip install -e .[remotestorage]; \
|
||||
else \
|
||||
pip install -e .; \
|
||||
fi
|
||||
set -xe && if [ "$$REQUIREMENTS" = "devel" ]; then \
|
||||
pip install -U --force-reinstall git+https://github.com/kennethreitz/requests; \
|
||||
elif [ "$$REQUIREMENTS" = "minimal" ]; then \
|
||||
|
|
|
|||
|
|
@ -57,13 +57,23 @@ with section("matrix"):
|
|||
|
||||
if python in ("2.7", "3.5"):
|
||||
dav_servers = ("radicale", "owncloud", "baikal", "davical")
|
||||
rs_servers = ("mysteryshack",)
|
||||
else:
|
||||
dav_servers = ("radicale",)
|
||||
rs_servers = ()
|
||||
|
||||
for dav_server, requirements in itertools.product(
|
||||
dav_servers,
|
||||
for (server_type, server), requirements in itertools.product(
|
||||
itertools.chain(
|
||||
(("REMOTESTORAGE", x) for x in rs_servers),
|
||||
(("DAV", x) for x in dav_servers)
|
||||
),
|
||||
("devel", "release", "minimal")
|
||||
):
|
||||
h()
|
||||
p(" env: BUILD=test DAV_SERVER={} REQUIREMENTS={}"
|
||||
.format(dav_server, requirements))
|
||||
p(" env: "
|
||||
"BUILD=test "
|
||||
"{server_type}_SERVER={server} "
|
||||
"REQUIREMENTS={requirements}"
|
||||
.format(server_type=server_type,
|
||||
server=server,
|
||||
requirements=requirements))
|
||||
|
|
|
|||
|
|
@ -204,8 +204,6 @@ class RemoteStorage(Storage):
|
|||
data=item.raw.encode('utf-8'),
|
||||
headers=headers
|
||||
)
|
||||
if not response.url.endswith('/' + href):
|
||||
raise exceptions.InvalidResponse('spec doesn\'t allow redirects')
|
||||
return href, response.headers['etag']
|
||||
|
||||
def update(self, href, item, etag):
|
||||
|
|
@ -214,8 +212,7 @@ class RemoteStorage(Storage):
|
|||
return etag
|
||||
|
||||
def upload(self, item):
|
||||
href = utils.generate_href(item.ident)
|
||||
href = utils.compat.urlquote(href, '@') + self.fileext
|
||||
href = utils.generate_href(item.ident) + self.fileext
|
||||
return self._put(href, item, None)
|
||||
|
||||
def delete(self, href, etag):
|
||||
|
|
|
|||
Loading…
Reference in a new issue