
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Shell commands triggered by files changing.
run_on_start
option runs the command once, not once per file that will be watchedname
option provides a meaningful name for each instance which is displayed in console and notificationsMake sure you have guard installed.
Install the gem with:
gem install guard-super_shell
Or add it to your Gemfile:
gem 'guard-super_shell'
And then add a basic setup to your Guardfile:
guard init shell
If you can do something in your shell, or in ruby, you can do it when files change
with guard-super_shell. It executes a shell command built by the command
block you provide,
if one or more matching files change.
The output of the command is shown in the console.
It shows a notification based on the return status of that shell command.
guard(
:shell,
name: "GraphQL Schema",
command: proc { |files| "bin/rake graphql:schema:idl" },
) do
watch %r{app/graphql.+}
end
will run a rake task and print the returned output from the rake task to the console.
You can also return an array of command components. To have it run at startup:
guard(
:shell,
name: "GraphQL Schema",
run_at_start: true,
command: proc { |files| ["bin/rake", "graphql:schema:idl"] },
) do
watch %r{app/graphql.+}
end
guard(
:shell,
name: "Speak Changes",
command: proc { |files| "say -v cello #{files.join(" ")}" },
) do
watch /(.*)/
end
guard(
:shell ,
name: "Check Ruby Syntax",
command: proc { |files| "ruby -c #{files.join(' ')}" },
) do
watch /.*\.rb$/
end
guard(
:shell ,
name: "Run Corresponding Test",
command: proc { |files| "bin/test #{files.join(' ')}" },
) do
# Translate the matching changed file path to get the path of the corresponding test file.
watch %r{app/stuff/(.*)\.rb$} { |m| "spec/stuff/#{m[1]}_test.rb" }
end
FAQs
Unknown package
We found that guard-super_shell 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
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.