Skip to content

Commit e66f0fe

Browse files
authored
Merge pull request #91 from wimglenn/update-user-agent
include email contact in user-agent string, closes #90
2 parents d24b4e9 + 9452c46 commit e66f0fe

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

aocd/models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
AOCD_DATA_DIR = os.path.expanduser(os.environ.get("AOCD_DIR", os.path.join("~", ".config", "aocd")))
4141
AOCD_CONFIG_DIR = os.path.expanduser(os.environ.get("AOCD_CONFIG_DIR", AOCD_DATA_DIR))
4242
URL = "https://adventofcode.com/{year}/day/{day}"
43-
USER_AGENT = {"User-Agent": "advent-of-code-data v{}".format(__version__)}
43+
USER_AGENT = {"User-Agent": "github.com/wimglenn/advent-of-code-data v{} by [email protected]".format(__version__)}
4444

4545

4646
class User(object):

aocd/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "1.2.2"
1+
__version__ = "1.2.3"

tests/test_get_data.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ def test_aocd_user_agent_in_req_headers(requests_mock):
102102
aocd.get_data(year=2018, day=1)
103103
assert mock.call_count == 1
104104
headers = mock.last_request._request.headers
105-
expected = "advent-of-code-data v{}".format(aocd.__version__)
105+
expected = "github.com/wimglenn/advent-of-code-data v{} by [email protected]".format(aocd.__version__)
106106
assert headers["User-Agent"] == expected
107107

108108

0 commit comments

Comments
 (0)