Skip to content

atemitope/Tushot

Repository files navigation

README

Tushot

Circle CI

Overview

www.tushot-heroku.com

Tushot is an advanced military Url shortener. As the name implies it simply uses its ammunition powered by Rails 4 to shoot your long Urls and leave them in short concise strings. These short strings are actually redirected to the assigned url and when clicked, they record the neccesary statistics and redirect to the designated Url There are two kinds of users, you can either be :

Regular User

As a regular user you visit Tushot.heroku.com and input your url in the form provided then "shoot" it. you will be presented with your short url Regular users also get access to overall statistical data from Tushot HQ


Registered Users

Registered Users can comfortably specify a given word or string for more enhanced shortening. If the word or string is chosen a random one is generated for you in its place. Registered Users can visibly affirm the amount of Urls they have shortened including their most popular and most recent Urls

Using the Application

Dependencies

Tushot is built with version 4.2.4 the popular Rails framework using the Ruby programming language (version 2.1.5). Chances are you already have Ruby and Rails installed. You can run which ruby and which rails to check for their installation.

Also check for and confirm the installation of gem and bundler on your machine. These will allow you install other libraries ( gems ) required by Tushot.

Running the application

First clone this repo. Then from your terminal (or command prompt) navigate to the folder where you have cloned Tushot( cd path/to/Tushot/ ).

  • Run bundle install to install all Tushot dependencies.
  • Run rake db:migrate to setup the app database
  • Run rails server to start the rails server

You now good to go. Visit the app on your browser to use Tushot (localhost:3000)

Running the tests

Tushot prides it's self in being fully tested. Tushot is tested using rspec, capybara gems. To start the test, first migrate the test database by running rake db:migrate. Next run bin/rspec spec to run all tests. You can also specify a particular test from the spec folder to run. Run tests with the -fd flag to view the tests documentation.

App features

  • Creates Shot's_for users if not custom string is provided
  • Creates customized _Shots's_for users if given a custom string
  • Keeps tabs of most recent Shots
  • Keeps tabs of popular Shots
  • Provides visit statistics for registered users

Contributing

  1. Fork the repo.
  2. Run the tests. We only take pull requests with passing tests, and it's great to know that you have a clean slate: bundle && bundle exec rake
  3. Add a test for your change. Only refactoring and documentation changes require no new tests. If you are adding functionality or fixing a bug, we need a test!
  4. Make the test pass.
  5. Push to your fork and submit a pull request.

#####Syntax:

  • Two spaces, no tabs.

  • No trailing whitespace. Blank lines should not have any space.

  • Prefer &&, || over and, or.

  • MyClass.my_method(my_arg) not my_method( my_arg ) or my_method my_arg.

  • a = b and not a=b.

  • Follow the conventions you see used in the source already.

  • Deployment instructions

  • .....

About

A Url Shortener built using Rails 4

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published