Ruby

Flexible Config

Ruby configuration management

FlexibleConfig promotes good OOP design, and the separation of logic and configuration in your Ruby classes.

FlexibleConfig allows you to set class constants cleanly in ruby with the heirarchical structure and clean workflow of YML config, without sacrificing the flexibility and immediacy of ENVironment variables.

more»

CoCoach

CRM Application Backed by Ruby on Rails

Cocoach is a business coaching and business management application for real-time collaboration, document creation and project management.

more»

A Game of Thrones: LCG

Determines Best Sets to Buy Based on Meta Analysis

Analyses the Meta for A Game of Thrones: Living Card Game and returns the best sets to buy.

Method

Uses data pulled from the following websites:

Cards & Set Database: https://thronesdb.com/api/

Meta Statistics: http://thestonedrum.com/#/overview

Considerations

Considers agenda cards ~3x more important than a normal card. Considers plot cards ~2x more important than a normal card. Considers popular neutrals and non-loyal cards slightly more important (as they can be used in more decks). Considers older chapter packs worth less (they become obsolete after 4 years).

more»

Ruby Service Objects

Live coding a utility gem for creating service objects

The Ruby on Rails framework often gets a lot of hate over the years.

Rails makes it easy to get up and running quickly. Unfortunately, its beginner-friendly approach leaves you high and dry months later when you have thousands of lines of code.

Rails applications of this type are often referred to as Rails monoliths.

One of the best ways to refactor and save an aging Rails monolith, is to extract service objects.

In these videos we create a “base service” which allows us to easily build service objects with powerful error handling and chaining capabilities.

more»

API Buddy

Live coding playlist: building a Ruby API testing and documentation tool


API Buddy is a DSL for defining stubbed RESTful API endpoints, and generating documentation and tests based on the schema.

more»

RSpec Describe Method

RSpec shorthand for describing individual methods

RSpec Describe Method is a ruby gem that provides a shorthand for testing specific methods of classes.

It supports both instance methods and class methods, with or without arguments.

more»

Active Hash

Rails models powered by static files

ActiveHash is a simple base class that allows you to use a ruby hash as a readonly datasource for an ActiveRecord-like model.

ActiveHash assumes that every hash has an :id key, which is what you would probably store in a database. This allows you to seamlessly upgrade from ActiveHash objects to full ActiveRecord objects without having to change any code in your app, or any foreign keys in your database.

It also allows you to use #has_many and #belongs_to (via belongs_to_active_hash) in your AR objects.

ActiveHash can also be useful to create simple test classes that run without a database - ideal for testing plugins or gems that rely on simple AR behavior, but don’t want to deal with databases or migrations for the spec suite.

more»

RSpec Situations

RSpec DSL for creating situations and combining them for testing

Adds a super simple method to describe RSpec situations in terms of smaller situation blocks.

Define a situation with the ‘situation’ method. Add a symbol key to identify the situation, and add an optional description if you like, and pass in a block creating the situation.

more»