Giter VIP home page Giter VIP logo

charcutio-web's Introduction

Charcutio Web

Installation

  1. git clone https://github.com/9mmedia/charcutio-web.git

  2. Use latest Ruby using ruby-build and rbenv. If you just did a fresh Ruby install run the following commands:

     gem update --system
     gem update
     gem install bundler rake foreman rails mailcatcher --no-rdoc --no-ri
    
  3. Create Heroku account, install Toolbelt and login using heroku CLI

  4. Set a Heroku git remote. You can name it something else but examples in other sections will use heroku as the remote name.

     git remote add heroku [email protected]:charcutio-web.git
    
  5. Install Homebrew

  6. brew update

  7. brew install postgresql

  8. Follow any post installation instructions given by Homebrew

  9. Move /usr/local/bin so our PostgreSQL install is used over the system install (OSX) and reload the current bash session since we updated the PATH variable.

     echo 'export PATH="/usr/local/bin:$PATH"' >> ~/.bash_profile
     source ~/.bash_profile
    
  10. gem uninstall pg since if previously installed, gem might continue to use the wrong PostgreSQL installation

  11. bundle install

  12. createuser -d -r -S charcutio

  13. createdb -O charcutio charcutio_development

  14. createdb -O charcutio charcutio_test

  15. bundle exec rake db:migrate

  16. bundle exec rake db:test:prepare

  17. foreman start to start the server

Run Tests

  1. (Optional) Run migrations and prepare test environment database

     bundle exec rake db:migrate && bundle exec rake db:test:prepare
    
  2. Start the server using foreman start

  3. bundle exec rspec

  4. Client side tests use QUnit through qunit-rails gem. Go to http://localhost:5000/qunit to see and run the QUnit Test Runner.

Data API

Simple implementation to get started with data pushing.

Create a new box, returns box id.

POST /boxes {"api_key": "API_KEY", "name": "Box Name"}

Report data point

POST /boxes/:id/report {"api_key": "API_KEY", "type": "temp", "value": 55.6}

Get temperature/humidity set points

GET /boxes/:id/set_points {"api_key": "API_KEY"}

Tweet a photo.

POST /boxes/:id/photo {"api_key": "API_KEY", "image_file": multipart_file}

charcutio-web's People

Contributors

daniellesucher avatar javierjulio avatar jffjs avatar djbwise avatar

Stargazers

Manny Toledo avatar

Watchers

Jeffrey Forbes avatar Manny Toledo avatar  avatar  avatar Joe Morgan avatar James Cloos avatar  avatar Eric Zelermyer avatar Adam Cantrowitz avatar

charcutio-web's Issues

Add API calls needed for the upcoming android app

Add two API calls:

Sample JSON response needed for fridge_vitals:

{

"fridgeVitals": {
    "temperature": 18.5,
    "targetTemperature":18.4,
    "humidity": 45.4,
    "targetHumidity":50.3,
    "weights": [
    10.5,14.5,12.9
    ],
    "refrigeratorOn": true,
    "humidifierOn": false,
    "dehumidifierOn": false,
},

}

Sample JSON response needed for meats:

{
"meats": [
{
"position": 0,
"name": "Duck Breast"
"startDate":1357756476,
"estEndDate":1358706875000
"targetWeight":9.5
},
{
"position": 2,
"name": "Sausage"
"startDate":1357756476,
"estEndDate":1358706875000
"targetWeight":19.5
},

]

}

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.