From 592ed8738cccd68ced1c2fbf58d0ff16d66e8d14 Mon Sep 17 00:00:00 2001 From: Valery Sizov <valery@gitlab.com> Date: Mon, 2 Feb 2015 18:25:33 -0800 Subject: [PATCH] Gitlab.com integration: code folding --- app/controllers/import/github_controller.rb | 2 +- app/controllers/import/gitlab_controller.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/controllers/import/github_controller.rb b/app/controllers/import/github_controller.rb index 3f0461ead51fd..08419a37476f2 100644 --- a/app/controllers/import/github_controller.rb +++ b/app/controllers/import/github_controller.rb @@ -19,7 +19,7 @@ def status @already_added_projects = current_user.created_projects.where(import_type: "github") already_added_projects_names = @already_added_projects.pluck(:import_source) - @repos.reject!{|repo| already_added_projects_names.include? repo.full_name} + @repos.reject!{ |repo| already_added_projects_names.include? repo.full_name } end def jobs diff --git a/app/controllers/import/gitlab_controller.rb b/app/controllers/import/gitlab_controller.rb index 3712af6f0247b..448fe6417be8f 100644 --- a/app/controllers/import/gitlab_controller.rb +++ b/app/controllers/import/gitlab_controller.rb @@ -16,11 +16,11 @@ def status @already_added_projects = current_user.created_projects.where(import_type: "gitlab") already_added_projects_names = @already_added_projects.pluck(:import_source) - @repos.to_a.reject!{|repo| already_added_projects_names.include? repo["path_with_namespace"]} + @repos.to_a.reject!{ |repo| already_added_projects_names.include? repo["path_with_namespace"] } end def jobs - jobs = current_user.created_projects.where(import_type: "gitlab").to_json(:only => [:id, :import_status]) + jobs = current_user.created_projects.where(import_type: "gitlab").to_json(only: [:id, :import_status]) render json: jobs end -- GitLab