README.md in jets-0.6.2 vs README.md in jets-0.6.3

- old
+ new

@@ -1,14 +1,14 @@ <div align="center"> - <link href="http://rubyonjets.com"><img src="http://rubyonjets.com/img/logos/jets-logo.png" /></img> + <a href="http://rubyonjets.com"><img src="http://rubyonjets.com/img/logos/jets-logo.png" /></a> </div> +Ruby and Lambda splat out a baby and that child's name is [Jets](http://rubyonjets.com/). + ![Build Status](https://codebuild.us-west-2.amazonaws.com/badges?uuid=eyJlbmNyeXB0ZWREYXRhIjoiUE12K3ljQTFQUjVpRW0reGhGVHVQdkplTHlOdUtENnBya2JhVWVXaFIvTU92MlBtV3hIUE9pb25jWGw0MS9jN2RXMERKRHh5Nzhvd01Za0NyeUs5SCtzPSIsIml2UGFyYW1ldGVyU3BlYyI6IkMybEJFaXdzejJEaHNWVmEiLCJtYXRlcmlhbFNldFNlcmlhbCI6MX0%3D&branch=master) [![CircleCI](https://circleci.com/gh/tongueroo/jets.svg?style=svg)](https://circleci.com/gh/tongueroo/jets) -Ruby and Lambda splat out a baby and that child's name is Jets. - ## What is Jets? Jets is a Ruby Serverless Framework. Jets allows you to create serverless applications with a beautiful language: Ruby. It includes everything required to build an application and deploy it to AWS Lambda. It is key to understand AWS Lambda and API Gateway to understand Jets conceptually. Jets maps your code to Lambda functions and API Gateway resources. @@ -22,11 +22,11 @@ ### Jets Controllers A Jets controller handles a web request and renders a response. Here's an example: -`app/controllers/posts_controller.rb`: +app/controllers/posts_controller.rb: ```ruby class PostsController < ApplicationController def index # renders Lambda Proxy structure compatiable with API Gateway @@ -46,11 +46,11 @@ ### Jets Routing You connect Lambda functions to API Gateway URL endpoints with a routes file: -`config/routes.rb`: +config/routes.rb: ```ruby Jets.application.routes.draw do get "posts", to: "posts#index" get "posts/new", to: "posts#new" @@ -72,14 +72,16 @@ { "hello": "world", "action": "index" } -### Jets Workers +### Jets Jobs -A Jets worker handles background jobs. It is performed outside of the web request/response cycle. Here's an example: +A Jets job handles asynchrous background jobs performed outside of the web request/response cycle. Here's an example: +app/jobs/hard_job.rb: + ```ruby class HardJob < ApplicationJob rate "10 hours" # every 10 hours def dig {done: "digging"} @@ -90,10 +92,10 @@ {done: "lifting"} end end ``` -`HardJob#dig` will be ran every 10 hours and `HardJob#lift` will be ran every 12 hours. +`HardJob#dig` runs every 10 hours and `HardJob#lift` runs every 12 hours. ### Jets Deployment You can test your application with a local server that mimics API Gateway: [Jets Local Server](http://rubyonjets.com/docs/local-server/). Once ready, deploying to AWS Lambda is a single command.