[ARVADOS] created: 1.2.0-143-g2871c4a27

Git user git at public.curoverse.com
Wed Oct 3 13:31:53 EDT 2018


        at  2871c4a27c0033392e577729e441903a1195de0c (commit)


commit 2871c4a27c0033392e577729e441903a1195de0c
Author: Peter Amstutz <pamstutz at veritasgenetics.com>
Date:   Tue Oct 2 13:56:16 2018 -0400

    14274: Fix FactoryGirl deprication warning (renamed to FactoryBot)
    
    Also fix "mocha/mini_test" -> "mocha/minitest" warning.
    
    Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <pamstutz at veritasgenetics.com>

diff --git a/services/api/Gemfile b/services/api/Gemfile
index 0dc38f1e7..5cf854b52 100644
--- a/services/api/Gemfile
+++ b/services/api/Gemfile
@@ -9,7 +9,7 @@ gem 'responders', '~> 2.0'
 gem 'protected_attributes'
 
 group :test, :development do
-  gem 'factory_girl_rails'
+  gem 'factory_bot_rails'
   gem 'database_cleaner'
   gem 'ruby-prof'
   # Note: "require: false" here tells bunder not to automatically
diff --git a/services/api/Gemfile.lock b/services/api/Gemfile.lock
index f935f2c07..3cf79b2d8 100644
--- a/services/api/Gemfile.lock
+++ b/services/api/Gemfile.lock
@@ -93,10 +93,10 @@ GEM
     eventmachine (1.2.6)
     execjs (2.7.0)
     extlib (0.9.16)
-    factory_girl (4.9.0)
+    factory_bot (4.11.1)
       activesupport (>= 3.0.0)
-    factory_girl_rails (4.9.0)
-      factory_girl (~> 4.9.0)
+    factory_bot_rails (4.11.1)
+      factory_bot (~> 4.11.1)
       railties (>= 3.0.0)
     faraday (0.12.2)
       multipart-post (>= 1.2, < 3)
@@ -294,7 +294,7 @@ DEPENDENCIES
   arvados-cli
   coffee-rails (~> 4.0)
   database_cleaner
-  factory_girl_rails
+  factory_bot_rails
   faye-websocket
   httpclient
   jquery-rails
diff --git a/services/api/test/factories/api_client.rb b/services/api/test/factories/api_client.rb
index 55f795702..ee2017bf7 100644
--- a/services/api/test/factories/api_client.rb
+++ b/services/api/test/factories/api_client.rb
@@ -2,9 +2,9 @@
 #
 # SPDX-License-Identifier: AGPL-3.0
 
-FactoryGirl.define do
+FactoryBot.define do
   factory :api_client do
-    is_trusted false
+    is_trusted { false }
     to_create do |instance|
       CurrentApiClientHelper.act_as_system_user do
         instance.save!
diff --git a/services/api/test/factories/api_client_authorization.rb b/services/api/test/factories/api_client_authorization.rb
index f5e3ab4cc..af2660a5f 100644
--- a/services/api/test/factories/api_client_authorization.rb
+++ b/services/api/test/factories/api_client_authorization.rb
@@ -2,10 +2,10 @@
 #
 # SPDX-License-Identifier: AGPL-3.0
 
-FactoryGirl.define do
+FactoryBot.define do
   factory :api_client_authorization do
     api_client
-    scopes ['all']
+    scopes { ['all'] }
 
     trait :trusted do
       association :api_client, factory: :api_client, is_trusted: true
diff --git a/services/api/test/factories/group.rb b/services/api/test/factories/group.rb
index dcff78318..7af57354b 100644
--- a/services/api/test/factories/group.rb
+++ b/services/api/test/factories/group.rb
@@ -2,7 +2,7 @@
 #
 # SPDX-License-Identifier: AGPL-3.0
 
-FactoryGirl.define do
+FactoryBot.define do
   factory :group do
   end
 end
diff --git a/services/api/test/factories/link.rb b/services/api/test/factories/link.rb
index 00f463d37..291a04e0c 100644
--- a/services/api/test/factories/link.rb
+++ b/services/api/test/factories/link.rb
@@ -2,10 +2,10 @@
 #
 # SPDX-License-Identifier: AGPL-3.0
 
-FactoryGirl.define do
+FactoryBot.define do
   factory :link do
     factory :permission_link do
-      link_class 'permission'
+      link_class { 'permission' }
     end
   end
 end
diff --git a/services/api/test/factories/user.rb b/services/api/test/factories/user.rb
index 344e571ef..91d939516 100644
--- a/services/api/test/factories/user.rb
+++ b/services/api/test/factories/user.rb
@@ -6,10 +6,10 @@ class CurrentApiClientHelper
   extend CurrentApiClient
 end
 
-FactoryGirl.define do
+FactoryBot.define do
   factory :user do
     transient do
-      join_groups []
+      join_groups { [] }
     end
     after :create do |user, evaluator|
       CurrentApiClientHelper.act_as_system_user do
@@ -25,13 +25,13 @@ FactoryGirl.define do
         end
       end
     end
-    first_name "Factory"
-    last_name "Factory"
+    first_name { "Factory" }
+    last_name { "Factory" }
     identity_url do
       "https://example.com/#{rand(2**24).to_s(36)}"
     end
     factory :active_user do
-      is_active true
+      is_active { true }
       after :create do |user|
         CurrentApiClientHelper.act_as_system_user do
           Link.create!(tail_uuid: user.uuid,
diff --git a/services/api/test/test_helper.rb b/services/api/test/test_helper.rb
index 73b45f95e..40e801e01 100644
--- a/services/api/test/test_helper.rb
+++ b/services/api/test/test_helper.rb
@@ -33,7 +33,7 @@ end
 require File.expand_path('../../config/environment', __FILE__)
 require 'rails/test_help'
 require 'mocha'
-require 'mocha/mini_test'
+require 'mocha/minitest'
 
 module ArvadosTestSupport
   def json_response
@@ -54,7 +54,7 @@ module ArvadosTestSupport
 end
 
 class ActiveSupport::TestCase
-  include FactoryGirl::Syntax::Methods
+  include FactoryBot::Syntax::Methods
   fixtures :all
 
   include ArvadosTestSupport

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list