14988: Uses wiselinks gem fork to fix some deprecation warnings.
authorLucas Di Pentima <ldipentima@veritasgenetics.com>
Fri, 19 Apr 2019 20:29:47 +0000 (17:29 -0300)
committerLucas Di Pentima <ldipentima@veritasgenetics.com>
Fri, 19 Apr 2019 20:29:47 +0000 (17:29 -0300)
Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <ldipentima@veritasgenetics.com>

apps/workbench/Gemfile
apps/workbench/Gemfile.lock
apps/workbench/test/unit/work_unit_test.rb

index f3e1a3d59f3ab5ba2d175ff3f7192f3be9884f02..08cf436f6342cd911c19a0992aeb9b1376087188 100644 (file)
@@ -69,7 +69,12 @@ gem 'angularjs-rails', '~> 1.3.8'
 
 gem 'less'
 gem 'less-rails'
-gem 'wiselinks'
+
+# Wiselinks hasn't been updated for many years and it's using deprecated methods
+# Use our own Wiselinks fork until this PR is accepted:
+# https://github.com/igor-alexandrov/wiselinks/pull/116
+gem 'wiselinks', git: 'https://github.com/curoverse/wiselinks.git', branch: 'rails-5.1-compatibility'
+
 gem 'sshkey'
 
 # To use ActiveModel has_secure_password
index d32cdf62060ba646dcc795732dfb2175e1fcc234..d1ea71a8507faaac1327d82885b71486040e315f 100644 (file)
@@ -12,6 +12,13 @@ GIT
     themes_for_rails (0.5.1)
       rails (>= 3.0.0)
 
+GIT
+  remote: https://github.com/curoverse/wiselinks.git
+  revision: 2c396ea5da7bbdef883fc6a70946b5886e182a80
+  branch: rails-5.1-compatibility
+  specs:
+    wiselinks (1.2.2)
+
 GEM
   remote: https://rubygems.org/
   specs:
@@ -302,7 +309,6 @@ GEM
     websocket-driver (0.6.5)
       websocket-extensions (>= 0.1.0)
     websocket-extensions (0.1.3)
-    wiselinks (1.2.1)
     xpath (2.1.0)
       nokogiri (~> 1.3)
 
@@ -358,7 +364,7 @@ DEPENDENCIES
   themes_for_rails!
   therubyracer
   uglifier (~> 2.0)
-  wiselinks
+  wiselinks!
 
 BUNDLED WITH
    1.17.3
index 1daf582553bf5ce0283e2cd4dfc0550753ca846e..7f166b5d03e549e6f0fbda5e19f3ddf10b1d99fb 100644 (file)
@@ -74,7 +74,11 @@ class WorkUnitTest < ActiveSupport::TestCase
       if walltime
         assert_equal true, (wu.walltime >= walltime)
       else
-        assert_equal walltime, wu.walltime
+        if walltime.nil?
+          assert_nil wu.walltime
+        else
+          assert_equal walltime, wu.walltime
+        end
       end
 
       if cputime