Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 26 Feb 2016 04:16:26 +0000 (UTC)
From:      Kubilay Kocak <koobs@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r409578 - in head/devel: . py-vcrpy
Message-ID:  <201602260416.u1Q4GQgk012820@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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 <koobs@FreeBSD.org>
+# $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 <bsd.port.pre.mk>
+
+.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 <bsd.port.post.mk>

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201602260416.u1Q4GQgk012820>