A URL Shortener by Dean Perry.
Open sourced on GitHub.
This is currently not used at qyk.in. I am using a new URL shortener I built with support for multiple sites.
Qyk.in has been testing on Ruby 1.9.2 and Ruby 1.9.3.
database.yml for your setup. For SQLite3,
cp config/database.yml.sqlite3 config/database.yml and for MySQL
cp config/database.yml.mysql config/database.yml and update for your username/password.
This isn't required in development but highly recommened for production. Run
rake secret and copy what it gives you and replace whatever is next to
QykIn::Application.config.secret_token = in
- gem install bundler
- bundle install
- rake db:create
- rake db:migrate
You need to create an application on the Twitter Developer site. When creating a new application, set the 'callback URL' as the
http://localhost:3000/auth/callback. Copy the 'consumer key' and the 'consumer secret' keys into
When in production, the 'callback URL' needs to be changed to your site URL with
/auth/callback on the end. Also you should set the environment variables set for
QYKIN_TWITTER_SECRET. You can paste these into your source code but it is a security risk. You should keep these details secret.
Once everything is setup, start up the server with
rails server and direct your web browser to localhost:3000. Login with Twitter and you will be greeted with a new snippet form.
Fork this project, make any changes and create a pull request :)
This project is licensed under the ☺ Licence.