From a9e4b5c4695f8bdb6c85d5a85a75c4e436eeff09 Mon Sep 17 00:00:00 2001 From: Ilya Kreymer Date: Tue, 23 Oct 2018 09:58:10 -0700 Subject: [PATCH] README: update 2.0 -> 2.1 (#396) cli: fix typo in enable-auto-fetch, add test --- README.rst | 6 +++--- pywb/apps/cli.py | 6 ++++-- tests/test_cli.py | 4 ++++ 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/README.rst b/README.rst index eeccf079..230d914a 100644 --- a/README.rst +++ b/README.rst @@ -1,4 +1,4 @@ -Webrecorder pywb 2.0 +Webrecorder pywb 2.1 ==================== .. image:: https://travis-ci.org/webrecorder/pywb.svg?branch=master @@ -11,7 +11,7 @@ Webrecorder pywb 2.0 Web Archiving Tools for All --------------------------- -`View the full pywb 2.0 documentation `_ +`View the full pywb documentation `_ **pywb** is a Python (2 and 3) web archiving toolkit for replaying web archives large and small as accurately as possible. The toolkit now also includes new features for creating high-fidelity web archives. @@ -23,7 +23,7 @@ that is used by other web archives, including the traditional "Wayback Machine" New Features ^^^^^^^^^^^^ -The 2.0 release includes a major overhaul of pywb and introduces many new features, including the following: +The 2.0 release included a major overhaul of pywb and introduces many new features, including the following: * Dynamic multi-collection configuration system with no-restart updates. diff --git a/pywb/apps/cli.py b/pywb/apps/cli.py index 4b3bd29a..031afe55 100644 --- a/pywb/apps/cli.py +++ b/pywb/apps/cli.py @@ -61,7 +61,7 @@ class BaseCli(object): parser.add_argument('--proxy-enable-wombat', action='store_true', help='Enable partial wombat JS overrides support in proxy mode') parser.add_argument('--enable-auto-fetch', action='store_true', - help='Enable auto-fetch worker to capture resources from stylesheets, imgset when running in live/recording mode') + help='Enable auto-fetch worker to capture resources from stylesheets, when running in live/recording mode') self.desc = desc self.extra_config = {} @@ -78,9 +78,11 @@ class BaseCli(object): 'recording': self.r.proxy_record, 'enable_wombat': self.r.proxy_enable_wombat } - self.extra_config['enable_auto_fetch'] = self.r.enable_auto_fetch self.r.live = True + + self.extra_config['enable_auto_fetch'] = self.r.enable_auto_fetch + self.application = self.load() if self.r.profile: diff --git a/tests/test_cli.py b/tests/test_cli.py index af96ee9a..451f401b 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -23,6 +23,10 @@ class TestProxyCLIConfig(CollsDirMixin, BaseTestClass): 'enable_wombat': False} assert res.extra_config['proxy'] == exp + def test_auto_fetch_cli(self): + res = wayback(['--enable-auto-fetch']) + assert res.extra_config['enable_auto_fetch'] == True + def test_proxy_cli_rec(self): res = wayback(['--proxy', 'test', '--proxy-record']) assert res.extra_config['proxy']['recording'] == True