<commit_before>diff --git a/Gemfile b/Gemfile
index 8a38da8500cf..0bf4a7210d86 100644
--- a/Gemfile
+++ b/Gemfile
@@ -52,7 +52,7 @@ def packaging?
 end
 
 # If the deployment is done through Puma, include it in the bundle.
-gem "puma", "~> 3.7.0" if ENV["PORTUS_PUMA_DEPLOYMENT"] == "yes" || !packaging?
+gem "puma", "~> 2.16.0" if ENV["PORTUS_PUMA_DEPLOYMENT"] == "yes" || !packaging?
 
 # In order to create the Gemfile.lock required for packaging
 # meaning that it should contain only the production packages
@@ -68,6 +68,7 @@ unless packaging?
     gem "pry-rails"
     gem "git-review", require: false
     gem "rack-mini-profiler", require: false
+    gem "brakeman", require: false
     gem "guard", require: false
     gem "guard-rubocop", require: false
     gem "guard-rspec", require: false
@@ -84,7 +85,6 @@ unless packaging?
     gem "factory_girl_rails"
     gem "ffaker"
     gem "rubocop", "~> 0.41.2", require: false
-    gem "brakeman", require: false
     gem "database_cleaner"
     gem "md2man", "~>5.1.1", require: false
     gem "binman", "~>5.1.0"
diff --git a/Gemfile.lock b/Gemfile.lock
index 61dab306fd1e..ff8cf25b3fd4 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -180,15 +180,15 @@ GEM
     mime-types (3.1)
       mime-types-data (~> 3.2015)
     mime-types-data (3.2016.0521)
-    mini_portile2 (2.0.0)
-    minitest (5.8.4)
-    multi_json (1.11.2)
+    mini_portile (0.5.2)
+    minitest (5.7.0)
+    multi_json (1.8.2)
     multipart-post (2.0.0)
     mysql2 (0.4.7)
     nenv (0.3.0)
     net-ldap (0.11)
-    nokogiri (1.6.7.2)
-      mini_portile2 (~> 2.0.0.rc2)
+    nokogiri (1.6.1)
+      mini_portile (~> 0.5.0)
     notiffany (0.0.8)
       nenv (~> 0.1)
       shellany (~> 0.0)
@@ -216,7 +216,7 @@ GEM
       activerecord (>= 3.0)
       i18n (>= 0.5.0)
       railties (>= 3.0.0)
-    puma (3.7.0)
+    puma (2.16.0)
     pundit (1.0.1)
       activesupport (>= 3.0.0)
     quiet_assets (1.1.0)
@@ -239,7 +239,7 @@ GEM
       sprockets-rails
     rails-deprecated_sanitizer (1.0.3)
       activesupport (>= 4.2.0.alpha)
-    rails-dom-testing (1.0.7)
+    rails-dom-testing (1.0.6)
       activesupport (>= 4.2.0.beta, < 5.0)
       nokogiri (~> 1.6.0)
       rails-deprecated_sanitizer (>= 1.0.1)
@@ -248,7 +248,7 @@ GEM
       activesupport (>= 3.2)
       choice (~> 0.2.0)
       ruby-graphviz (~> 1.2)
-    rails-html-sanitizer (1.0.3)
+    rails-html-sanitizer (1.0.2)
       loofah (~> 2.0)
     rails_stdout_logging (0.0.5)
     railties (4.2.8)
@@ -257,11 +257,11 @@ GEM
       rake (>= 0.8.7)
       thor (>= 0.18.1, < 2.0)
     rainbow (2.1.0)
-    rake (11.1.2)
+    rake (10.3.2)
     rb-fsevent (0.9.7)
     rb-inotify (0.9.7)
       ffi (>= 0.5.0)
-    redcarpet (3.3.3)
+    redcarpet (3.2.3)
     responders (2.1.0)
       railties (>= 4.2.0, < 5)
     rouge (1.11.1)
