From 1a880815dcef651d14dcc6780670aa52bba038a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Thu, 9 Dec 2021 17:44:02 +0100 Subject: [PATCH 1/6] Remove references to SQLite files in gitignore We don't use SQLite and we don't support it, so these files shouldn't exist in the first place. --- .gitignore | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.gitignore b/.gitignore index f973f1158..11b4a8140 100644 --- a/.gitignore +++ b/.gitignore @@ -7,10 +7,6 @@ # Ignore bundler config. /.bundle -# Ignore the default SQLite database. -/db/*.sqlite3 -/db/*.sqlite3-journal - # Ignore all logfiles and tempfiles. /log/* !/log/.keep From e98dc0923c409c8f922379719b5d7985659b5232 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Thu, 9 Dec 2021 17:47:07 +0100 Subject: [PATCH 2/6] Remove reference to beta testers file in gitignore This feature was removed in commit 1e0ac137bb8d. --- .gitignore | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitignore b/.gitignore index 11b4a8140..2d77a00fa 100644 --- a/.gitignore +++ b/.gitignore @@ -20,7 +20,6 @@ /coverage -/config/beta-testers.txt .byebug_history # Mac finder artifacts From f5152179e1d2fbea4cd1e4b4f43714b7883fa3d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Thu, 9 Dec 2021 17:57:05 +0100 Subject: [PATCH 3/6] Remove references to IDEA files in gitignore We can't cover the files for every editor out there, so we're removing it in the name of neutrality. Developers using this editor to work with CONSUL can add the `.idea` to their global gitignore configuration (on GNU/Linux systems, for instance, the `~/.config/git/ignore` file). --- .gitignore | 3 --- 1 file changed, 3 deletions(-) diff --git a/.gitignore b/.gitignore index 2d77a00fa..ac202b0d6 100644 --- a/.gitignore +++ b/.gitignore @@ -25,9 +25,6 @@ # Mac finder artifacts .DS_Store -# Intellij IDE project settings -/.idea - .ruby-gemset public/sitemap.xml From fc70ba3db540a9ca968fc4ab117b6705614b8ddb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Thu, 9 Dec 2021 18:00:18 +0100 Subject: [PATCH 4/6] Define paths in gitignore in a consistent way We used a slash as a prefix in some cases but not in other cases. Now we're defining files and folders following the gitignore rules: files starting with a slash are only ignored in the root folder, while files not starting with it are ignored everywhere. IMHO it makes sense to ignore all folders named `tmp`, `.bundle`, `log`, `.DS_Store` or `.ruby-gemset` everywhere in the source code and not only in the root folder. We're also adding a trailing slash to all folders for consistency. --- .gitignore | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.gitignore b/.gitignore index ac202b0d6..ec7b325ab 100644 --- a/.gitignore +++ b/.gitignore @@ -5,12 +5,12 @@ # git config --global core.excludesfile '~/.gitignore_global' # Ignore bundler config. -/.bundle +.bundle/ # Ignore all logfiles and tempfiles. -/log/* -!/log/.keep -/tmp +log/* +!log/.keep +tmp/ /spec/examples.txt /config/database.yml @@ -18,7 +18,7 @@ /config/deploy-secrets.yml /config/maintenance.yml -/coverage +/coverage/ .byebug_history @@ -27,9 +27,9 @@ .ruby-gemset -public/sitemap.xml -public/assets/ -public/machine_learning/data/ -public/system/ +/public/sitemap.xml +/public/assets/ +/public/machine_learning/data/ +/public/system/ /public/ckeditor_assets/ -storage/ +/storage/ From f487e9f0d0b39c655d9ae78afd01a6943fc9a8fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Thu, 9 Dec 2021 18:07:11 +0100 Subject: [PATCH 5/6] Reorganize gitignore file So it's easier to follow. --- .gitignore | 43 +++++++++++++++++++++++-------------------- 1 file changed, 23 insertions(+), 20 deletions(-) diff --git a/.gitignore b/.gitignore index ec7b325ab..7e10963eb 100644 --- a/.gitignore +++ b/.gitignore @@ -4,32 +4,35 @@ # or operating system, you probably want to add a global ignore instead: # git config --global core.excludesfile '~/.gitignore_global' -# Ignore bundler config. -.bundle/ - -# Ignore all logfiles and tempfiles. -log/* -!log/.keep -tmp/ - -/spec/examples.txt +# Confidential information /config/database.yml /config/secrets.yml /config/deploy-secrets.yml /config/maintenance.yml -/coverage/ +# Logfiles and tempfiles. +log/* +!log/.keep +tmp/ -.byebug_history - -# Mac finder artifacts -.DS_Store - -.ruby-gemset - -/public/sitemap.xml -/public/assets/ -/public/machine_learning/data/ +# Files attached by users /public/system/ /public/ckeditor_assets/ /storage/ + +# Files generated by scripts or compiled +/public/sitemap.xml +/public/assets/ +/public/machine_learning/data/ + +# Bundler config, cache and gemsets +.bundle/ +.ruby-gemset + +# Files used in local development +.byebug_history +.DS_Store + +# Test results +/spec/examples.txt +/coverage/ From 0b3c39d437b2974e94295d7ba892ddf7377970ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Thu, 9 Dec 2021 18:08:48 +0100 Subject: [PATCH 6/6] Add dockerignore file Note there's a difference between gitignore and dockerignore; in .gitignore, files without a leading slash match files in every folder, while in .dockerignore, they match files in the root folder --- .dockerignore | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .dockerignore diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 000000000..a85b5fb6b --- /dev/null +++ b/.dockerignore @@ -0,0 +1,36 @@ +# Version control +.git +.gitignore + +# Confidential information +config/database.yml +config/secrets.yml +config/deploy-secrets.yml +config/maintenance.yml + +# Logfiles and tempfiles. +**/log/* +!**/log/.keep +**/tmp/ + +# Files attached by users +public/system/ +public/ckeditor_assets/ +storage/ + +# Files generated by scripts or compiled +public/sitemap.xml +public/assets/ +public/machine_learning/data/ + +# Bundler config, cache and gemsets +**/.bundle/ +**/.ruby-gemset + +# Files used in local development +**/.byebug_history +**/.DS_Store + +# Test results +spec/examples.txt +coverage/