Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

JSONiCal

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

JSONiCal

  • 1.0.0
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

JSONiCal

Code Climate Test Coverage CircleCI

This micro service provides an interface between your main application and calendar clients (e.g. outlook, lotus note, icalendar, etc.).

Requirements

This application needs:

  • ruby 2.3.3
  • docker
  • docker-compose

Be careful

  • This service use puma web server. The code in deps must be thread safe !
  • This repo use auto deployment when commit is push on master !

How does it work ?

schema

An actor (e.g. your main application) pushes messages into AMQP. Listen queues are jsonical.vevent.create, jsonical.vevent.update, jsonical.vevent.delete.

Messages must be a stringified JSON, and must respect a strict schema.

Example:

{
  "version": "v1",
  "data": {
    "orn": "orn:cockpit:pilotage:U3241834:action/A93489010",
    "calendar_orn": "orn:cockpit:pilotage:U3241834:company/C823510948",
    "summary": "My awesome event",
    "description": "No idea",
    "begin_date": "2016-12-15 14:30:00 +0100",
    "end_date": "2016-12-15 15:00:00 +0100",
    "uri": "https://cockpit.jobteaser.com/actions/orn:cockpit:pilotage:U3241834:action%2FA93489010",
    "uid": "https://cockpit.jobteaser.com/actions/orn:cockpit:pilotage:U3241834:action%2FA93489010",
    "klass": "PUBLIC",
    "created": "2016-10-10 08:32:52 +0100",
    "updated": "2016-10-10 08:32:52 +0100"
  }
}

When an event is available in queue, the listener stores the event and acknowledges the message in AMQP.

Install

  • Up Postgres and AMQP server with docker
$> docker-compose up
  • Create .env
$> cp .env.sample .env
  • Source enviroment
$> source .env
  • Run setup script
$> bin/setup

This will run bundler, create the database, run the migrations and seed it with db/seed.rb

  • Start application
$> bundle exec foreman start

Seed

You can seed the database like that: ruby db/seed.rb. The seed generates a calendar with many event between today ± 30 days. You can run the seed again when you need more calendars.

The seed script uses the faker gem to generate fake data. You can't run seed in production mode.

Test

$> bin/rspec

TODO

  • Bump to ruby 2.4.0
  • Write yard documentation

FAQs

Package last updated on 03 Jul 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc