Git Product home page Git Product logo

salaries_calculator's Introduction

README

Salaries Calculator is a Rails api only that allows to calculate a team's players salary depending on individual and team goals.

Nivel Goles/mes
A 5
B 10
C 15
Cuauh 20
  • Ruby version

    • 2.6.3
  • Rails version

    • 5.2.3
  • System dependencies

  • Configuration

  $ git clone git@github.com:aromaron/salaries_calculator.git
  $ cd project
  $ bundle install
  • Run locally
  $ rails s
  • How to run the test suite
  # on your project dir
  $ rspec spec
  • Make requests locally via curl
  curl -X GET \
    http://localhost:3000/api/v1/salaries \
    -H 'Content-Type: application/json' \
    -H 'Postman-Token: c05a9cfa-85bd-44fb-95b4-af19734bf17a' \
    -H 'cache-control: no-cache' \
    -d '[
      {
          "nombre": "Juan Perez",
          "nivel": "C",
          "goles": 10,
          "sueldo": 50000,
          "bono": 25000,
          "sueldo_completo": null,
          "equipo": "rojo"
      },
      {
          "nombre": "EL Cuauh",
          "nivel": "Cuauh",
          "goles": 30,
          "sueldo": 100000,
          "bono": 30000,
          "sueldo_completo": null,
          "equipo": "azul"
      },
      {
          "nombre": "Cosme Fulanito",
          "nivel": "A",
          "goles": 7,
          "sueldo": 20000,
          "bono": 10000,
          "sueldo_completo": null,
          "equipo": "azul"
      },
      {
          "nombre": "El Rulo",
          "nivel": "B",
          "goles": 9,
          "sueldo": 30000,
          "bono": 15000,
          "sueldo_completo": null,
          "equipo": "rojo"
      },
      {
          "nombre": "El Otro equipo",
          "nivel": "B",
          "goles": 9,
          "sueldo": 30000,
          "bono": 15000,
          "sueldo_completo": null,
          "goles_minimos": 20,
          "equipo": "not FC"
      }
  ]'
  • Make requests to heroku via curl
  curl -X GET \
    https://salaries-calculator.herokuapp.com/api/v1/salaries \
    -H 'Content-Type: application/json' \
    -H 'Postman-Token: 9fa46208-4a19-48a9-ab2d-920b4bf97b1c' \
    -H 'cache-control: no-cache' \
    -d '[
      {
          "nombre": "Juan Perez",
          "nivel": "C",
          "goles": 10,
          "sueldo": 50000,
          "bono": 25000,
          "sueldo_completo": null,
          "equipo": "rojo"
      },
      {
          "nombre": "EL Cuauh",
          "nivel": "Cuauh",
          "goles": 30,
          "sueldo": 100000,
          "bono": 30000,
          "sueldo_completo": null,
          "equipo": "azul"
      },
      {
          "nombre": "Cosme Fulanito",
          "nivel": "A",
          "goles": 7,
          "sueldo": 20000,
          "bono": 10000,
          "sueldo_completo": null,
          "equipo": "azul"
      },
      {
          "nombre": "El Rulo",
          "nivel": "B",
          "goles": 9,
          "sueldo": 30000,
          "bono": 15000,
          "sueldo_completo": null,
          "equipo": "rojo"
      },
      {
          "nombre": "El Otro equipo",
          "nivel": "B",
          "goles": 9,
          "sueldo": 30000,
          "bono": 15000,
          "sueldo_completo": null,
          "goles_minimos": 20,
          "equipo": "not FC"
      }
  ]'

salaries_calculator's People

Contributors

aromaron avatar

Watchers

 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.