From 18231b0bb353fffa77b492e4b04fa61c9b3a25bb Mon Sep 17 00:00:00 2001
From: Valery Sizov <valery@gitlab.com>
Date: Mon, 2 Feb 2015 14:26:29 -0800
Subject: [PATCH] GitLab.com integration: refactoring

---
 app/controllers/importers/githubs_controller.rb         | 4 ++--
 app/workers/repository_import_worker.rb                 | 2 +-
 lib/gitlab/{github => github_import}/client.rb          | 2 +-
 lib/gitlab/{github => github_import}/importer.rb        | 2 +-
 lib/gitlab/{github => github_import}/project_creator.rb | 2 +-
 5 files changed, 6 insertions(+), 6 deletions(-)
 rename lib/gitlab/{github => github_import}/client.rb (96%)
 rename lib/gitlab/{github => github_import}/importer.rb (98%)
 rename lib/gitlab/{github => github_import}/project_creator.rb (97%)

diff --git a/app/controllers/importers/githubs_controller.rb b/app/controllers/importers/githubs_controller.rb
index 5bb64c4a6ce..b3d42e32dfa 100644
--- a/app/controllers/importers/githubs_controller.rb
+++ b/app/controllers/importers/githubs_controller.rb
@@ -47,13 +47,13 @@ class Importers::GithubsController < ApplicationController
       namespace.add_owner(current_user)
     end
 
-    @project = Gitlab::Github::ProjectCreator.new(repo, namespace, current_user).execute
+    @project = Gitlab::GithubImport::ProjectCreator.new(repo, namespace, current_user).execute
   end
 
   private
 
   def client
-    @client ||= Gitlab::Github::Client.new.client
+    @client ||= Gitlab::GithubImport::Client.new.client
   end
 
   def octo_client
diff --git a/app/workers/repository_import_worker.rb b/app/workers/repository_import_worker.rb
index 1ceea7ff07f..3fb41a528c2 100644
--- a/app/workers/repository_import_worker.rb
+++ b/app/workers/repository_import_worker.rb
@@ -11,7 +11,7 @@ class RepositoryImportWorker
                                project.import_url)
 
     if project.import_type == 'github'
-      result_of_data_import = Gitlab::Github::Importer.new(project).execute
+      result_of_data_import = Gitlab::GithubImport::Importer.new(project).execute
     elsif project.import_type == 'gitlab'
       result_of_data_import = Gitlab::GitlabImport::Importer.new(project).execute
     else
diff --git a/lib/gitlab/github/client.rb b/lib/gitlab/github_import/client.rb
similarity index 96%
rename from lib/gitlab/github/client.rb
rename to lib/gitlab/github_import/client.rb
index d6b936c649c..2e454e7c10f 100644
--- a/lib/gitlab/github/client.rb
+++ b/lib/gitlab/github_import/client.rb
@@ -1,5 +1,5 @@
 module Gitlab
-  module Github
+  module GithubImport
     class Client
       attr_reader :client
 
diff --git a/lib/gitlab/github/importer.rb b/lib/gitlab/github_import/importer.rb
similarity index 98%
rename from lib/gitlab/github/importer.rb
rename to lib/gitlab/github_import/importer.rb
index 9f0fc6c4471..180ad6c3018 100644
--- a/lib/gitlab/github/importer.rb
+++ b/lib/gitlab/github_import/importer.rb
@@ -1,5 +1,5 @@
 module Gitlab
-  module Github
+  module GithubImport
     class Importer
       attr_reader :project
 
diff --git a/lib/gitlab/github/project_creator.rb b/lib/gitlab/github_import/project_creator.rb
similarity index 97%
rename from lib/gitlab/github/project_creator.rb
rename to lib/gitlab/github_import/project_creator.rb
index 7b04926071f..9439ca6cbf4 100644
--- a/lib/gitlab/github/project_creator.rb
+++ b/lib/gitlab/github_import/project_creator.rb
@@ -1,5 +1,5 @@
 module Gitlab
-  module Github
+  module GithubImport
     class ProjectCreator
       attr_reader :repo, :namespace, :current_user
 
-- 
GitLab