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