Simple URL Shortener - coded in Ruby on Rails
Ruby JavaScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
app
config
db
lib
public
script
spec
vendor
.gitignore
.powrc
.rvmrc
Gemfile
Gemfile.lock
Guardfile
README.md
Rakefile
config.ru

README.md

Qyk.in

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.

Getting Started

Qyk.in has been testing on Ruby 1.9.2 and Ruby 1.9.3.

Copy the 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 config/initializers/secret_token.rb.

  • 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 config/initializers/omniauth.rb replacing ENV['QYKIN_TWITTER_KEY'] and ENV['QYKIN_TWITTER_SECRET'].

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_KEY and 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.

Contributing

Fork this project, make any changes and create a pull request :)

Licence

This project is licensed under the ☺ Licence.