Giter Site home page Giter Site logo

juliawgraham / pats_v3 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from 67272-app-design-dev/pats_v3_r5

0.0 0.0 0.0 3.42 MB

A third version of the PATS project

Ruby 69.64% JavaScript 2.63% CoffeeScript 0.24% HTML 21.41% Gherkin 2.73% SCSS 3.35%

pats_v3's Introduction

67272_PATS_v3

This is a basic Rails app that was built as a class demonstration in the spring of 2018. This version focuses more on using VueJS, enhancing the user experience with Ajax, and adding search functionality.

The class is Application Design & Development (67-272) and is for students in Information Systems at Carnegie Mellon University. We have posted this code on github.com in a public directory so that (a) it is readily accessible to students and (b) that students will get a little familiarity with github.com.

This project does require the use of several gems to work properly. Check the Gemfile to see which gems are used. This project also assumes the user is running Ruby 2.4.x since that is what is used in the course.

Setup

This version of the project requires only a sqlite3 database. After cloning this repo, install all gems with the bundle install on the command line. To set up the database and populate it with realistic sample records, run on the command line rake db:populate. The populate script will remove any old databases, create new development and test databases, run all the migrations to set up the structure and add in the triggers, and then create 240 owners with over 450 pets and several thousand visits. (Every run will generate a different set of data and because of the large numbers and the callbacks used, it will take a few minutes.)

To verify the model and controller tests are functioning, simply run rails test on the command line. The SimpleCov gem will create a coverage directory with an index.html file in it; open this file in a web browser to see the coverage provided.

The populate script will also create a vet user to login into the system. The username is 'vet' and the password is 'yodel' -- a tribute to VeggieTales' The Yodeling Veterinarian of the Alps.

If you want to load the testing context into the development database, you can do the following:

  1. if you have previously populated the database, drop it and rerun rails db:migrate to recreate a blank db.
  2. open rails console
  3. type require 'factory_bot_rails' (it will say 'false')
  4. type require './test/contexts' (it will say 'true')
  5. type include Contexts (it will say 'Object')
  6. type in whatever context building method you wish (e.g., create_animals)

or...

you could just run rake db:contexts and let that script do it for you. ;)

pats_v3's People

Contributors

profh avatar juliawgraham avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.