lib/ refactoring. Module Gitlabhq renamed to Gitlab
This commit is contained in:
parent
8ceb94081a
commit
3272620f72
20 changed files with 87 additions and 85 deletions
|
@ -1,6 +1,6 @@
|
|||
class Commit
|
||||
include ActiveModel::Conversion
|
||||
include Gitlabhq::Encode
|
||||
include Gitlab::Encode
|
||||
extend ActiveModel::Naming
|
||||
|
||||
attr_accessor :commit
|
||||
|
|
|
@ -38,14 +38,14 @@ class Key < ActiveRecord::Base
|
|||
end
|
||||
|
||||
def update_repository
|
||||
Gitlabhq::GitHost.system.new.configure do |c|
|
||||
Gitlab::GitHost.system.new.configure do |c|
|
||||
c.update_keys(identifier, key)
|
||||
c.update_projects(projects)
|
||||
end
|
||||
end
|
||||
|
||||
def repository_delete_key
|
||||
Gitlabhq::GitHost.system.new.configure do |c|
|
||||
Gitlab::GitHost.system.new.configure do |c|
|
||||
#delete key file is there is no identically deploy keys
|
||||
if !is_deploy_key || Key.where(:identifier => identifier).count() == 0
|
||||
c.delete_key(identifier)
|
||||
|
|
|
@ -82,7 +82,7 @@ class MergeRequest < ActiveRecord::Base
|
|||
end
|
||||
|
||||
def check_if_can_be_merged
|
||||
self.state = if GitlabMerge.new(self, self.author).can_be_merged?
|
||||
self.state = if Gitlab::Merge.new(self, self.author).can_be_merged?
|
||||
CAN_BE_MERGED
|
||||
else
|
||||
CANNOT_BE_MERGED
|
||||
|
@ -184,7 +184,7 @@ class MergeRequest < ActiveRecord::Base
|
|||
end
|
||||
|
||||
def automerge!(current_user)
|
||||
if GitlabMerge.new(self, current_user).merge
|
||||
if Gitlab::Merge.new(self, current_user).merge
|
||||
self.merge!(current_user.id)
|
||||
true
|
||||
end
|
||||
|
|
|
@ -38,7 +38,7 @@ module Project::RepositoryTrait
|
|||
end
|
||||
|
||||
def satellite
|
||||
@satellite ||= Gitlabhq::Satellite.new(self)
|
||||
@satellite ||= Gitlab::Satellite.new(self)
|
||||
end
|
||||
|
||||
def write_hook(name, content)
|
||||
|
@ -65,7 +65,7 @@ module Project::RepositoryTrait
|
|||
end
|
||||
|
||||
def url_to_repo
|
||||
Gitlabhq::GitHost.url_to_repo(path)
|
||||
Gitlab::GitHost.url_to_repo(path)
|
||||
end
|
||||
|
||||
def path_to_repo
|
||||
|
@ -73,13 +73,13 @@ module Project::RepositoryTrait
|
|||
end
|
||||
|
||||
def update_repository
|
||||
Gitlabhq::GitHost.system.update_project(path, self)
|
||||
Gitlab::GitHost.system.update_project(path, self)
|
||||
|
||||
write_hooks if File.exists?(path_to_repo)
|
||||
end
|
||||
|
||||
def destroy_repository
|
||||
Gitlabhq::GitHost.system.destroy_project(self)
|
||||
Gitlab::GitHost.system.destroy_project(self)
|
||||
end
|
||||
|
||||
def repo_exists?
|
||||
|
|
|
@ -7,7 +7,7 @@ class ProtectedBranch < ActiveRecord::Base
|
|||
after_destroy :update_repository
|
||||
|
||||
def update_repository
|
||||
Gitlabhq::GitHost.system.update_project(project.path, project)
|
||||
Gitlab::GitHost.system.update_project(project.path, project)
|
||||
end
|
||||
|
||||
def commit
|
||||
|
|
|
@ -58,7 +58,7 @@ class UsersProject < ActiveRecord::Base
|
|||
end
|
||||
|
||||
def update_repository
|
||||
Gitlabhq::GitHost.system.new.configure do |c|
|
||||
Gitlab::GitHost.system.new.configure do |c|
|
||||
c.update_project(project.path, project)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue