GithubHelp home page GithubHelp logo

bug_tracker's Introduction

The Stack

The stack consists of several docker containers as follows

  • A web app built in rails that handles bugs and consists of simple models that represents Bugs and States(The state of the device the bug was created on).
  • A Postgres database container.
  • A RabbitMQ message queuing service container.
  • An Elasticsearch container.

Communication between containers are done using container links.

Running

To start the whole stack execute:

docker-compose up

Testing

Posting

For Testing the POST /bugs end point we can execute:

curl -X POST \
  http://localhost:3000/bugs/ \
  -H 'content-type: application/json' \
  -H 'accept: bugapp.v1' \
  -d '{
	"appToken": "[appToken]",
	"status": "[status]",
	"priority": "[priority]",
	"comment": "[comment]",
	"state": {
		"device": "[device_name]",
		"os": "[device_os]",
		"memory": "[device_memory]",
		"storage": "[device_storage]"
	}
}'

where [status] can be one of [fresh, in_progress, closed]
and [priority] can be one of [minor, major, critical]

Getting

For Testing the GET /bugs end point we can either execute:

curl -H 'accept: bugapp.v1' -X GET http://localhost:3000/bugs/

which will get a full list of bugs.

or we can execute:

curl -H 'accept: bugapp.v1' -X GET http://localhost:3000/bugs/[bug_number]?appToken=[appToken]

which will get us a specific bug.

Searching

We can invoke the searching end-point to search for a specific query, like:

curl -H 'accept: bugapp.v1' -X GET http://localhost:3000/bugs/search?q=major

will return all the bugs with priority of 'major', or maybe some bug that has a comment containing the word 'major'(case-insensitive), it also matches on any other field.

We can also use the search end-point for multi term queries, like:

curl -H 'accept: bugapp.v1' -X GET http://localhost:3000/bugs/search?q=fresh in_progress

will return all the bugs with status of either 'fresh' or 'in_progress'(will also include comments).

bug_tracker's People

Contributors

ispoonjelly avatar

Watchers

 avatar  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.