From 97dd95194a7ee671bbb09903c04a1d57192f49c7 Mon Sep 17 00:00:00 2001 From: Gabo Date: Wed, 15 Jul 2020 14:04:55 -0500 Subject: [PATCH 1/4] User gemfile for dependabot and update rubocop --- Dockerfile | 15 +++-------- dependencies/Gemfile | 10 +++++++ dependencies/Gemfile.lock | 55 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 69 insertions(+), 11 deletions(-) create mode 100644 dependencies/Gemfile create mode 100644 dependencies/Gemfile.lock diff --git a/Dockerfile b/Dockerfile index 9b50bb40..6704cfca 100644 --- a/Dockerfile +++ b/Dockerfile @@ -83,17 +83,10 @@ RUN npm config set package-lock false \ ############################# ENV PATH="/node_modules/.bin:${PATH}" -#################### -# Run GEM installs # -#################### -RUN gem install rubocop:0.74.0 rubocop-rails rubocop-github:0.13.0 - -# Need to fix the version as it installs 'rubocop:0.85.1' as a dep, and forces the default -# We then need to promote the correct version, uninstall, and fix deps -RUN sh -c 'INCORRECT_VERSION=$(gem list rhc -e rubocop | grep rubocop | awk "{print $2}" | cut -d"(" -f2 | cut -d"," -f1); \ - gem install --default rubocop:0.74.0; \ - yes | gem uninstall rubocop:$INCORRECT_VERSION -a -x -I; \ - gem install rubocop:0.74.0' +############################## +# Installs ruby dependencies # +############################## +RUN bundle install ######################################### # Install Powershell + PSScriptAnalyzer # diff --git a/dependencies/Gemfile b/dependencies/Gemfile new file mode 100644 index 00000000..10236e74 --- /dev/null +++ b/dependencies/Gemfile @@ -0,0 +1,10 @@ +# frozen_string_literal: true + +source "https://rubygems.org" + +git_source(:github) {|repo_name| "https://github.com/#{repo_name}" } + + +gem "rubocop", "~> 0.82.0" +gem "rubocop-rails", "~> 2.5" +gem "rubocop-github", "~> 0.13.0" diff --git a/dependencies/Gemfile.lock b/dependencies/Gemfile.lock new file mode 100644 index 00000000..09e8fe95 --- /dev/null +++ b/dependencies/Gemfile.lock @@ -0,0 +1,55 @@ +GEM + remote: https://rubygems.org/ + specs: + activesupport (6.0.3.2) + concurrent-ruby (~> 1.0, >= 1.0.2) + i18n (>= 0.7, < 2) + minitest (~> 5.1) + tzinfo (~> 1.1) + zeitwerk (~> 2.2, >= 2.2.2) + ast (2.4.1) + concurrent-ruby (1.1.6) + i18n (1.8.3) + concurrent-ruby (~> 1.0) + jaro_winkler (1.5.4) + minitest (5.14.1) + parallel (1.19.2) + parser (2.7.1.4) + ast (~> 2.4.1) + rack (2.2.3) + rainbow (3.0.0) + rexml (3.2.4) + rubocop (0.82.0) + jaro_winkler (~> 1.5.1) + parallel (~> 1.10) + parser (>= 2.7.0.1) + rainbow (>= 2.2.2, < 4.0) + rexml + ruby-progressbar (~> 1.7) + unicode-display_width (>= 1.4.0, < 2.0) + rubocop-github (0.13.0) + rubocop (~> 0.70) + rubocop-performance (~> 1.3.0) + rubocop-performance (1.3.0) + rubocop (>= 0.68.0) + rubocop-rails (2.6.0) + activesupport (>= 4.2.0) + rack (>= 1.1) + rubocop (>= 0.82.0) + ruby-progressbar (1.10.1) + thread_safe (0.3.6) + tzinfo (1.2.7) + thread_safe (~> 0.1) + unicode-display_width (1.7.0) + zeitwerk (2.4.0) + +PLATFORMS + ruby + +DEPENDENCIES + rubocop (~> 0.82.0) + rubocop-github (~> 0.13.0) + rubocop-rails (~> 2.5) + +BUNDLED WITH + 2.1.4 From f1f0fb024122dda89c46dd664ab1b6f49d19f869 Mon Sep 17 00:00:00 2001 From: Gabo Date: Wed, 15 Jul 2020 16:18:07 -0500 Subject: [PATCH 2/4] Fix version with bug --- dependencies/Gemfile.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dependencies/Gemfile.lock b/dependencies/Gemfile.lock index 09e8fe95..679edcf3 100644 --- a/dependencies/Gemfile.lock +++ b/dependencies/Gemfile.lock @@ -29,9 +29,9 @@ GEM unicode-display_width (>= 1.4.0, < 2.0) rubocop-github (0.13.0) rubocop (~> 0.70) - rubocop-performance (~> 1.3.0) - rubocop-performance (1.3.0) - rubocop (>= 0.68.0) + rubocop-performance (~> 1.5.0) + rubocop-performance (1.5.2) + rubocop (>= 0.71.0) rubocop-rails (2.6.0) activesupport (>= 4.2.0) rack (>= 1.1) From 30c83e65fea66bb4e3be83059d6fc2eb911f38e5 Mon Sep 17 00:00:00 2001 From: Gabo Date: Wed, 15 Jul 2020 16:26:25 -0500 Subject: [PATCH 3/4] Fix rubocop github version --- dependencies/Gemfile | 2 +- dependencies/Gemfile.lock | 9 +++------ 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/dependencies/Gemfile b/dependencies/Gemfile index 10236e74..cf05a444 100644 --- a/dependencies/Gemfile +++ b/dependencies/Gemfile @@ -7,4 +7,4 @@ git_source(:github) {|repo_name| "https://github.com/#{repo_name}" } gem "rubocop", "~> 0.82.0" gem "rubocop-rails", "~> 2.5" -gem "rubocop-github", "~> 0.13.0" +gem "rubocop-github", "~> 0.14.0" diff --git a/dependencies/Gemfile.lock b/dependencies/Gemfile.lock index 679edcf3..7dcdae94 100644 --- a/dependencies/Gemfile.lock +++ b/dependencies/Gemfile.lock @@ -27,11 +27,8 @@ GEM rexml ruby-progressbar (~> 1.7) unicode-display_width (>= 1.4.0, < 2.0) - rubocop-github (0.13.0) - rubocop (~> 0.70) - rubocop-performance (~> 1.5.0) - rubocop-performance (1.5.2) - rubocop (>= 0.71.0) + rubocop-github (0.14.0) + rubocop (~> 0.59) rubocop-rails (2.6.0) activesupport (>= 4.2.0) rack (>= 1.1) @@ -48,7 +45,7 @@ PLATFORMS DEPENDENCIES rubocop (~> 0.82.0) - rubocop-github (~> 0.13.0) + rubocop-github (~> 0.14.0) rubocop-rails (~> 2.5) BUNDLED WITH From 99f45c3b29cf88351dd08f586c40147c658d4866 Mon Sep 17 00:00:00 2001 From: Gabo Date: Wed, 15 Jul 2020 16:54:38 -0500 Subject: [PATCH 4/4] Rever to non breaking rubocop version --- dependencies/Gemfile | 2 +- dependencies/Gemfile.lock | 18 ++++++++---------- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/dependencies/Gemfile b/dependencies/Gemfile index cf05a444..525cef06 100644 --- a/dependencies/Gemfile +++ b/dependencies/Gemfile @@ -5,6 +5,6 @@ source "https://rubygems.org" git_source(:github) {|repo_name| "https://github.com/#{repo_name}" } -gem "rubocop", "~> 0.82.0" +gem "rubocop", "~> 0.77.0" gem "rubocop-rails", "~> 2.5" gem "rubocop-github", "~> 0.14.0" diff --git a/dependencies/Gemfile.lock b/dependencies/Gemfile.lock index 7dcdae94..f98938fc 100644 --- a/dependencies/Gemfile.lock +++ b/dependencies/Gemfile.lock @@ -18,33 +18,31 @@ GEM ast (~> 2.4.1) rack (2.2.3) rainbow (3.0.0) - rexml (3.2.4) - rubocop (0.82.0) + rubocop (0.77.0) jaro_winkler (~> 1.5.1) parallel (~> 1.10) - parser (>= 2.7.0.1) + parser (>= 2.6) rainbow (>= 2.2.2, < 4.0) - rexml ruby-progressbar (~> 1.7) - unicode-display_width (>= 1.4.0, < 2.0) + unicode-display_width (>= 1.4.0, < 1.7) rubocop-github (0.14.0) rubocop (~> 0.59) - rubocop-rails (2.6.0) - activesupport (>= 4.2.0) + rubocop-rails (2.5.2) + activesupport rack (>= 1.1) - rubocop (>= 0.82.0) + rubocop (>= 0.72.0) ruby-progressbar (1.10.1) thread_safe (0.3.6) tzinfo (1.2.7) thread_safe (~> 0.1) - unicode-display_width (1.7.0) + unicode-display_width (1.6.1) zeitwerk (2.4.0) PLATFORMS ruby DEPENDENCIES - rubocop (~> 0.82.0) + rubocop (~> 0.77.0) rubocop-github (~> 0.14.0) rubocop-rails (~> 2.5)