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
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.
-
You can download Ruby if you are a windows user: www.rubyinstaller.org, and if you are using a macbook you can download it from https://www.ruby-lang.org/en/downloads/
-
You can download Rails from https://www.ruby-lang.org/en/downloads/ for both Windows and Mac users
-
if Ruby is not installed checkout the ruby installation guide for guidelines to setup Ruby on your machine
-
if Rails is not installed checkout the Rails installation guide for guidelines to setup rails on you machine.
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.
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)
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.
- 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
- Fork the repo.
- 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
- 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!
- Make the test pass.
- 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
&&
,||
overand
,or
. -
MyClass.my_method(my_arg)
notmy_method( my_arg )
ormy_method my_arg
. -
a = b
and nota=b
. -
Follow the conventions you see used in the source already.
-
Deployment instructions
-
.....