Commit a16a027f81b10945141de6e4984ba6b7af41b16d

Use GitoriousConfig['gitorious_host'] instead of new constant.

Commit diff

app/models/repository.rb

 
1818 after_create :add_user_as_committer, :create_new_repos_task
1919 after_destroy :create_delete_repos_task
2020
21 BASE_REPOSITORY_URL = "GitoriousConfig['gitorious_host']"
22
2321 def self.new_by_cloning(other, username=nil)
2422 suggested_name = username ? "#{username}s-clone" : nil
2523 new(:parent => other, :project => other.project, :name => suggested_name)
4545 end
4646
4747 def clone_url
48 "git://#{BASE_REPOSITORY_URL}/#{gitdir}"
48 "git://#{GitoriousConfig['gitorious_host']}/#{gitdir}"
4949 end
5050
5151 def http_clone_url
52 "http://git.#{BASE_REPOSITORY_URL}/#{gitdir}"
52 "http://git.#{GitoriousConfig['gitorious_host']}/#{gitdir}"
5353 end
5454
5555 def push_url
56 "git@#{BASE_REPOSITORY_URL}:#{gitdir}"
56 "git@#{GitoriousConfig['gitorious_host']}:#{gitdir}"
5757 end
5858
5959 def full_repository_path
toggle raw diff

spec/models/repository_spec.rb

 
6262 end
6363
6464 it "has a push url" do
65 @repository.push_url.should == "git@GitoriousConfig['gitorious_host']:#{@repository.project.slug}/foo.git"
65 @repository.push_url.should == "git@#{GitoriousConfig['gitorious_host']}:#{@repository.project.slug}/foo.git"
6666 end
6767
6868 it "has a clone url" do
69 @repository.clone_url.should == "git://GitoriousConfig['gitorious_host']/#{@repository.project.slug}/foo.git"
69 @repository.clone_url.should == "git://#{GitoriousConfig['gitorious_host']}/#{@repository.project.slug}/foo.git"
7070 end
7171
7272 it "has a http url" do
73 @repository.http_clone_url.should == "http://git.GitoriousConfig['gitorious_host']/#{@repository.project.slug}/foo.git"
73 @repository.http_clone_url.should == "http://git.#{GitoriousConfig['gitorious_host']}/#{@repository.project.slug}/foo.git"
7474 end
7575
7676 it "should assign the creator as a comitter on create" do
toggle raw diff