https://github.com/croaky/shorty
URL shortener written in Sinatra & MongoDB
https://github.com/croaky/shorty
Last synced: over 1 year ago
JSON representation
URL shortener written in Sinatra & MongoDB
- Host: GitHub
- URL: https://github.com/croaky/shorty
- Owner: croaky
- Created: 2010-08-17T22:55:03.000Z (almost 16 years ago)
- Default Branch: master
- Last Pushed: 2014-08-16T22:09:45.000Z (almost 12 years ago)
- Last Synced: 2024-02-15T02:32:08.676Z (over 2 years ago)
- Language: Ruby
- Homepage:
- Size: 139 KB
- Stars: 6
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-sinatra - shorty - URL shortener written in Sinatra & MongoDB. (Internet Application Clones)
README
Shorty
======
A URL shortener written in Sinatra and MongoDB.
Mongo
-----
Follow the [Ruby tutorial](http://www.mongodb.org/display/DOCS/Ruby+Tutorial) to learn how to interact with Mongo with Ruby.
Hosting
-------
I recommend using [Heroku](http://heroku.com) for the app and [MongoHQ](http://mongohq.com) 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