@@ -329,18 +329,18 @@ GEM<commit_msg>packaging: rails-html-sanitizer has been upgraded<commit_after>diff --git a/Gemfile b/Gemfile
index 8a38da8500cf..0bf4a7210d86 100644
--- a/Gemfile
+++ b/Gemfile
@@ -52,7 +52,7 @@ def packaging?
 end

 # If the deployment is done through Puma, include it in the bundle.
-gem "puma", "~> 3.7.0" if ENV["PORTUS_PUMA_DEPLOYMENT"] == "yes" || !packaging?
+gem "puma", "~> 2.16.0" if ENV["PORTUS_PUMA_DEPLOYMENT"] == "yes" || !packaging?

 # In order to create the Gemfile.lock required for packaging
 # meaning that it should contain only the production packages
@@ -68,6 +68,7 @@ unless packaging?
     gem "pry-rails"
     gem "git-review", require: false
     gem "rack-mini-profiler", require: false
+    gem "brakeman", require: false
     gem "guard", require: false
     gem "guard-rubocop", require: false
     gem "guard-rspec", require: false
@@ -84,7 +85,6 @@ unless packaging?
     gem "factory_girl_rails"
     gem "ffaker"
     gem "rubocop", "~> 0.41.2", require: false
-    gem "brakeman", require: false
     gem "database_cleaner"
     gem "md2man", "~>5.1.1", require: false
     gem "binman", "~>5.1.0"
diff --git a/Gemfile.lock b/Gemfile.lock
index 61dab306fd1e..ff8cf25b3fd4 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -180,15 +180,15 @@ GEM
     mime-types (3.1)
       mime-types-data (~> 3.2015)
     mime-types-data (3.2016.0521)
-    mini_portile2 (2.0.0)
-    minitest (5.8.4)
-    multi_json (1.11.2)
+    mini_portile (0.5.2)
+    minitest (5.7.0)
+    multi_json (1.8.2)
     multipart-post (2.0.0)
     mysql2 (0.4.7)
     nenv (0.3.0)
     net-ldap (0.11)
-    nokogiri (1.6.7.2)
-      mini_portile2 (~> 2.0.0.rc2)
+    nokogiri (1.6.1)
+      mini_portile (~> 0.5.0)
     notiffany (0.0.8)
       nenv (~> 0.1)
       shellany (~> 0.0)
@@ -216,7 +216,7 @@ GEM
       activerecord (>= 3.0)
       i18n (>= 0.5.0)
       railties (>= 3.0.0)
-    puma (3.7.0)
+    puma (2.16.0)
     pundit (1.0.1)
       activesupport (>= 3.0.0)
     quiet_assets (1.1.0)
@@ -239,7 +239,7 @@ GEM
       sprockets-rails
     rails-deprecated_sanitizer (1.0.3)
       activesupport (>= 4.2.0.alpha)
-    rails-dom-testing (1.0.7)
+    rails-dom-testing (1.0.6)
       activesupport (>= 4.2.0.beta, < 5.0)
       nokogiri (~> 1.6.0)
       rails-deprecated_sanitizer (>= 1.0.1)
@@ -257,11 +257,11 @@ GEM
       rake (>= 0.8.7)
       thor (>= 0.18.1, < 2.0)
     rainbow (2.1.0)
-    rake (11.1.2)
+    rake (10.3.2)
     rb-fsevent (0.9.7)
     rb-inotify (0.9.7)
       ffi (>= 0.5.0)
-    redcarpet (3.3.3)
+    redcarpet (3.2.3)
     responders (2.1.0)
       railties (>= 4.2.0, < 5)
     rouge (1.11.1)
@@ -329,18 +329,18 @@ GEM
{'fraction_non_alphanumeric': 0.18865530989488946, 'fraction_numerical': 0.1089162740123233, 'mean_word_length': 2.246470588235294, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 51, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5101515', 'n_tokens_mistral': 2731, 'n_tokens_neox': 2467, 'n_words': 500}