From 9a700f64522400f686bfd6df2a0019ac191861e6 Mon Sep 17 00:00:00 2001 From: Raphael Pierzina Date: Sat, 24 Jun 2017 15:28:40 +0200 Subject: [PATCH 1/4] Add GitLab to builtin repo abbreviations --- cookiecutter/config.py | 1 + 1 file changed, 1 insertion(+) diff --git a/cookiecutter/config.py b/cookiecutter/config.py index 35bfc4997..f2e7d24be 100644 --- a/cookiecutter/config.py +++ b/cookiecutter/config.py @@ -20,6 +20,7 @@ BUILTIN_ABBREVIATIONS = { 'gh': 'https://github.com/{0}.git', + 'gl': 'https://gitlab.com/{0}.git', 'bb': 'https://bitbucket.org/{0}', } From b2c53e8ea2a146b7f83a752ca1ffd3a7e90efaa5 Mon Sep 17 00:00:00 2001 From: Raphael Pierzina Date: Sat, 24 Jun 2017 15:45:50 +0200 Subject: [PATCH 2/4] Update tests with gitlab abbreviation --- tests/test_get_config.py | 2 ++ tests/test_get_user_config.py | 1 + 2 files changed, 3 insertions(+) diff --git a/tests/test_get_config.py b/tests/test_get_config.py index 0c2968c3b..441c17349 100644 --- a/tests/test_get_config.py +++ b/tests/test_get_config.py @@ -23,6 +23,7 @@ def test_get_config(): }, 'abbreviations': { 'gh': 'https://github.com/{0}.git', + 'gl': 'https://gitlab.com/{0}.git', 'bb': 'https://bitbucket.org/{0}', } } @@ -70,6 +71,7 @@ def test_get_config_with_defaults(): }, 'abbreviations': { 'gh': 'https://github.com/{0}.git', + 'gl': 'https://gitlab.com/{0}.git', 'bb': 'https://bitbucket.org/{0}', } } diff --git a/tests/test_get_user_config.py b/tests/test_get_user_config.py index 2fbea32f4..21d888649 100644 --- a/tests/test_get_user_config.py +++ b/tests/test_get_user_config.py @@ -69,6 +69,7 @@ def custom_config(): 'replay_dir': '/home/example/some-path-to-replay-files', 'abbreviations': { 'gh': 'https://github.com/{0}.git', + 'gl': 'https://gitlab.com/{0}.git', 'bb': 'https://bitbucket.org/{0}', } } From 5686580ce6af21fc9cf6d01e4f669b3577ba536c Mon Sep 17 00:00:00 2001 From: Raphael Pierzina Date: Sat, 24 Jun 2017 15:47:04 +0200 Subject: [PATCH 3/4] Add gl abbreviation to docs in user_config.rst --- docs/advanced/user_config.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/advanced/user_config.rst b/docs/advanced/user_config.rst index f6fae9359..96f500898 100644 --- a/docs/advanced/user_config.rst +++ b/docs/advanced/user_config.rst @@ -49,5 +49,5 @@ Possible settings are: the text `{0}`, using standard Python string formatting. With the above aliases, you could use the `cookiecutter-pypackage` template simply by saying `cookiecutter pp`, or `cookiecutter gh:audreyr/cookiecutter-pypackage`. - The `gh` (github) and `bb` (bitbucket) abbreviations shown above are actually - built in, and can be used without defining them yourself. + The `gh` (github), `bb` (bitbucket), and `gl` (gitlab) abbreviations shown + above are actually built in, and can be used without defining them yourself. From 9b4c0734766edf7a53b8ed880e6f550e89e42746 Mon Sep 17 00:00:00 2001 From: Raphael Pierzina Date: Sat, 24 Jun 2017 15:52:45 +0200 Subject: [PATCH 4/4] Add GitLab abbreviation to docs/usage.rst --- docs/usage.rst | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/usage.rst b/docs/usage.rst index cb384e27b..0d8b32595 100644 --- a/docs/usage.rst +++ b/docs/usage.rst @@ -16,7 +16,7 @@ Modify the variables defined in `cookiecutter.json`. Open up the skeleton project. If you need to change it around a bit, do so. -You probably also want to create a repo, name it differently, and push it as +You probably also want to create a repo, name it differently, and push it as your own new Cookiecutter project template, for handy future use. Generate your project @@ -42,8 +42,9 @@ To create a project from the cookiecutter-pypackage.git repo template:: $ cookiecutter gh:audreyr/cookiecutter-pypackage -Cookiecutter knows abbreviations for Github (``gh``) and Bitbucket (``bb``) -projects, but you can also give it the full URL to any repository:: +Cookiecutter knows abbreviations for Github (``gh``), Bitbucket (``bb``), and +GitLab (``gl``) projects, but you can also give it the full URL to any +repository:: $ cookiecutter https://github.com/audreyr/cookiecutter-pypackage.git $ cookiecutter git+ssh://git@github.com/audreyr/cookiecutter-pypackage.git