dubdromic / beans

A small gem for tracking coffee addiction

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Beans

Beans is a small gem companion to your coffee addiction - it allows for easy tracking of taste, brew time, temperature, brand and brew method.

This gem is desinged to be plugged in to another front-end framework or library (like Rails or Thor).

Current version: 0.0.1. It doesn't work yet. Like any good software suite this will be considered 1.0.0 when it's self-hosting...that is, my brew notes will include things like "improved clarity on Beans refactor" or "blacked out and rewrote all tests in Haskell".

Usage

Configure your repositories (an in-memory one is provided and used by default). Repositories should align with an interface that's (ill-)defined in lib/beans/repositories/in_memory/base.rb. This could (and will) change at any time.

Beans.configure do |config|
  config.register_repository :bean, Beans::Repositories::InMemory::Bean.new
  config.register_repository :brew, Beans::Repositories::InMemory::Brew.new
  # ... etc ...
end

And then use it.

Beans.add_bean 'Awesome Beans', 'Lake Toba', 'Sumatra'
Beans.fetch_beans =>
  [#<Beans::Entities::Bean:0x00561210e4fbd8 @brand=nil, @country="Sumatra", @id=1, @name="Awesome Beans", @region="Lake Toba">]

👍

About

A small gem for tracking coffee addiction

License:MIT License


Languages

Language:Ruby 100.0%