Commit 3ff131a747834f6ef481a6fa8ee663fea3fac93b

Authored by Dmitriy Zaporozhets
1 parent 0af5884b

Improve web hook data. Use clonable url in repo info

app/roles/push_observer.rb
@@ -98,7 +98,7 @@ module PushObserver @@ -98,7 +98,7 @@ module PushObserver
98 user_name: user.name, 98 user_name: user.name,
99 repository: { 99 repository: {
100 name: name, 100 name: name,
101 - url: web_url, 101 + url: url_to_repo,
102 description: description, 102 description: description,
103 homepage: web_url, 103 homepage: web_url,
104 }, 104 },
app/views/hooks/_data_ex.html.erb
@@ -7,9 +7,9 @@ @@ -7,9 +7,9 @@
7 :user_name => "John Smith", 7 :user_name => "John Smith",
8 :repository => { 8 :repository => {
9 :name => "Diaspora", 9 :name => "Diaspora",
10 - :url => "localhost/diaspora", 10 + :url => "git@localhost/diaspora.git",
11 :description => "", 11 :description => "",
12 - :homepage => "localhost/diaspora", 12 + :homepage => "http://localhost/diaspora",
13 :private => true 13 :private => true
14 }, 14 },
15 :commits => [ 15 :commits => [
spec/models/project_hooks_spec.rb
@@ -91,7 +91,7 @@ describe Project, "Hooks" do @@ -91,7 +91,7 @@ describe Project, "Hooks" do
91 subject { @data[:repository] } 91 subject { @data[:repository] }
92 92
93 it { should include(name: project.name) } 93 it { should include(name: project.name) }
94 - it { should include(url: project.web_url) } 94 + it { should include(url: project.url_to_repo) }
95 it { should include(description: project.description) } 95 it { should include(description: project.description) }
96 it { should include(homepage: project.web_url) } 96 it { should include(homepage: project.web_url) }
97 end 97 end