Skip to content

Commit

Permalink
v0.5.2 (#6)
Browse files Browse the repository at this point in the history
* Correct scope of get_code context_processor (#3)

* Travis CI (#4)

* Add Travis CI configuration
* Restrict compatible Python versions to those testable with Travis on Xenial

* Update github account (#5)

* Version bump to 0.5.2
  • Loading branch information
bmaximuml authored Feb 14, 2021
1 parent 18ddc95 commit 48c0a28
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 9 deletions.
18 changes: 18 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
language: python
python:
- '3.8'
- '3.7'
- '3.6'
- '3.5'
- '3.4'
- '2.7'

install:
- pip install .

script:
- pytest -v

notifications:
email:
on_success: never
5 changes: 5 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
- 0.5.2
- Project URL updated
- Use Travis CI for testing
- Updated python version compatability

- 0.5.1
- Update author info
- API documentation updated and corrected
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Flask-xCaptcha

[![Build Status](https://travis-ci.com/benjilev08/flask-xcaptcha.svg?branch=master)](https://travis-ci.com/benjilev08/flask-xcaptcha)

The new xCaptcha implementation for Flask without Flask-WTF.

Can also be used as standalone
Expand Down
10 changes: 5 additions & 5 deletions flask_xcaptcha.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"""

__NAME__ = "Flask-xCaptcha"
__version__ = "0.5.1"
__version__ = "0.5.2"
__license__ = "MIT"
__author__ = "Max Levine"
__copyright__ = "(c) 2020 Max Levine"
Expand Down Expand Up @@ -54,6 +54,10 @@ def __init__(self,
self.api_url = app.config.get("XCAPTCHA_API_URL", api_url)
self.div_class = app.config.get("XCAPTCHA_DIV_CLASS", div_class)

@app.context_processor
def get_code():
return dict(xcaptcha=Markup(self.get_code()))

elif site_key is not None:
self.site_key = site_key
self.secret_key = secret_key
Expand All @@ -66,10 +70,6 @@ def __init__(self,
self.api_url = api_url
self.div_class = div_class

@app.context_processor
def get_code():
return dict(xcaptcha=Markup(self.get_code()))

def get_code(self):
"""
Returns the new XCaptcha code
Expand Down
11 changes: 7 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
description="The new xCaptcha implementation for Flask without Flask-WTF",
long_description=long_description,
long_description_content_type="text/markdown",
url='https://github.com/benjilev08/flask-xcaptcha',
download_url='https://github.com/benjilev08/flask-xcaptcha/tarball/master',
url='https://github.com/bmaximuml/flask-xcaptcha',
download_url='https://github.com/bmaximuml/flask-xcaptcha/tarball/master',
py_modules=['flask_xcaptcha'],
include_package_data=True,
packages=find_packages(),
Expand All @@ -34,10 +34,13 @@
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
'Topic :: Software Development :: Libraries :: Python Modules'
],
Expand Down

0 comments on commit 48c0a28

Please sign in to comment.