Commit 93edf3973f881818d74dad173cdd808ca8742f8b

Added GitoriousConfig['gitorious_host']

Commit diff

app/models/mailer.rb

 
22 def signup_notification(user)
33 setup_email(user)
44 @subject += 'Please activate your new account'
5 @body[:url] = "http://gitorious.org/users/activate/#{user.activation_code}"
5 @body[:url] = "http://GitoriousConfig['gitorious_host']/users/activate/#{user.activation_code}"
66
77 end
88
1818 @body[:cloner] = repository.user
1919 @body[:project] = repository.project
2020 @body[:repository] = repository
21 @body[:url] = "http://gitorious.org/p/#{repository.project.slug}/repos/#{repository.name}"
21 @body[:url] = "http://GitoriousConfig['gitorious_host']/p/#{repository.project.slug}/repos/#{repository.name}"
2222 end
2323
2424 def merge_request_notification(merge_request)
2626 @subject += %Q{#{merge_request.source_repository.user.login} has requested a merge in #{merge_request.target_repository.project.title}}
2727 @body[:merge_request] = merge_request
2828 @body[:project] = merge_request.target_repository.project
29 url = "http://gitorious.org/p/#{merge_request.target_repository.project.slug}"
29 url = "http://GitoriousConfig['gitorious_host']/p/#{merge_request.target_repository.project.slug}"
3030 url << "/repos/#{merge_request.target_repository.name}"
3131 url << "/merge_requests/#{merge_request.id}"
3232 @body[:url] = url
3535 protected
3636 def setup_email(user)
3737 @recipients = "#{user.email}"
38 @from = "Gitorious <no-reply@gitorious.org>"
38 @from = "Gitorious <no-reply@GitoriousConfig['gitorious_host']>"
3939 @subject = "[Gitorious] "
4040 @sent_on = Time.now
4141 @body[:user] = user
toggle raw 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 = "gitorious.org"
21 BASE_REPOSITORY_URL = "GitoriousConfig['gitorious_host']"
2222
2323 def self.new_by_cloning(other, username=nil)
2424 suggested_name = username ? "#{username}s-clone" : nil
toggle raw diff

app/views/browse/index.atom.builder

 
33 feed.updated((@commits.blank? ? nil : @commits.first.committed_date))
44
55 @commits.each do |commit|
6 item_url = "http://gitorious.org" + project_repository_commit_path(@project, @repository, commit.id)
6 item_url = "http://GitoriousConfig['gitorious_host']" + project_repository_commit_path(@project, @repository, commit.id)
77 feed.entry(commit.id, {
88 :url => item_url,
99 :updated => commit.committed_date,
toggle raw diff

app/views/comments/index.atom.builder

 
33 feed.updated((@comments.blank? ? Time.now : @comments.first.created_at))
44
55 @comments.each do |comment|
6 item_url = "http://gitorious.org" + project_repository_comments_path(@project,@repository)
6 item_url = "http://GitoriousConfig['gitorious_host']" + project_repository_comments_path(@project,@repository)
77 feed.entry(comment, :url => item_url) do |entry|
88 entry.title("#{comment.user.login}: #{truncate(comment.body, 30)}")
99 entry.content(comment.body)
toggle raw diff

app/views/mailer/activation.rhtml

 
11Hello <%= @user.login %>,
22
3your account has been activated. You can add your public SSH key here http://gitorious.org/account as well as change your details.
3your account has been activated. You can add your public SSH key here http://GitoriousConfig['gitorious_host']/account as well as change your details.
44
55Thank you
66
7http://gitorious.org
7http://GitoriousConfig['gitorious_host']
88
toggle raw diff

app/views/mailer/merge_request_notification.rhtml

 
77
88Thank you
99
10http://gitorious.org
10http://GitoriousConfig['gitorious_host']
toggle raw diff

app/views/mailer/new_repository_clone.rhtml

 
66
77Thank you
88
9http://gitorious.org
9http://GitoriousConfig['gitorious_host']
toggle raw diff

app/views/mailer/signup_notification.rhtml

 
11Hello,
22
3Your gitorious.org account has been created, your username is <%= @user.login %>
3Your GitoriousConfig['gitorious_host'] account has been created, your username is <%= @user.login %>
44
55Please visit this url to activate your account:
66
99
1010Thank you
1111
12http://gitorious.org
12http://GitoriousConfig['gitorious_host']
toggle raw diff

app/views/projects/index.atom.builder

 
33 feed.updated((@projects.blank? ? Time.now : @projects.first.created_at))
44
55 @projects.each do |project|
6 item_url = "http://gitorious.org" + project_path(project)
6 item_url = "http://GitoriousConfig['gitorious_host']" + project_path(project)
77 feed.entry(project, :url => item_url) do |entry|
88 entry.title(project.title)
99 entry.content(project.description)
toggle raw diff

app/views/site/faq.html.erb

 
1515 file of the repository you wish to push:
1616<pre>
1717[remote "origin"]
18 url = git@gitorious.org:<em>project</em>/<em>repository.git</em>
18 url = git@GitoriousConfig['gitorious_host']:<em>project</em>/<em>repository.git</em>
1919 fetch = +refs/heads/*:refs/remotes/origin/*
2020[branch "master"]
2121 remote = origin
2424 and then <code>git push origin master</code> to push the code to Gitorious.
2525</p>
2626<p>
27 You can also just run "<code>git push git@gitorious.org:tumbline/mainline.git</code>", or
27 You can also just run "<code>git push git@GitoriousConfig['gitorious_host']:tumbline/mainline.git</code>", or
2828 you can setup a remote by doing the following (add --fetch to the add call to
2929 get the config from above):
3030 <pre>
31 git remote add origin git@gitorious.org:<em>project</em>/<em>repository.git</em>
31 git remote add origin git@GitoriousConfig['gitorious_host']:<em>project</em>/<em>repository.git</em>
3232 # to push the master branch to the origin remote we added above:
3333 git push origin master
3434 # after that you can just do:
4444 can contact you about your projects if they need to. We do however take light
4545 measures against crawlers by not displaying your email in completely plain text. <br />
4646 But just to be clear: we won't sell or use any information you give to
47 gitorious.org against you or anyone else for financial and/or personal gains.
47 GitoriousConfig['gitorious_host'] against you or anyone else for financial and/or personal gains.
4848</p>
4949
5050<hr />
toggle raw diff

config/gitorious.sample.yml

 
1616
1717# Host the ./script/gitorious script should use:
1818gitorious_client_host: localhost
19
20# Host which is serving the gitorious app
21gitorious_host: GitoriousConfig['gitorious_host']
toggle raw diff

spec/models/repository_spec.rb

 
6262 end
6363
6464 it "has a push url" do
65 @repository.push_url.should == "git@gitorious.org:#{@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://gitorious.org/#{@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.gitorious.org/#{@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

spec/models/ssh_key_spec.rb

 
3333 it "allows a wider range of extended comments" do
3434 key = new_key
3535
36 key.key = "ssh-rsa AAAAB3Nz/aC1yc2EAAAABIwAAAQE gitorious.org key"
36 key.key = "ssh-rsa AAAAB3Nz/aC1yc2EAAAABIwAAAQE #{GitoriousConfig['gitorious_host']} key"
3737 key.should be_valid
3838
39 key.key = "ssh-rsa AAAAB3Nz/aC1yc2EAAAABIwAAAQE joe+gitorious.org key"
39 key.key = "ssh-rsa AAAAB3Nz/aC1yc2EAAAABIwAAAQE joe+#{GitoriousConfig['gitorious_host']} key"
4040 key.should be_valid
4141
42 key.key = "ssh-rsa AAAAB3Nz/aC1yc2EAAAABIwAAAQE http://gitorious.org key"
42 key.key = "ssh-rsa AAAAB3Nz/aC1yc2EAAAABIwAAAQE http://#{GitoriousConfig['gitorious_host']} key"
4343 key.should be_valid
4444 end
4545
toggle raw diff

vendor/diff-display/README.txt

 
4949Git Repository
5050===============
5151
52http://gitorious.org/projects/diff-display/
52http://GitoriousConfig['gitorious_host']/projects/diff-display/
5353
5454
5555License
toggle raw diff