public
Description: Gitorious aims to provide a great way of doing distributed opensource code collaboration.
Homepage: http://gitorious.org/projects/gitorious
Clone URL: git://github.com/dysinger/gitorious.git
Don't prepend http:// to empty project urls
js (author)
Thu Apr 17 11:46:05 -0700 2008
commit  d583ef5ed5cbc8964961ef642e4c4952999d850d
tree    0a265e5e0492209ff0bc49a1bec059bc1dfb9f39
parent  58cd99a6f9c0d63778d7c7bacfef808caa3b1ebd
...
1
2
 
 
 
 
3
4
5
...
1
2
3
4
5
6
7
8
9
0
@@ -1,5 +1,9 @@
0
 (in no particular order)
0
 
0
+two from Yurii:
0
+1) show commits actually merged for merge request after actual merge (I see them on open request, but do not on merged one)
0
+2) provide clone url on every repo browsing page, so I can get url to pull from even if I am reading a commit
0
+
0
 * tree browser: deal better with funny characters: http://gitorious.org/projects/avara/repos/mainline/trees/master
0
 * if you comment on a specific commit, you should get redirected back there
0
 * graphs should show username (if we have it) for avoiding confusion and for consistency
...
144
145
146
 
147
148
149
...
144
145
146
147
148
149
150
0
@@ -144,6 +144,7 @@ class Project < ActiveRecord::Base
0
 
0
     # Try our best to guess the url
0
     def clean_url(url)
0
+ return if url.blank?
0
       begin
0
         url = "http://#{url}" if URI.parse(url).class == URI::Generic
0
       rescue
...
103
104
105
 
 
 
 
 
 
 
 
 
 
106
107
...
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
0
@@ -103,5 +103,15 @@ describe Project do
0
       project.send(attr).should == 'http://blah.com'
0
     end
0
   end
0
+
0
+ it "should not prepend http:// to empty urls" do
0
+ project = projects(:johans)
0
+ [ :home_url, :mailinglist_url, :bugtracker_url ].each do |attr|
0
+ project.send("#{attr}=", '')
0
+ project.send(attr).should be_blank
0
+ project.send("#{attr}=", nil)
0
+ project.send(attr).should be_blank
0
+ end
0
+ end
0
 
0
 end

Comments

    No one has commented yet.