diff --git a/.gitignore b/.gitignore index 48ec7910b..ac2842e27 100644 --- a/.gitignore +++ b/.gitignore @@ -24,6 +24,7 @@ tags *.sw? \#*# .idea +.ropeproject # auth --cert-path --chain-path /*.pem diff --git a/CHANGES.rst b/CHANGES.rst index 4ce41a8bc..3b92c125f 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,11 +1,8 @@ ChangeLog ========= -Please note: -the change log will only get updated after first release - for now please use the -`commit log `_. +To see the changes in a given release, view the issues closed in a given +release's GitHub milestone: -To see the changes in a given release, inspect the github milestone for the -release. For instance: - -https://github.com/certbot/certbot/issues?utf8=%E2%9C%93&q=milestone%3A0.3.0 + - `Past releases `_ + - `Upcoming releases `_ diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 5f1625658..d740b7d89 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -15,4 +15,21 @@ to the Sphinx generated docs is provided below. --> -https://certbot.eff.org/docs/contributing.html +# Certbot Contributing Guide + +Hi! Welcome to the Certbot project. We look forward to collaborating with you. + +If you're reporting a bug in Certbot, please make sure to include: + - The version of Certbot you're running. + - The operating system you're running it on. + - The commands you ran. + - What you expected to happen, and + - What actually happened. + +If you're a developer, we have some helpful information in our +[Developer's Guide](https://certbot.eff.org/docs/contributing.html) to get you +started. In particular, we recommend you read these sections + + - [Finding issues to work on](https://certbot.eff.org/docs/contributing.html#find-issues-to-work-on) + - [Coding style](https://certbot.eff.org/docs/contributing.html#coding-style) + - [Submitting a pull request](https://certbot.eff.org/docs/contributing.html#submitting-a-pull-request) diff --git a/certbot/display/ops.py b/certbot/display/ops.py index e8520fe96..ee570221f 100644 --- a/certbot/display/ops.py +++ b/certbot/display/ops.py @@ -103,18 +103,8 @@ def choose_names(installer): names = get_valid_domains(domains) if not names: - manual = z_util(interfaces.IDisplay).yesno( - "No names were found in your configuration files.{0}You should " - "specify ServerNames in your config files in order to allow for " - "accurate installation of your certificate.{0}" - "If you do use the default vhost, you may specify the name " - "manually. Would you like to continue?{0}".format(os.linesep), - default=True) - - if manual: - return _choose_names_manually() - else: - return [] + return _choose_names_manually( + "No names were found in your configuration files. ") code, names = _filter_names(names) if code == display_util.OK and names: @@ -157,10 +147,17 @@ def _filter_names(names): return code, [str(s) for s in names] -def _choose_names_manually(): - """Manually input names for those without an installer.""" +def _choose_names_manually(prompt_prefix=""): + """Manually input names for those without an installer. + :param str prompt_prefix: string to prepend to prompt for domains + + :returns: list of provided names + :rtype: `list` of `str` + + """ code, input_ = z_util(interfaces.IDisplay).input( + prompt_prefix + "Please enter in your domain name(s) (comma and/or space separated) ", cli_flag="--domains") diff --git a/certbot/tests/display/ops_test.py b/certbot/tests/display/ops_test.py index 26f67b69f..2e3e65261 100644 --- a/certbot/tests/display/ops_test.py +++ b/certbot/tests/display/ops_test.py @@ -206,20 +206,14 @@ class ChooseNamesTest(unittest.TestCase): @mock.patch("certbot.display.ops.z_util") def test_no_names_choose(self, mock_util): self.mock_install().get_all_names.return_value = set() - mock_util().yesno.return_value = True domain = "example.com" mock_util().input.return_value = (display_util.OK, domain) actual_doms = self._call(self.mock_install) self.assertEqual(mock_util().input.call_count, 1) self.assertEqual(actual_doms, [domain]) - - @mock.patch("certbot.display.ops.z_util") - def test_no_names_quit(self, mock_util): - self.mock_install().get_all_names.return_value = set() - mock_util().yesno.return_value = False - - self.assertEqual(self._call(self.mock_install), []) + self.assertTrue( + "configuration files" in mock_util().input.call_args[0][0]) @mock.patch("certbot.display.ops.z_util") def test_filter_names_valid_return(self, mock_util):