GitLab.com integration: refactoring

This commit is contained in:
Valery Sizov
2015-02-05 12:50:34 -08:00
parent 7ddba92a39
commit 18231b0bb3
5 changed files with 6 additions and 6 deletions
@@ -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
+1 -1
View File
@@ -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
@@ -1,5 +1,5 @@
module Gitlab
module Github
module GithubImport
class Client
attr_reader :client
@@ -1,5 +1,5 @@
module Gitlab
module Github
module GithubImport
class Importer
attr_reader :project
@@ -1,5 +1,5 @@
module Gitlab
module Github
module GithubImport
class ProjectCreator
attr_reader :repo, :namespace, :current_user