Update uses of Gitolite.config.foo settings

This commit is contained in:
Riyad Preukschas 2012-12-15 01:16:25 +01:00
parent b2e46f44ce
commit 19eb637419
33 changed files with 95 additions and 95 deletions

View file

@ -16,7 +16,7 @@ describe Gitlab::Gitolite do
it { should respond_to :create_repository }
it { should respond_to :remove_repository }
it { gitolite.url_to_repo('diaspora').should == Gitlab.config.ssh_path + "diaspora.git" }
it { gitolite.url_to_repo('diaspora').should == Gitlab.config.gitolite.ssh_path_prefix + "diaspora.git" }
it "should call config update" do
gitolite_config.should_receive(:update_project!)

View file

@ -6,7 +6,7 @@ describe Gitlab::ProjectMover do
before do
FileUtils.rm_rf base_path if File.exists? base_path
Gitlab.config.stub(git_base_path: base_path)
Gitlab.config.gitolite.stub(repos_path: base_path)
@project = create(:project)
end

View file

@ -108,7 +108,7 @@ describe Project, "Hooks" do
it { should include(id: @commit.id) }
it { should include(message: @commit.safe_message) }
it { should include(timestamp: @commit.date.xmlschema) }
it { should include(url: "#{Gitlab.config.url}/#{project.code}/commit/#{@commit.id}") }
it { should include(url: "#{Gitlab.config.gitlab.url}/#{project.code}/commit/#{@commit.id}") }
context "with a author" do
subject { @data[:commits].first[:author] }

View file

@ -148,7 +148,7 @@ describe Project do
it "should return valid url to repo" do
project = Project.new(path: "somewhere")
project.url_to_repo.should == Gitlab.config.ssh_path + "somewhere.git"
project.url_to_repo.should == Gitlab.config.gitolite.ssh_path_prefix + "somewhere.git"
end
it "should return path to repo" do
@ -158,7 +158,7 @@ describe Project do
it "returns the full web URL for this repo" do
project = Project.new(path: "somewhere")
project.web_url.should == "#{Gitlab.config.url}/somewhere"
project.web_url.should == "#{Gitlab.config.gitlab.url}/somewhere"
end
describe "last_activity methods" do

View file

@ -42,8 +42,8 @@ RSpec.configure do |config|
# ActiveRecord::Base.observers.enable(:all)
# Use tmp dir for FS manipulations
Gitlab.config.stub(git_base_path: Rails.root.join('tmp', 'test-git-base-path'))
FileUtils.rm_rf Gitlab.config.git_base_path
FileUtils.mkdir_p Gitlab.config.git_base_path
Gitlab.config.gitolite.stub(repos_path: Rails.root.join('tmp', 'test-git-base-path'))
FileUtils.rm_rf Gitlab.config.gitolite.repos_path
FileUtils.mkdir_p Gitlab.config.gitolite.repos_path
end
end

View file

@ -39,6 +39,6 @@ describe PostReceive do
end
def pwd(project)
File.join(Gitlab.config.git_base_path, project.path_with_namespace)
File.join(Gitlab.config.gitolite.repos_path, project.path_with_namespace)
end
end