From owner-svn-ports-all@freebsd.org Fri Feb 26 04:16:28 2016 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 52D04AB4492; Fri, 26 Feb 2016 04:16:28 +0000 (UTC) (envelope-from koobs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 111F6D35; Fri, 26 Feb 2016 04:16:27 +0000 (UTC) (envelope-from koobs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u1Q4GRqR012824; Fri, 26 Feb 2016 04:16:27 GMT (envelope-from koobs@FreeBSD.org) Received: (from koobs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u1Q4GQgk012820; Fri, 26 Feb 2016 04:16:26 GMT (envelope-from koobs@FreeBSD.org) Message-Id: <201602260416.u1Q4GQgk012820@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: koobs set sender to koobs@FreeBSD.org using -f From: Kubilay Kocak Date: Fri, 26 Feb 2016 04:16:26 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r409578 - in head/devel: . py-vcrpy X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Feb 2016 04:16:28 -0000 Author: koobs Date: Fri Feb 26 04:16:26 2016 New Revision: 409578 URL: https://svnweb.freebsd.org/changeset/ports/409578 Log: [NEW] devel/py-vcrpy: Automatically mock HTTP interactions to simplify and speed up testing VCR.py simplifies and speeds up tests that make HTTP requests. The first time you run code that is inside a VCR.py context manager or decorated function, VCR.py records all HTTP interactions that take place through the libraries it supports and serializes and writes them to a flat file (in yaml format by default). This flat file is called a cassette. When the relevant peice of code is executed again, VCR.py will read the serialized requests and responses from the aforementioned cassette file, and intercept any HTTP requests that it recognizes from the original test run and return the responses that corresponded to those requests. This means that the requests will not actually result in HTTP traffic, which confers several benefits including: * The ability to work offline * Completely deterministic tests * Increased test execution speed WWW: https://github.com/kevin1024/vcrpy Added: head/devel/py-vcrpy/ head/devel/py-vcrpy/Makefile (contents, props changed) head/devel/py-vcrpy/distinfo (contents, props changed) head/devel/py-vcrpy/pkg-descr (contents, props changed) Modified: head/devel/Makefile Modified: head/devel/Makefile ============================================================================== --- head/devel/Makefile Fri Feb 26 04:06:57 2016 (r409577) +++ head/devel/Makefile Fri Feb 26 04:16:26 2016 (r409578) @@ -4433,6 +4433,7 @@ SUBDIR += py-user_agents SUBDIR += py-utils SUBDIR += py-validictory + SUBDIR += py-vcrpy SUBDIR += py-vcversioner SUBDIR += py-venusian SUBDIR += py-versiontools Added: head/devel/py-vcrpy/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/py-vcrpy/Makefile Fri Feb 26 04:16:26 2016 (r409578) @@ -0,0 +1,45 @@ +# Created by: Kubilay Kocak +# $FreeBSD$ + +PORTNAME= vcrpy +PORTVERSION= 1.7.4 +DISTVERSIONPREFIX= v. +CATEGORIES= devel www python +#MASTER_SITES= CHEESESHOP +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} + +MAINTAINER= koobs@FreeBSD.org +COMMENT= Automatically mock HTTP interactions to simplify and speed up testing + +LICENSE= MIT +LICENSE_FILE= ${WRKSRC}/LICENSE.txt + +RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}yaml>0:${PORTSDIR}/devel/py-yaml \ + ${PYTHON_PKGNAMEPREFIX}wrapt>0:${PORTSDIR}/devel/py-wrapt \ + ${PYTHON_PKGNAMEPREFIX}six>=1.5:${PORTSDIR}/devel/py-six +TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pytest>0:${PORTSDIR}/devel/py-pytest \ + ${PYTHON_PKGNAMEPREFIX}pytest-localserver>0:${PORTSDIR}/devel/py-pytest-localserver + +USES= python +USE_PYTHON= autoplist distutils + +USE_GITHUB= yes + +GH_ACCOUNT= kevin1024 + +NO_ARCH= yes + +.include + +.if ${PYTHON_REL} < 3300 +RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}mock>0:${PORTSDIR}/devel/py-mock \ + ${PYTHON_PKGNAMEPREFIX}contextlib2>0:${PORTSDIR}/devel/py-contextlib2 +.endif + +post-patch: + ${FIND} ${WRKSRC} -name __pycache__ -type d -exec ${RM} -rf {} + + +do-test: + @cd ${WRKSRC} && ${PYTHON_CMD} ${PYDISTUTILS_SETUP} test + +.include Added: head/devel/py-vcrpy/distinfo ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/py-vcrpy/distinfo Fri Feb 26 04:16:26 2016 (r409578) @@ -0,0 +1,2 @@ +SHA256 (kevin1024-vcrpy-v.1.7.4_GH0.tar.gz) = 5bf75cf4dcb666b7181f07d6128dd04b9c2b222fa69436cb5e29412f70dce3bd +SIZE (kevin1024-vcrpy-v.1.7.4_GH0.tar.gz) = 315232 Added: head/devel/py-vcrpy/pkg-descr ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/py-vcrpy/pkg-descr Fri Feb 26 04:16:26 2016 (r409578) @@ -0,0 +1,18 @@ +VCR.py simplifies and speeds up tests that make HTTP requests. The first +time you run code that is inside a VCR.py context manager or decorated +function, VCR.py records all HTTP interactions that take place through +the libraries it supports and serializes and writes them to a flat file +(in yaml format by default). This flat file is called a cassette. + +When the relevant peice of code is executed again, VCR.py will read the +serialized requests and responses from the aforementioned cassette file, +and intercept any HTTP requests that it recognizes from the original test +run and return the responses that corresponded to those requests. This +means that the requests will not actually result in HTTP traffic, which +confers several benefits including: + + * The ability to work offline + * Completely deterministic tests + * Increased test execution speed + +WWW: https://github.com/kevin1024/vcrpy