Rename simplefs to webroot

This commit is contained in:
Jakub Warmuz 2015-10-04 09:11:37 +00:00
parent 5d54871ca2
commit d88455a1b9
No known key found for this signature in database
GPG key ID: 2A7BAD3A489B52EA
5 changed files with 16 additions and 16 deletions

View file

@ -1,5 +0,0 @@
:mod:`letsencrypt.plugins.simplefs`
-----------------------------------
.. automodule:: letsencrypt.plugins.simplefs
:members:

View file

@ -0,0 +1,5 @@
:mod:`letsencrypt.plugins.webroot`
----------------------------------
.. automodule:: letsencrypt.plugins.webroot
:members:

View file

@ -1,4 +1,4 @@
"""SimpleFS plugin."""
"""Webroot plugin."""
import errno
import logging
import os
@ -16,11 +16,11 @@ logger = logging.getLogger(__name__)
class Authenticator(common.Plugin):
"""SimpleFS Authenticator."""
"""Webroot Authenticator."""
zope.interface.implements(interfaces.IAuthenticator)
zope.interface.classProvides(interfaces.IPluginFactory)
description = "SimpleFS Authenticator"
description = "Webroot Authenticator"
MORE_INFO = """\
Authenticator plugin that performs SimpleHTTP challenge by saving

View file

@ -1,4 +1,4 @@
"""Tests for letsencrypt.plugins.simplefs."""
"""Tests for letsencrypt.plugins.webroot."""
import os
import shutil
import tempfile
@ -19,19 +19,19 @@ KEY = jose.JWKRSA.load(test_util.load_vector("rsa512_key.pem"))
class AuthenticatorTest(unittest.TestCase):
"""Tests for letsencrypt.plugins.simplefs.Authenticator."""
"""Tests for letsencrypt.plugins.webroot.Authenticator."""
achall = achallenges.SimpleHTTP(
challb=acme_util.SIMPLE_HTTP_P, domain=None, account_key=KEY)
def setUp(self):
from letsencrypt.plugins.simplefs import Authenticator
from letsencrypt.plugins.webroot import Authenticator
self.root = tempfile.mkdtemp()
self.validation_path = os.path.join(
self.root, ".well-known", "acme-challenge",
"ZXZhR3hmQURzNnBTUmIyTEF2OUlaZjE3RHQzanV4R0orUEN0OTJ3citvQQ")
self.config = mock.MagicMock(simplefs_root=self.root)
self.auth = Authenticator(self.config, "simplefs")
self.config = mock.MagicMock(webroot_root=self.root)
self.auth = Authenticator(self.config, "webroot")
self.auth.prepare()
def tearDown(self):
@ -48,11 +48,11 @@ class AuthenticatorTest(unittest.TestCase):
self.assertEqual(1, add.call_count)
def test_prepare_bad_root(self):
self.config.simplefs_root = os.path.join(self.root, "null")
self.config.webroot_root = os.path.join(self.root, "null")
self.assertRaises(errors.PluginError, self.auth.prepare)
def test_prepare_missing_root(self):
self.config.simplefs_root = None
self.config.webroot_root = None
self.assertRaises(errors.PluginError, self.auth.prepare)
def test_prepare_full_root_exists(self):

View file

@ -119,7 +119,7 @@ setup(
'letsencrypt.plugins': [
'manual = letsencrypt.plugins.manual:Authenticator',
'null = letsencrypt.plugins.null:Installer',
'simplefs = letsencrypt.plugins.simplefs:Authenticator',
'webroot = letsencrypt.plugins.webroot:Authenticator',
'standalone = letsencrypt.plugins.standalone.authenticator'
':StandaloneAuthenticator',
],