└── README.md /README.md: -------------------------------------------------------------------------------- 1 | [![Build Status](https://travis-ci.org/phstc/putsbox.svg)](https://travis-ci.org/phstc/putsbox) 2 | [![Code Climate](https://codeclimate.com/github/phstc/putsbox/badges/gpa.svg)](https://codeclimate.com/github/phstc/putsbox) 3 | [![Test Coverage](https://codeclimate.com/github/phstc/putsbox/badges/coverage.svg)](https://codeclimate.com/github/phstc/putsbox/coverage) 4 | 5 | **The PutsBox codebase will be private going forward. You can still integrate with the products as you could before and we've updated the support instructions below.** 6 | **Questions? Write us at support support@evermesh.com.** 7 | 8 | ## PutsBox 9 | 10 | PutsBox makes email integration tests easy. [Try it now](http://putsbox.com). 11 | 12 | Have a look at [Test emails with automated testing tools](http://www.pablocantero.com/blog/2015/08/05/test-emails-with-automated-testing-tools/) for some examples. 13 | 14 | ## Getting started 15 | 16 | PutsBox uses [SendGrid Inbound Email Parse Webhook](https://sendgrid.com/docs/API_Reference/Parse_Webhook/inbound_email.html) for receiving e-mails, therefore for running PutsBox in development or your server, you will need to setup a SendGrid account and configure an Inbound Parse within SendGrid admin. 17 | 18 | Have a look at this post [Test SendGrid Webhooks with ngrok](https://sendgrid.com/blog/test-webhooks-ngrok/) for receiving Webhook calls in your localhost. 19 | 20 | ### Steps to run PutsBox in development 21 | 22 | #### Basic steps 23 | 24 | This is the basic steps for running the Rails app, but if you want to receive e-mails, please check [Full steps](#full-steps). 25 | 26 | For following the instructions below, you will need to install [Docker](https://www.docker.com/get-docker). 27 | 28 | ```shell 29 | cd ~/workspace 30 | 31 | git clone git@github.com:phstc/putsbox.git 32 | 33 | docker-compose up -d 34 | 35 | open http://localhost:3000 36 | 37 | docker-compose logs --follow --tail=100 app 38 | ``` 39 | 40 | #### Full steps 41 | 42 | The full steps instructions, include SendGrid, and domain setup, which is needed for fully running PutsBox. 43 | 44 | [Check the Wiki](https://github.com/phstc/putsbox/wiki/Full-steps-to-run-PutsBox-in-development) 45 | 46 | #### Running tests 47 | 48 | ```shell 49 | docker-compose run app bundle exec rspec 50 | ``` 51 | 52 | ### Production 53 | 54 | Putsbox auto expires (removes) inactive buckets in 1 day and emails in 15 minutes. 55 | 56 | For enabling this behavior, PutsBox uses [MongoDB TTL](https://docs.mongodb.com/manual/tutorial/expire-data/). 57 | 58 | ``` 59 | db.buckets.createIndex({ "updated_at": 1 }, { expireAfterSeconds: 86400 }) 60 | db.emails.createIndex({ "created_at": 1 }, { expireAfterSeconds: 600 }) 61 | ``` 62 | 63 | ### License 64 | 65 | Please see [LICENSE](https://github.com/phstc/putsbox/blob/master/LICENSE) for licensing details. 66 | --------------------------------------------------------------------------------