Skip to content

Instantly share code, notes, and snippets.

API Endpoint Requirements Worksheet

Upload Users

Upload one or more users. Existing users with the same name will be replaced.

More requirements for actual work here...

Route

class PostsController < ApplicationController
get :index do
params do
param :limit, Integer, min: 1, max: 100, default: 10
param :offset, Integer, min: 0, default: 0
end
presenter PostPresenter
request do
present Post.limit(params[:limit]).offset(params[:offset])
end
@kkestell
kkestell / gist:7224409
Last active October 4, 2016 03:45
Using Upstart to Keep Puma Running

Add an Upstart script to start Puma and keep it running:

# nano /etc/init/puma.conf

Add:

start on startup
stop on shutdown

env RAILS_ENV=staging

Updates to search results

All index and search endpoints now return the following:

{
  "total_count": 10,
  "results": []
}
class RecipesController < ApiController
before_filter do
@service = RecipeService.new
end
get :index do
presenter RecipePresenter
params do
param :name, String
param :limit_orderable, Boolean
09:04:00 web.1 |
09:04:00 web.1 |
09:04:00 web.1 | Started GET "/shopping/orders/69790/summary" for 127.0.0.1 at 2016-06-21 09:04:00 -0500
09:04:01 web.1 | Processing by Shopping::OrdersController#summary as HTML
09:04:01 web.1 | Parameters: {"id"=>"69790"}
09:04:01 web.1 | User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."deleted" = 'f' AND "users"."id" = $1 ORDER BY "users"."id" ASC LIMIT 1 [["id", 2]]
09:04:01 web.1 | SiteSettings Load (0.4ms) SELECT "site_settings".* FROM "site_settings" ORDER BY "site_settings"."id" ASC LIMIT 1
09:04:01 web.1 | Shopping::Order Load (0.3ms) SELECT "shopping_orders".* FROM "shopping_orders" WHERE "shopping_orders"."user_id" = 2 AND "shopping_orders"."state" = 'pending' LIMIT 1
09:04:01 web.1 | Shopping::Order Load (0.2ms) SELECT "shopping_orders".* FROM "shopping_orders" WHERE "shopping_orders"."id" = $1 LIMIT 1 [["id", 69790]]
09:04:01 web.1 | CACHE (0.0ms)

Arboretum Plant Sale

Shrubs

Hydrangea arborescens ‘Abetwo’ Incrediball® (Hydrangea)

5’H x 5’W Huge 12” dia. blooms emerge soft lime-green then turn white. Yellow fall foliage. Blooms midsummer to fall.

Aronia melanocarpa (Black Chokeberry)

using System;
using System.Reflection;
using System.CodeDom.Compiler;
using System.IO;
namespace LibZZT.ScriptingInterface
{
public interface IGameObjectScript
{
void Update();
mobile-reachlocal-ios v1.9.9 (67) has been submitted to iTunes Connect. Once approved, you should receive an update notification automatically.
This build includes the following changes:
commit d088fb74a59316814766a974033009c6ffe3cc89
Merge: 1a4ec66 d8ca43a
Author: Kyle Kestell <kkestell@ackmanndickenson.com>
Date: Fri Jan 15 15:24:53 2016 -0600
Merge pull request #15 from reachlocal/fix-travis-builds

Meal Plan

These recipes focus primarily on vegetables, legumes, fruits, whole grains, nuts, fish, and healthy fats. Milled grains, meat, dairy, and sugar are consumed sparingly.

Breakfast

Avocado on Toast with Sardines

  • 1/2 avocado
  • 1 slice whole wheat toast