Commit 16b4c14105be66ca4dc88d08cd3aeb738a052c09

Fix to use GitoriousConfig["repository_base_path"] for strainer instead of hard coded ~/repositories

Commit diff

lib/gitorious/ssh/strainer.rb

 
2626 attr_reader :path, :verb, :command
2727
2828 def full_path
29 File.join(File.expand_path("~"), "repositories", path)
29 File.join(GitoriousConfig["repository_base_path"], path)
3030 end
3131
3232 def parse!
toggle raw diff

spec/lib/gitorious/ssh/client_spec.rb

 
8585
8686 it "returns the command we can safely execute with git-shell" do
8787 client = Gitorious::SSH::Client.new(@strainer, "johan")
88 repos_path = File.join(File.expand_path("~"), "repositories", @strainer.path)
88 repos_path = File.join(GitoriousConfig["repository_base_path"], @strainer.path)
8989 client.to_git_shell_argument.should == "git-upload-pack '#{repos_path}'"
9090 end
9191
toggle raw diff

spec/lib/gitorious/ssh/strainer_spec.rb

 
6767 strainer2.should == strainer
6868 end
6969
70 it "has the full path from the users home directory" do
70 it "has the full path prepended with the gitorious.yml file setting" do
7171 strainer = Gitorious::SSH::Strainer.new("git-upload-pack 'foo/bar.git'").parse!
72 strainer.full_path.should == File.join(File.expand_path("~"), "repositories", "foo", "bar.git")
72 strainer.full_path.should ==
73 File.join(GitoriousConfig["repository_base_path"], "foo", "bar.git")
7374 end
7475
7576 it "sets the path of the parsed command" do
toggle raw diff