Project

packs

0.02
The project is in a healthy, maintained state
Packs are the specification for gradual modularization in the `rubyatscale` ecosystem.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
 Dependencies

Development

~> 2.2.16
>= 0
~> 3.0
>= 0

Runtime

 Project Readme

packs

Welcome to packs! packs are a simple ruby specification for an extensible packaging system to help modularize Ruby applications.

A pack (short for package) is a folder of Ruby code with a package.yml at the root that is intended to represent a well-modularized domain, and the rest of the rubyatscale ecosystem is intended to help make the boundaries between a pack and any other more clear.

Configuration

By default, this library will look for packs in the folder packs/*/package.yml (as well as nested packs at packs/*/*/package.yml). To change where packs are located, create a packs.yml file:

pack_paths:
  - "{packs,utilities,deprecated}/*" # packs with multiple roots!
  - "{packs,utilities,deprecated}/*/*" # nested packs!
  - gems/* # gems can be packs too!

Here are some example integrations with packs:

  • packs-rails can be used to integrate packs into your rails application
  • rubocop-packs contains cops to improve boundaries around packs
  • packwerk and packwerk-extensions help you describe and constrain your package graph in terms of dependencies between packs and pack public API
  • code_ownership gives your application the capability to determine the owner of a pack
  • use_packs gives a CLI, bin/packs, that makes it easy to create new packs, move files between packs, and more.
  • pack_stats makes it easy to send metrics about pack adoption and modularization to your favorite metrics provider, such as DataDog (which has built-in support).

How is a pack different from a gem?

A ruby gem is the Ruby community solution for packaging and distributing Ruby code. A gem is a great place to start new projects, and a great end state for code that's been extracted from an existing codebase. packs are intended to help gradually modularize an application that has some conceptual boundaries, but is not yet ready to be factored into gems.