public
Description: Your favorite URL-shortening service in all of Ruby land
Homepage: http://rubyurl.com
Clone URL: git://github.com/robbyrussell/rubyurl.git
a plethora of fixes... backwards compatibility... etc

git-svn-id: https://svn.roundhaus.com/planetargon/rubyurl_2-0/trunk@52 
f0bc2f90-cf15-dc11-b192-0016e6374d05
robbyrussell (author)
Tue Aug 07 09:57:41 -0700 2007
commit  8b2dfb7696d28a45438331b1da52796f0163473e
tree    d49b8f2bb00871420f0f6ed51ce7135e5bc34a2f
parent  4cf41e69ed1361d71e57b7219c8fb34908cf7543
...
5
6
7
8
 
 
9
10
11
12
 
13
14
15
...
5
6
7
 
8
9
10
11
12
 
13
14
15
16
0
@@ -5,11 +5,12 @@ class LinksController < ApplicationController
0
   end
0
 
0
   def create
0
- @link = Link.find_or_create_by_website_url( params[:link][:website_url] )
0
+ website_url = params.include?(:website_url) ? params[:website_url] : params[:link][:website_url]
0
+ @link = Link.find_or_create_by_website_url( website_url )
0
     @link.ip_address = request.remote_ip if @link.new_record?
0
     
0
     if @link.save
0
- calculate_links # application controller
0
+ calculate_links # application controller, refactor soon
0
       render :action => :show
0
     else
0
       flash[:warning] = 'There was an issue trying to create your RubyURL.'
...
1
2
 
3
4
 
5
6
 
 
 
 
 
7
8
9
10
...
1
 
2
3
 
4
5
 
6
7
8
9
10
11
 
12
13
0
@@ -1,10 +1,13 @@
0
 <div id="info_content">
0
-<h1>What is rubyURL?</h1>
0
+<h1>What is RubyURL?</h1>
0
 
0
-<p>This is some text about rubyurl.</p>
0
+<p>In a nutshell, RubyURL is an online tool for converting really long website addresses into... short ones.</p>
0
 
0
-<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
0
+<p>Beyond that, RubyURL was the first project that Robby Russell (<%= link_to 'robbyonrails', 'http://www.robbyonrails.com/' -%>) built and deployed with the Ruby on Rails framework way back in early 2005. It's been running strong since then and until recently, was still running off of that original code base.</p>
0
+
0
+<p>During the summer of 2007, Robby teamed up with <a href="http://chriszgriffin.com/">Chris Griffin</a>, User Interface Designer at <a href="http://planetargon.com">PLANET ARGON</a>, for a complete rewrite and design of RubyURL.</p>
0
+
0
+<p>The RubyURL team hopes that you find this tool useful in your mailing list posts, chat conversations, and twitter entries.</p>
0
 
0
-<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
0
 </div> <!-- end info_content -->
0
 
...
1
2
3
4
 
5
6
7
8
9
10
11
 
12
13
14
15
16
17
18
19
20
21
22
23
...
1
2
3
 
4
5
 
 
 
 
 
 
6
7
 
 
 
 
 
 
 
 
 
 
8
0
@@ -1,23 +1,8 @@
0
 <div id="info_content">
0
 <h1>API Documentation</h1>
0
 
0
-<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
0
+<p>We'll be publishing the RubyURL API documentation in the near future.</p>
0
 
0
-<pre><code>
0
- require 'rubygems'
0
- require 'shorturl'
0
-
0
- ShortURL.new('http://my-really-long-domain.com/')
0
-</code></pre>
0
+<p>Check back soon!</p>
0
 
0
-<p>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
0
-
0
-<pre><code>
0
- require 'rubygems'
0
- require 'shorturl'
0
-
0
- ShortURL.new('http://my-really-long-domain.com/')
0
-</code></pre>
0
-
0
-<p>Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat!</p>
0
 </div> <!-- end info_content -->
...
1
2
3
4
 
 
 
5
6
 
7
8
...
1
2
3
 
4
5
6
7
 
8
9
10
0
@@ -1,7 +1,9 @@
0
 <div id="info_content">
0
 <h1>Report Abuse</h1>
0
 
0
-<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
0
+<p>The team behind RubyURL hates spam just as much as you do. </p>
0
+
0
+<p>Unfortunately, we cannot prevent people from using the RubyURL service and pasting links into spam emails, wiki pages, and blog comments. If you found your way to RubyURL due to spamming, please <%= mail_to 'abuse@rubyurl.com', "send us an email", :encode => "javascript" -%> to report the offending RubyURL and we'll flag it for review.</p>
0
 
0
-<p><%= mail_to 'abuse@rubyurl.com' %></p>
0
+<p>Thanks!<br />-The RubyURL team</p>
0
 </div>
0
\ No newline at end of file

Comments

    No one has commented yet.