
Security News
The Changelog Podcast: Practical Steps to Stay Safe on npm
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.
TrackBallast contains small supporting units of Ruby to use with Rails. It is named after the small supporting stones that you see alongside railway tracks.
None of these units are quite large enough to be a full Ruby gem on their own, but are yet highly reusable and useful in many Rails applications.
Add this line to your application's Gemfile:
gem "track_ballast"
And then execute:
$ bundle
Or install it yourself as:
$ gem install track_ballast
If you wish to use features that rely on Redis, you may set a Redis connection to TrackBallast.redis.
For Rails, you may wish to set up TrackBallast using an initializer, though please note, the default configuration may be appropriate. Please see the TrackBallast.redis documentation for details.
# config/initializers/track_ballast.rb
TrackBallast.redis = Redis.new(url: ENV["CUSTOM_REDIS_URL"])
Please see the code and documentation for individual units.
You may require the entirety of track_ballast:
require "track_ballast/all"
...or, in your Gemfile:
gem "track_ballast", require: "track_ballast/all"
Alternatively, only require each desired unit:
require "track_ballast/callable"
class MyService
extend TrackBallast::Callable
# ...
end
require "track_ballast/stop_signal"
class MyJob < ApplicationJob
extend TrackBallast::StopSignal
# ...
end
require "track_ballast/uuid_management"
class MyModel < ApplicationRecord
include TrackBallast::UuidManagement
end
Please see the Milestones on GitHub.
You'll need Redis and Ruby installed. Please ensure both are set up before continuing.
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.
To allow for easy use of individual features of this library, please ensure specs run independently. For example:
find spec -name '*_spec.rb' -exec bundle exec rspec {} \;
git checkout -b my-new-feature)git commit -am 'Add some feature')git push origin my-new-feature)track_ballast is licensed under an Apache 2 license. Contributors are required to sign a contributor license agreement. See LICENSE.txt and CONTRIBUTING.md for more information.
FAQs
Unknown package
We found that track_ballast demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.

Security News
Experts push back on new claims about AI-driven ransomware, warning that hype and sponsored research are distorting how the threat is understood.

Security News
Ruby's creator Matz assumes control of RubyGems and Bundler repositories while former maintainers agree to step back and transfer all rights to end the dispute.