diff options
author | Anish Athalye <me@anishathalye.com> | 2018-06-11 21:14:10 -0400 |
---|---|---|
committer | Anish Athalye <me@anishathalye.com> | 2018-06-11 21:14:10 -0400 |
commit | 9d967ad7e8f22c6426d559dd211f1cba766a687e (patch) | |
tree | e07cfb532fc620255d35c3ed6a7b837194c6c783 | |
parent | f7a8bf10ba1d4073f6501ea1518d0e94ded4ac0e (diff) |
Include built-in plugins in PyPI distribution
-rw-r--r-- | dotbot/cli.py | 2 | ||||
-rw-r--r-- | dotbot/plugins/__init__.py | 3 | ||||
-rw-r--r-- | dotbot/plugins/clean.py (renamed from plugins/clean.py) | 0 | ||||
-rw-r--r-- | dotbot/plugins/link.py (renamed from plugins/link.py) | 0 | ||||
-rw-r--r-- | dotbot/plugins/shell.py (renamed from plugins/shell.py) | 0 | ||||
-rw-r--r-- | test/tests/plugin-disable-builtin.bash | 17 |
6 files changed, 21 insertions, 1 deletions
diff --git a/dotbot/cli.py b/dotbot/cli.py index 0674cbe..aec6097 100644 --- a/dotbot/cli.py +++ b/dotbot/cli.py @@ -52,7 +52,7 @@ def main(): log.set_level(Level.DEBUG) plugin_directories = list(options.plugin_dirs) if not options.disable_built_in_plugins: - plugin_directories.append(os.path.join(os.path.dirname(__file__), '..', 'plugins')) + from .plugins import Clean, Link, Shell plugin_paths = [] for directory in plugin_directories: for plugin_path in glob.glob(os.path.join(directory, '*.py')): diff --git a/dotbot/plugins/__init__.py b/dotbot/plugins/__init__.py new file mode 100644 index 0000000..93bd981 --- /dev/null +++ b/dotbot/plugins/__init__.py @@ -0,0 +1,3 @@ +from .clean import Clean +from .link import Link +from .shell import Shell diff --git a/plugins/clean.py b/dotbot/plugins/clean.py index 7e6cba1..7e6cba1 100644 --- a/plugins/clean.py +++ b/dotbot/plugins/clean.py diff --git a/plugins/link.py b/dotbot/plugins/link.py index 5274e3b..5274e3b 100644 --- a/plugins/link.py +++ b/dotbot/plugins/link.py diff --git a/plugins/shell.py b/dotbot/plugins/shell.py index b6f5184..b6f5184 100644 --- a/plugins/shell.py +++ b/dotbot/plugins/shell.py diff --git a/test/tests/plugin-disable-builtin.bash b/test/tests/plugin-disable-builtin.bash new file mode 100644 index 0000000..f469b0f --- /dev/null +++ b/test/tests/plugin-disable-builtin.bash @@ -0,0 +1,17 @@ +test_description='can disable built-in plugins' +. '../test-lib.bash' + +test_expect_success 'setup' ' +echo "apple" > ${DOTFILES}/f +' + +test_expect_failure 'run' ' +run_dotbot --disable-built-in-plugins <<EOF +- link: + ~/.f: f +EOF +' + +test_expect_failure 'test' ' +test -f ~/.f +' |