
Security News
New Website “Is It Really FOSS?” Tracks Transparency in Open Source Distribution Models
A new site reviews software projects to reveal if they’re truly FOSS, making complex licensing and distribution models easy to understand.
Autorespawn is an implementation of the popular autoreload scheme, which reloads Ruby program files when they change, but instead execs/spawns the underlying program again. This avoids common issues related to the load mechanism.
Require all the files you need autorespawn to watch and then do
Autorespawn.run do
# Add the program's functionality here
end
If you touch ARGV and $0, you will want to pass the program and arguments explicitely
Autorespawn.run 'program', 'argument0', 'argument1' do
end
The main usage I designed this gem for was to implement an autotest scheme that does not use #load, and that does restart tests whose dependencies are changed (autotest only looks for the test files). That means a few 100 subcommands that need to be spawned and managed. Not really feasible without some kind of manager behind the scene.
Autorespawn can be started used in master/slave mode. Some processes would be
spawning new subcommands by registering them with the Autorespawn#add_slave
method, while
other are workers. In my autotest prototype, the same script is called in both
cases, only the codepaths are different:
manager = Autorespawn.new
if build_axis.empty? == 1
manager.run do
# Perform the work
end
else
build_axis.each do |cmdline|
manager.add_slave(*cmdline)
end
manager.run
end
It is safe to use this scheme recursively. Slaves who call #add_slave
will
simply pass the request to the master.
Manage the dependency between slaves that called add_slave
and these slaves,
i.e. auto-remove the level 2 slaves when the level 1 changes and is respawned.
Add this line to your application's Gemfile:
gem 'autorespawn'
And then execute:
$ bundle
Or install it yourself as:
$ gem install autorespawn
TODO: Write usage instructions here
After checking out the repo, run bundle install
to install dependencies. Then, run rake test
to run the tests.
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.
Bug reports and pull requests are welcome on GitHub at https://github.com/doudou/autorespawn.
The gem is available as open source under the terms of the MIT License.
FAQs
Unknown package
We found that autorespawn demonstrated a not healthy version release cadence and project activity because the last version was released 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
A new site reviews software projects to reveal if they’re truly FOSS, making complex licensing and distribution models easy to understand.
Security News
Astral unveils pyx, a Python-native package registry in beta, designed to speed installs, enhance security, and integrate deeply with uv.
Security News
The Latio podcast explores how static and runtime reachability help teams prioritize exploitable vulnerabilities and streamline AppSec workflows.