<commit_before>diff --git a/Gemfile b/Gemfile
index c381ef85d581..3ce7b07db103 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?
 
 # Configuration management
 gem "cconfig", "~> 1.1.0"
@@ -71,6 +71,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
@@ -87,7 +88,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 1002b93fbe80..51a627efb99c 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -129,7 +129,7 @@ GEM
       octokit (~> 2.0.0)
       yajl-ruby
     gli (2.8.1)
-    globalid (0.3.7)
+    globalid (0.3.5)
       activesupport (>= 4.1.0)
     gravatar_image_tag (1.2.0)
     guard (2.13.0)
@@ -182,15 +182,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)
@@ -218,7 +218,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)
@@ -241,7 +241,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)
@@ -259,11 +259,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)
@@ -331,18 +331,18 @@ GEM
       temple (~> 0.6.6)
       tilt (>= 1.3.3, < 2.1)
     slop (3.6.0)
-    sprockets (2.12.4)
+    sprockets (2.12.3)
       hike (~> 1.2)
       multi_json (~> 1.0)
       rack (~> 1.0)
       tilt (~> 1.1, != 1.3.0)
-    sprockets-rails (2.3.3)
+    sprockets-rails (2.3.1)
       actionpack (>= 3.0)
       activesupport (>= 3.0)
       sprockets (>= 2.8, < 4.0)
     temple (0.6.7)
     terminal-table (1.5.2)
-    thor (0.19.1)
+    thor (0.18.1)
     thread_safe (0.3.5)
     tilt (1.4.1)
     timecop (0.7.4)
@@ -422,7 +422,7 @@ DEPENDENCIES
   poltergeist (~> 1.15.0)
   pry-rails
   public_activity
-  puma (~> 3.7.0)
+  puma (~> 2.16.0)
   pundit
   quiet_assets
   rack-mini-profiler<commit_msg>packaging: updated patch<commit_after>diff --git a/Gemfile b/Gemfile
index 0afcfc575188..3f871ae49680 100644
--- a/Gemfile
+++ b/Gemfile
@@ -57,7 +57,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?
 
 # Configuration management
 gem "cconfig", "~> 1.1.0"
@@ -76,6 +76,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
@@ -92,7 +93,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 2198731871ca..9e8c6f5830a2 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -143,7 +143,7 @@ GEM
       octokit (~> 2.0.0)
       yajl-ruby
     gli (2.8.1)
-    globalid (0.3.7)
+    globalid (0.3.5)
       activesupport (>= 4.1.0)
     grape (0.19.2)
       activesupport
@@ -220,9 +220,9 @@ GEM
     mime-types (3.1)
       mime-types-data (~> 3.2015)
     mime-types-data (3.2016.0521)
-    mini_portile2 (2.0.0)
-    minitest (5.10.2)
-    multi_json (1.12.1)
+    mini_portile (0.5.2)
+    minitest (5.7.0)
+    multi_json (1.8.2)
     multi_xml (0.6.0)
     multipart-post (2.0.0)
     mustermann (1.0.0)
@@ -231,8 +231,8 @@ GEM
     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)
@@ -260,7 +260,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)
@@ -285,7 +285,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)
@@ -303,11 +303,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)
@@ -375,18 +375,18 @@ GEM
       temple (>= 0.7.6, < 0.9)
       tilt (>= 1.3.3, < 2.1)
     slop (3.6.0)
-    sprockets (2.12.4)
+    sprockets (2.12.3)
       hike (~> 1.2)
       multi_json (~> 1.0)
       rack (~> 1.0)
       tilt (~> 1.1, != 1.3.0)
-    sprockets-rails (2.3.3)
+    sprockets-rails (2.3.1)
       actionpack (>= 3.0)
       activesupport (>= 3.0)
       sprockets (>= 2.8, < 4.0)
     temple (0.8.0)
     terminal-table (1.5.2)
-    thor (0.19.1)
+    thor (0.18.1)
     thread_safe (0.3.6)
     tilt (1.4.1)
     timecop (0.7.4)
@@ -477,7 +477,7 @@ DEPENDENCIES
   poltergeist (~> 1.15.0)
   pry-rails
   public_activity
-  puma (~> 3.7.0)
+  puma (~> 2.16.0)
   pundit
   quiet_assets
   rack-mini-profiler
{'fraction_non_alphanumeric': 0.19957050823192554, 'fraction_numerical': 0.11939871152469578, 'mean_word_length': 2.015105740181269, 'pattern_counts': {'":': 0, '<': 14, '<?xml version=': 0, '>': 77, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 1}, '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': '6607910', 'n_tokens_mistral': 3610, 'n_tokens_neox': 3287, 'n_words': 614}