diff options
author | randx <dmitriy.zaporozhets@gmail.com> | 2012-05-26 13:37:49 +0300 |
---|---|---|
committer | randx <dmitriy.zaporozhets@gmail.com> | 2012-05-26 13:37:49 +0300 |
commit | 3272620f724737f4dbb5e8c02f1610946435cd29 (patch) | |
tree | ae9fb3daccdf6b008ccb9c31d435e9548113c6ee /app | |
parent | 8ceb94081ac516ccaed43f0f4841725a4f9fe2db (diff) | |
download | gitlab-ce-3272620f724737f4dbb5e8c02f1610946435cd29.tar.gz |
lib/ refactoring. Module Gitlabhq renamed to Gitlab
Diffstat (limited to 'app')
-rw-r--r-- | app/controllers/application_controller.rb | 2 | ||||
-rw-r--r-- | app/controllers/projects_controller.rb | 2 | ||||
-rw-r--r-- | app/helpers/application_helper.rb | 2 | ||||
-rw-r--r-- | app/models/commit.rb | 2 | ||||
-rw-r--r-- | app/models/key.rb | 4 | ||||
-rw-r--r-- | app/models/merge_request.rb | 4 | ||||
-rw-r--r-- | app/models/project/repository_trait.rb | 8 | ||||
-rw-r--r-- | app/models/protected_branch.rb | 2 | ||||
-rw-r--r-- | app/models/users_project.rb | 2 |
9 files changed, 14 insertions, 14 deletions
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 8dd407ac16b..a96c59b6787 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -5,7 +5,7 @@ class ApplicationController < ActionController::Base protect_from_forgery helper_method :abilities, :can? - rescue_from Gitlabhq::Gitolite::AccessDenied do |exception| + rescue_from Gitlab::Gitolite::AccessDenied do |exception| render "errors/gitolite", :layout => "error" end diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index 38fd6f3e57e..246d43e8703 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -45,7 +45,7 @@ class ProjectsController < ApplicationController format.js end end - rescue Gitlabhq::Gitolite::AccessDenied + rescue Gitlab::Gitolite::AccessDenied render :js => "location.href = '#{errors_githost_path}'" and return rescue StandardError => ex @project.errors.add(:base, "Cant save project. Please try again later") diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 7cbc6c4f41c..7b15513a25b 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -143,6 +143,6 @@ module ApplicationHelper end def string_to_utf8 str - Gitlabhq::Encode.utf8 str + Gitlab::Encode.utf8 str end end diff --git a/app/models/commit.rb b/app/models/commit.rb index ad6d7127e76..09635d0e21c 100644 --- a/app/models/commit.rb +++ b/app/models/commit.rb @@ -1,6 +1,6 @@ class Commit include ActiveModel::Conversion - include Gitlabhq::Encode + include Gitlab::Encode extend ActiveModel::Naming attr_accessor :commit diff --git a/app/models/key.rb b/app/models/key.rb index 1d7aae359f4..8fe8716cc63 100644 --- a/app/models/key.rb +++ b/app/models/key.rb @@ -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) diff --git a/app/models/merge_request.rb b/app/models/merge_request.rb index 248bbdacad4..ded12601417 100644 --- a/app/models/merge_request.rb +++ b/app/models/merge_request.rb @@ -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 diff --git a/app/models/project/repository_trait.rb b/app/models/project/repository_trait.rb index 8757d844217..a759ead569c 100644 --- a/app/models/project/repository_trait.rb +++ b/app/models/project/repository_trait.rb @@ -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? diff --git a/app/models/protected_branch.rb b/app/models/protected_branch.rb index 36e65633f58..e24412b245f 100644 --- a/app/models/protected_branch.rb +++ b/app/models/protected_branch.rb @@ -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 diff --git a/app/models/users_project.rb b/app/models/users_project.rb index b00ab96b6f2..808ed64ca4c 100644 --- a/app/models/users_project.rb +++ b/app/models/users_project.rb @@ -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 |