| |   |
| 2 | 2 | def signup_notification(user) |
| 3 | 3 | setup_email(user) |
| 4 | 4 | @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}" |
| 6 | 6 | |
| 7 | 7 | end |
| 8 | 8 | |
| … | … | |
| 18 | 18 | @body[:cloner] = repository.user |
| 19 | 19 | @body[:project] = repository.project |
| 20 | 20 | @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}" |
| 22 | 22 | end |
| 23 | 23 | |
| 24 | 24 | def merge_request_notification(merge_request) |
| … | … | |
| 26 | 26 | @subject += %Q{#{merge_request.source_repository.user.login} has requested a merge in #{merge_request.target_repository.project.title}} |
| 27 | 27 | @body[:merge_request] = merge_request |
| 28 | 28 | @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}" |
| 30 | 30 | url << "/repos/#{merge_request.target_repository.name}" |
| 31 | 31 | url << "/merge_requests/#{merge_request.id}" |
| 32 | 32 | @body[:url] = url |
| … | … | |
| 35 | 35 | protected |
| 36 | 36 | def setup_email(user) |
| 37 | 37 | @recipients = "#{user.email}" |
| 38 | | @from = "Gitorious <no-reply@gitorious.org>" |
| 38 | @from = "Gitorious <no-reply@GitoriousConfig['gitorious_host']>" |
| 39 | 39 | @subject = "[Gitorious] " |
| 40 | 40 | @sent_on = Time.now |
| 41 | 41 | @body[:user] = user |
| toggle raw diff |
--- a/app/models/mailer.rb
+++ b/app/models/mailer.rb
@@ -2,7 +2,7 @@ class Mailer < ActionMailer::Base
def signup_notification(user)
setup_email(user)
@subject += 'Please activate your new account'
- @body[:url] = "http://gitorious.org/users/activate/#{user.activation_code}"
+ @body[:url] = "http://GitoriousConfig['gitorious_host']/users/activate/#{user.activation_code}"
end
@@ -18,7 +18,7 @@ class Mailer < ActionMailer::Base
@body[:cloner] = repository.user
@body[:project] = repository.project
@body[:repository] = repository
- @body[:url] = "http://gitorious.org/p/#{repository.project.slug}/repos/#{repository.name}"
+ @body[:url] = "http://GitoriousConfig['gitorious_host']/p/#{repository.project.slug}/repos/#{repository.name}"
end
def merge_request_notification(merge_request)
@@ -26,7 +26,7 @@ class Mailer < ActionMailer::Base
@subject += %Q{#{merge_request.source_repository.user.login} has requested a merge in #{merge_request.target_repository.project.title}}
@body[:merge_request] = merge_request
@body[:project] = merge_request.target_repository.project
- url = "http://gitorious.org/p/#{merge_request.target_repository.project.slug}"
+ url = "http://GitoriousConfig['gitorious_host']/p/#{merge_request.target_repository.project.slug}"
url << "/repos/#{merge_request.target_repository.name}"
url << "/merge_requests/#{merge_request.id}"
@body[:url] = url
@@ -35,7 +35,7 @@ class Mailer < ActionMailer::Base
protected
def setup_email(user)
@recipients = "#{user.email}"
- @from = "Gitorious <no-reply@gitorious.org>"
+ @from = "Gitorious <no-reply@GitoriousConfig['gitorious_host']>"
@subject = "[Gitorious] "
@sent_on = Time.now
@body[:user] = user |
| |   |
| 18 | 18 | after_create :add_user_as_committer, :create_new_repos_task |
| 19 | 19 | after_destroy :create_delete_repos_task |
| 20 | 20 | |
| 21 | | BASE_REPOSITORY_URL = "gitorious.org" |
| 21 | BASE_REPOSITORY_URL = "GitoriousConfig['gitorious_host']" |
| 22 | 22 | |
| 23 | 23 | def self.new_by_cloning(other, username=nil) |
| 24 | 24 | suggested_name = username ? "#{username}s-clone" : nil |
| toggle raw diff |
--- a/app/models/repository.rb
+++ b/app/models/repository.rb
@@ -18,7 +18,7 @@ class Repository < ActiveRecord::Base
after_create :add_user_as_committer, :create_new_repos_task
after_destroy :create_delete_repos_task
- BASE_REPOSITORY_URL = "gitorious.org"
+ BASE_REPOSITORY_URL = "GitoriousConfig['gitorious_host']"
def self.new_by_cloning(other, username=nil)
suggested_name = username ? "#{username}s-clone" : nil |
| |   |
| 3 | 3 | feed.updated((@commits.blank? ? nil : @commits.first.committed_date)) |
| 4 | 4 | |
| 5 | 5 | @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) |
| 7 | 7 | feed.entry(commit.id, { |
| 8 | 8 | :url => item_url, |
| 9 | 9 | :updated => commit.committed_date, |
| toggle raw diff |
--- a/app/views/browse/index.atom.builder
+++ b/app/views/browse/index.atom.builder
@@ -3,7 +3,7 @@ atom_feed do |feed|
feed.updated((@commits.blank? ? nil : @commits.first.committed_date))
@commits.each do |commit|
- item_url = "http://gitorious.org" + project_repository_commit_path(@project, @repository, commit.id)
+ item_url = "http://GitoriousConfig['gitorious_host']" + project_repository_commit_path(@project, @repository, commit.id)
feed.entry(commit.id, {
:url => item_url,
:updated => commit.committed_date, |
| |   |
| 3 | 3 | feed.updated((@comments.blank? ? Time.now : @comments.first.created_at)) |
| 4 | 4 | |
| 5 | 5 | @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) |
| 7 | 7 | feed.entry(comment, :url => item_url) do |entry| |
| 8 | 8 | entry.title("#{comment.user.login}: #{truncate(comment.body, 30)}") |
| 9 | 9 | entry.content(comment.body) |
| toggle raw diff |
--- a/app/views/comments/index.atom.builder
+++ b/app/views/comments/index.atom.builder
@@ -3,7 +3,7 @@ atom_feed do |feed|
feed.updated((@comments.blank? ? Time.now : @comments.first.created_at))
@comments.each do |comment|
- item_url = "http://gitorious.org" + project_repository_comments_path(@project,@repository)
+ item_url = "http://GitoriousConfig['gitorious_host']" + project_repository_comments_path(@project,@repository)
feed.entry(comment, :url => item_url) do |entry|
entry.title("#{comment.user.login}: #{truncate(comment.body, 30)}")
entry.content(comment.body) |
| |   |
| 1 | 1 | Hello <%= @user.login %>, |
| 2 | 2 | |
| 3 | | your account has been activated. You can add your public SSH key here http://gitorious.org/account as well as change your details. |
| 3 | your account has been activated. You can add your public SSH key here http://GitoriousConfig['gitorious_host']/account as well as change your details. |
| 4 | 4 | |
| 5 | 5 | Thank you |
| 6 | 6 | |
| 7 | | http://gitorious.org |
| 7 | http://GitoriousConfig['gitorious_host'] |
| 8 | 8 | |
| toggle raw diff |
--- a/app/views/mailer/activation.rhtml
+++ b/app/views/mailer/activation.rhtml
@@ -1,8 +1,8 @@
Hello <%= @user.login %>,
-your account has been activated. You can add your public SSH key here http://gitorious.org/account as well as change your details.
+your account has been activated. You can add your public SSH key here http://GitoriousConfig['gitorious_host']/account as well as change your details.
Thank you
-http://gitorious.org
+http://GitoriousConfig['gitorious_host']
|
| |   |
| 1 | 1 | Hello, |
| 2 | 2 | |
| 3 | | Your gitorious.org account has been created, your username is <%= @user.login %> |
| 3 | Your GitoriousConfig['gitorious_host'] account has been created, your username is <%= @user.login %> |
| 4 | 4 | |
| 5 | 5 | Please visit this url to activate your account: |
| 6 | 6 | |
| … | … | |
| 9 | 9 | |
| 10 | 10 | Thank you |
| 11 | 11 | |
| 12 | | http://gitorious.org |
| 12 | http://GitoriousConfig['gitorious_host'] |
| toggle raw diff |
--- a/app/views/mailer/signup_notification.rhtml
+++ b/app/views/mailer/signup_notification.rhtml
@@ -1,6 +1,6 @@
Hello,
-Your gitorious.org account has been created, your username is <%= @user.login %>
+Your GitoriousConfig['gitorious_host'] account has been created, your username is <%= @user.login %>
Please visit this url to activate your account:
@@ -9,4 +9,4 @@ Please visit this url to activate your account:
Thank you
-http://gitorious.org
\ No newline at end of file
+http://GitoriousConfig['gitorious_host']
\ No newline at end of file |
| |   |
| 3 | 3 | feed.updated((@projects.blank? ? Time.now : @projects.first.created_at)) |
| 4 | 4 | |
| 5 | 5 | @projects.each do |project| |
| 6 | | item_url = "http://gitorious.org" + project_path(project) |
| 6 | item_url = "http://GitoriousConfig['gitorious_host']" + project_path(project) |
| 7 | 7 | feed.entry(project, :url => item_url) do |entry| |
| 8 | 8 | entry.title(project.title) |
| 9 | 9 | entry.content(project.description) |
| toggle raw diff |
--- a/app/views/projects/index.atom.builder
+++ b/app/views/projects/index.atom.builder
@@ -3,7 +3,7 @@ atom_feed do |feed|
feed.updated((@projects.blank? ? Time.now : @projects.first.created_at))
@projects.each do |project|
- item_url = "http://gitorious.org" + project_path(project)
+ item_url = "http://GitoriousConfig['gitorious_host']" + project_path(project)
feed.entry(project, :url => item_url) do |entry|
entry.title(project.title)
entry.content(project.description) |
| |   |
| 15 | 15 | file of the repository you wish to push: |
| 16 | 16 | <pre> |
| 17 | 17 | [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> |
| 19 | 19 | fetch = +refs/heads/*:refs/remotes/origin/* |
| 20 | 20 | [branch "master"] |
| 21 | 21 | remote = origin |
| … | … | |
| 24 | 24 | and then <code>git push origin master</code> to push the code to Gitorious. |
| 25 | 25 | </p> |
| 26 | 26 | <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 |
| 28 | 28 | you can setup a remote by doing the following (add --fetch to the add call to |
| 29 | 29 | get the config from above): |
| 30 | 30 | <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> |
| 32 | 32 | # to push the master branch to the origin remote we added above: |
| 33 | 33 | git push origin master |
| 34 | 34 | # after that you can just do: |
| … | … | |
| 44 | 44 | can contact you about your projects if they need to. We do however take light |
| 45 | 45 | measures against crawlers by not displaying your email in completely plain text. <br /> |
| 46 | 46 | 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. |
| 48 | 48 | </p> |
| 49 | 49 | |
| 50 | 50 | <hr /> |
| toggle raw diff |
--- a/app/views/site/faq.html.erb
+++ b/app/views/site/faq.html.erb
@@ -15,7 +15,7 @@
file of the repository you wish to push:
<pre>
[remote "origin"]
- url = git@gitorious.org:<em>project</em>/<em>repository.git</em>
+ url = git@GitoriousConfig['gitorious_host']:<em>project</em>/<em>repository.git</em>
fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
remote = origin
@@ -24,11 +24,11 @@
and then <code>git push origin master</code> to push the code to Gitorious.
</p>
<p>
- You can also just run "<code>git push git@gitorious.org:tumbline/mainline.git</code>", or
+ You can also just run "<code>git push git@GitoriousConfig['gitorious_host']:tumbline/mainline.git</code>", or
you can setup a remote by doing the following (add --fetch to the add call to
get the config from above):
<pre>
- git remote add origin git@gitorious.org:<em>project</em>/<em>repository.git</em>
+ git remote add origin git@GitoriousConfig['gitorious_host']:<em>project</em>/<em>repository.git</em>
# to push the master branch to the origin remote we added above:
git push origin master
# after that you can just do:
@@ -44,7 +44,7 @@
can contact you about your projects if they need to. We do however take light
measures against crawlers by not displaying your email in completely plain text. <br />
But just to be clear: we won't sell or use any information you give to
- gitorious.org against you or anyone else for financial and/or personal gains.
+ GitoriousConfig['gitorious_host'] against you or anyone else for financial and/or personal gains.
</p>
<hr /> |
| |   |
| 62 | 62 | end |
| 63 | 63 | |
| 64 | 64 | 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" |
| 66 | 66 | end |
| 67 | 67 | |
| 68 | 68 | 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" |
| 70 | 70 | end |
| 71 | 71 | |
| 72 | 72 | 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" |
| 74 | 74 | end |
| 75 | 75 | |
| 76 | 76 | it "should assign the creator as a comitter on create" do |
| toggle raw diff |
--- a/spec/models/repository_spec.rb
+++ b/spec/models/repository_spec.rb
@@ -62,15 +62,15 @@ describe Repository do
end
it "has a push url" do
- @repository.push_url.should == "git@gitorious.org:#{@repository.project.slug}/foo.git"
+ @repository.push_url.should == "git@GitoriousConfig['gitorious_host']:#{@repository.project.slug}/foo.git"
end
it "has a clone url" do
- @repository.clone_url.should == "git://gitorious.org/#{@repository.project.slug}/foo.git"
+ @repository.clone_url.should == "git://GitoriousConfig['gitorious_host']/#{@repository.project.slug}/foo.git"
end
it "has a http url" do
- @repository.http_clone_url.should == "http://git.gitorious.org/#{@repository.project.slug}/foo.git"
+ @repository.http_clone_url.should == "http://git.GitoriousConfig['gitorious_host']/#{@repository.project.slug}/foo.git"
end
it "should assign the creator as a comitter on create" do |
| |   |
| 33 | 33 | it "allows a wider range of extended comments" do |
| 34 | 34 | key = new_key |
| 35 | 35 | |
| 36 | | key.key = "ssh-rsa AAAAB3Nz/aC1yc2EAAAABIwAAAQE gitorious.org key" |
| 36 | key.key = "ssh-rsa AAAAB3Nz/aC1yc2EAAAABIwAAAQE #{GitoriousConfig['gitorious_host']} key" |
| 37 | 37 | key.should be_valid |
| 38 | 38 | |
| 39 | | key.key = "ssh-rsa AAAAB3Nz/aC1yc2EAAAABIwAAAQE joe+gitorious.org key" |
| 39 | key.key = "ssh-rsa AAAAB3Nz/aC1yc2EAAAABIwAAAQE joe+#{GitoriousConfig['gitorious_host']} key" |
| 40 | 40 | key.should be_valid |
| 41 | 41 | |
| 42 | | key.key = "ssh-rsa AAAAB3Nz/aC1yc2EAAAABIwAAAQE http://gitorious.org key" |
| 42 | key.key = "ssh-rsa AAAAB3Nz/aC1yc2EAAAABIwAAAQE http://#{GitoriousConfig['gitorious_host']} key" |
| 43 | 43 | key.should be_valid |
| 44 | 44 | end |
| 45 | 45 | |
| toggle raw diff |
--- a/spec/models/ssh_key_spec.rb
+++ b/spec/models/ssh_key_spec.rb
@@ -33,13 +33,13 @@ describe SshKey do
it "allows a wider range of extended comments" do
key = new_key
- key.key = "ssh-rsa AAAAB3Nz/aC1yc2EAAAABIwAAAQE gitorious.org key"
+ key.key = "ssh-rsa AAAAB3Nz/aC1yc2EAAAABIwAAAQE #{GitoriousConfig['gitorious_host']} key"
key.should be_valid
- key.key = "ssh-rsa AAAAB3Nz/aC1yc2EAAAABIwAAAQE joe+gitorious.org key"
+ key.key = "ssh-rsa AAAAB3Nz/aC1yc2EAAAABIwAAAQE joe+#{GitoriousConfig['gitorious_host']} key"
key.should be_valid
- key.key = "ssh-rsa AAAAB3Nz/aC1yc2EAAAABIwAAAQE http://gitorious.org key"
+ key.key = "ssh-rsa AAAAB3Nz/aC1yc2EAAAABIwAAAQE http://#{GitoriousConfig['gitorious_host']} key"
key.should be_valid
end
|