leompeters / cmt-npi

CMT Solutions - Take-home Assignment

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CMT Solutions for NPI

Web application that is able to retrieve a provider’s details based on their National Provider Identifier (NPI).

CI - MAIN

There is a live version in this link. It is mobile-friendly, you can try it on your phone!

Quick Start

  1. Setup your project gems/libraries environment installing RVM.

    $ rvm install 3.0.2
    $ rvm use 3.0.2@cmt-npi --create
  2. Install libraries.

    $ echo "gem: --no-document" > ~/.gemrc
    $ gem install bundler
    # Download MDM repo.
    $ bundle install
    $ rails db:create db:migrate

Dependencies

  • Install Postgres.

    # https://medium.com/@manishyadavv/how-to-deploy-ruby-on-rails-apps-on-aws-ec2-7ce55bb955fa
    # $ sudo apt-get install postgresql postgresql-contrib
    # https://gleecus.com/blog/a-quick-guide-to-deploy-rails-5-2-application-on-aws-ec2/
    $ sudo apt-get install postgresql postgresql-contrib libpq-dev
    
    $ sudo -i -u postgres
    $ psql
  • Nokogiri: for issues see more in this link.

    $ brew update
    $ xcode-select --install
    $ brew install libiconv
    $ brew link libiconv
    $ gem install nokogiri -- --with-iconv-dir=/usr/local/Cellar/libiconv/1.14

    Source: https://stackoverflow.com/a/6163052/2334082

    OR

    $ gem install nokogiri -- \
        --use-system-libraries \
        --with-xml2-config=/usr/bin/xml2-config \
        --with-xslt-config=/usr/bin/xslt-config

    Source: https://stackoverflow.com/a/28593132/2334082

  • Credentials/Secrets

    You can use this example of ./config/credentials.yml.enc running rails credentials:show if you have the secret code ;-P Be sure to get the secret_key_base running $ rails secret:

    See more details in rails/rails#30067 and https://medium.com/cedarcode/rails-5-2-credentials-9b3324851336.

Tests

Automated tests are based in RSpec tool.

The desired scenarios are at ./spec folder.

Analytics

About

CMT Solutions - Take-home Assignment


Languages

Language:Ruby 75.2%Language:HTML 14.0%Language:JavaScript 7.8%Language:SCSS 3.0%