This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
Dan Lawless (author)
Sat Nov 07 23:38:37 -0800 2009
shorty /
| name | age | message | |
|---|---|---|---|
| |
.gems | Sat Oct 17 12:20:49 -0700 2009 | |
| |
.gitignore | Tue Oct 27 19:09:09 -0700 2009 | |
| |
README.md | Tue Nov 03 17:06:29 -0800 2009 | |
| |
config.ru | Sat Oct 17 12:20:49 -0700 2009 | |
| |
features/ | Sat Nov 07 23:38:37 -0800 2009 | |
| |
shorty.rb | Tue Nov 03 17:07:18 -0800 2009 |
README.md
Shorty
A URL shortener written in Sinatra and MongoDB.
Mongo
Follow the Ruby tutorial to learn how to interact with Mongo with Ruby.
Hosting
I recommend using Heroku for the app and MongoHQ for storage.
Feature
Feature 'Shorten URL' do
Given 'I am on the homepage' do
visit '/'
end
When 'I submit http://dancroak.com' do
fill_in 'url', :with => 'http://dancroak.com'
click_button 'shorten'
end
Then 'I should see a short link' do
assert_have_selector 'a#short'
end
When 'I follow the short link' do
click_link 'short'
end
Then 'I should be on http://dancroak.com' do
assert_equal 'http://dancroak.com', current_url
end
end







