Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kddnewton/bonsai
Code for the "Grow a bonsai, not a shrub" talk
https://github.com/kddnewton/bonsai
Last synced: 23 days ago
JSON representation
Code for the "Grow a bonsai, not a shrub" talk
- Host: GitHub
- URL: https://github.com/kddnewton/bonsai
- Owner: kddnewton
- Created: 2018-10-09T19:12:09.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-10-09T19:12:19.000Z (over 6 years ago)
- Last Synced: 2024-11-13T08:36:41.902Z (3 months ago)
- Language: Ruby
- Size: 7.81 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Support: support/macro_tracking.rb
Awesome Lists containing this project
README
# Grow a bonsai, not a shrub
Scaling a codebase with coherence and structure.
## `ext`
Various examples of extracting logical patterns, including:
* `Ext::ArelTables` - generate functions that access arel tables
* `Ext::DelegateScope` - delegate scopes to associated classes
* `Ext::Factory` - extract functionality into helper objects
* `Ext::Query` - generate scopes from query objects
* `Ext::StripAttributes` - automatically strip attributes before they hit the DB
* `Ext::TouchAll` - bust associated caches downward instead of just upward## `reflection`
Reflection tests enforcing certain code style, including:
* `AssociationsTest` - enforce various things about associations, including having a specified `inverse_of` or an automatic one, having the expected columns, and not overriding association methods
* `ControllerActionsTest` - enforce only having the expected controller action names within your app's controllers
* `DefTest` - enforce not having method definitions in model files
* `UpgradeTest` - refuse to pass the build if the version is upgraded and the code that depends on a specific version is not checked## `support`
Tools for trimming your application code, including:
* `MacroTracking` - hook into `delegate` and `scope` to make sure that they don't go stale -- reports out at the end of the test suite which were called and which weren't