/AnagramDetector

Web app Detector de Anagramas

Primary LanguageRuby

README

  • Ruby version 2.0.0p353

  • Rails version 4.1.8

  • System dependencies

PostgreSQL
RSpec framework
  • Configuration

Install PostgreSQL
On PostreSQL create user 'anagram_detector' and database 'anagram-detector_development' with anagram_detector as owner
Run 'bundle install' in the application directory
Run 'rake db:migrate' in the application directory
Run 'rails server' in the application directory to initialize it
  • Database creation/initialization

Create user anagram_detector
 CREATE ROLE anagram_detector WITH CREATEDB LOGIN PASSWORD 'yourpass';
Create database anagram-detector_development with owner anagram_detector
 CREATE DATABASE "anagram-detector_development" OWNER anagram_detector;
Run 'rake db:migrate' in the application directory
  • How to run the test suite

After cloning and configuring the app, create a _test database
 CREATE DATABASE "anagram-detector_test" OWNER anagram_detector;
Run 'rspec spec' in the application directory
  • Deployment instructions (Heroku)

Clone the repository from https://github.com/lucaskds/AnagramDetector.git
Go to the directory
Run 'heroku create --http-git' to generate your Heroku App
Deploy your code with 'git push heroku master'
Generate the database with 'heroku run rake db:migrate'
Your application is done
  • How to use

Index shows all matches (str_1, str_2 and if they matched)
Clicking in 'view',  you can view the show page of the match
Click in 'New match', you'll be redirected to the new match form
Insert the strings to be matched and click 'Match'
You'll be redirected to the show page, where you can see the strings and if they match
Click in 'See all' to go back to the index page

IMPORTANT NOTE: The app transforms all variations of a specific char in a simple representation of that char, such that c = ç, ã = a, ü = u, etc.

rake doc:app.