Project

directive

0.0
The project is in a healthy, maintained state
Easily create rich, self-documenting gem configuration
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
 Dependencies

Development

>= 2.0.1
>= 1.8, < 2.0
~> 0.10.0
>= 0.2.4
>= 12.3.3
~> 3.0

Runtime

>= 5.2.1
= 0.29.1
 Project Readme

Spicerack

This collection of gems will spice up your rails and kick your rubies up a notch. Bam!

Gem Version Build Status Maintainability Test Coverage

  • Installation
  • Included Gems
  • Development
  • Contributing
    • Adding a New Spicerack Gem
    • Release
    • Versions
  • License

Installation

Add this line to your application's Gemfile:

gem "spicery"

And then execute:

$ bundle

Or install it yourself as:

$ gem install spicery

Included Gems

  • AroundTheWorld allows you to easily wrap methods with custom logic on any class.
  • Collectible provides an extensible framework for building array-like object collections.
  • Conjunction provides a mechanism to loosely coupled a suite of cross-referenced objects.
  • Directive provides a framework for easily building sane gem configuration classes.
  • Facet is a filterable, sortable, pageable, and Rails cacheable ActiveRecord::Relation.
  • RedisHash provides a class that matches the Hash api by wrapping Redis.
  • RSpice is an RSpec utility gem of custom matchers, shared contexts and examples.
  • ShortCircuIt is an intelligent and feature rich memoization gem.
  • Spicerack itself is a set of utility classes and concerns to write better Rails apps.
  • Spicerack::Styleguide is Freshly's Rubocop Styleguide for Rails and RSpec.
  • Technologic is a logging system built on an extensible event triggering system requiring minimal implementation.
  • Tablesalt is full of miscellaneous helper modules, POROs, and more, that standardize common behavior.

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake spec to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.

Contributing

This Open Source is supported by Freshly, a company committed to quality code and delicious food.

We're basically always hiring.

Come join us in our New York City, Phoenix, or Minsk offices and write some awesome software!

Community support is always appreciated! Bug reports and pull requests are welcome on GitHub.

Adding a New Spicerack Gem

To add a new gem to the spicerack:

cd spicerack
bundle gem GEM
cd GEM
rm -rf .git
rm .travis.yml
rm .gitignore
rm Gemfile
chmod 0664 lib/GEM/version.rb

Here's a checklist of some other tasks (see another gem as reference):

⚠️ Reminder: Add the magic comment to the top of all the generated ruby files!

  • Create a CHANGELOG.md and make the first entry
  • Add to the Included Gems section
  • Edit lib/GEM/version.rb to add the comment line
  • Edit README.md to add badges, update development & contributor sections, generate ToC
  • Copy over GEM/Rakefile from any other gem
  • Remove the failing spec in spec/GEM_spec.rb and replace it with the rspice shared example
  • Edit spec/spec_helper.rb to use the shared spec helper
  • Remove the default error in lib/GEM/GEM.rb
  • Edit GEM.gemspec and clean up the boilerplate

Then in the base directory:

  • Edit Rakefile to add GEM to the SPICERACK_GEMS constant
  • Add a require for your new gem into:
    • lib/spicerack.rb if its necessary for a Spicerack Utility object
    • lib/spicery/spicery.rb otherwise
  • Add the new gem into spicerack.gemspec
  • Increment the version in SPICERACK_VERSION
  • Run rake spicerack:update_all_versions to the correct version

🚨 Don't forget to run bundle so the Gemfile.lock gets updated!!

Next, push the code up and open a new pull request.

Once that gets merged into main, run:

  • Run rake spicerack:release_all to claim the new gem name with the empty build

Release

💁‍ Please remember to keep all the CHANGELOGS up to date!

This is a monorepo which contains several gems designed to build and release together.

To perform release, set the new canonical version in the .4.4SPICERACK_VERSION file then run the task.

echo "0.1.0" > SPICERACK_VERSION
rake spicerack:update_all_versions
rake spicerack:update_all_changelogs
# Manually add any changes to the necessary changelogs
git commit -am "Updating to version 0.1.0 for release"
rake spicerack:release_all

This will build and release all dependent gems at the same time.

Only the main branch should be released!

Versions

Spicerack uses Major.Minor.Patch version control.

Versions should be increased according to the following rules:

  • Major Version for non-backwards compatible changes.
  • Minor Version for new gems or important features.
  • Patch Version for bug fixes, enhancements, and optimizations.

License

The gem is available as open source under the terms of the MIT License.