Skip to content

AwesomeIT/kagu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

kagu

CircleCI Code Climate

Standard library of models and utilities for the turaco API and myna Kafka-backed workers.

Overview

Namespace Purpose
Kagu::Adapters Connection adapters for third party services, e.g. AWS S3.
Kagu::Events Kafka eventt producers.
Kagu::Factories FactoryGirl factories used in test environments. Not eager loaded!
Kagu::Models ActiveRecord models / persistence.
Kagu::Query Query-oriented service objects (e.g. stuff you shouldn't put in your model).
Kagu::Tags Support for taggable models

Models

To mimic Rails behaviors, we alias the constants from Kagu::Models into Object to avoid fully qualifying the path to our model. This is the exact same 'magic' done by Rails on load by ActiveSupport.

Creating a Migration

  • Run rake db:new_migration name=foo_bar_migration and then edit the created file with your database changes.
  • Run rake db:migrate to apply the migration.
  • If needed: create a model under lib/kagu/models
  • If needed: create a spec under spec/lib/models
  • If needed: update models.rb
  • Update version number
  • Merge changes

To retrieve the new changes, run bundle update kagu in turaco and myna.

Testing

In order to avoid code replication, FactoryGirl factories are also included in this gem. Everything should work with any Ruby test framework as long as you require kagu/factories in your spec_helper or test_helper files.

About

Standard library for the TalkBirdy API implementation, with models and adapters

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages