
Security News
CISA’s 2025 SBOM Guidance Adds Hashes, Licenses, Tool Metadata, and Context
CISA’s 2025 draft SBOM guidance adds new fields like hashes, licenses, and tool metadata to make software inventories more actionable.
Flo is a local workflow automation tool that helps you get things done. This gem contains the core functionality for Flo, plugins for interacting with various systems can be found in separate provider gems.
Add this line to your application's Gemfile:
gem 'flo'
And then execute:
$ bundle
Or install it yourself as:
$ gem install flo
http://www.rubydoc.info/github/salesforce/flo/
If you have a .flo
configuration file (See .flo configuration file), in your current working directory and/or your home directory, flo will parse your configuration file(s) and generate CLI commands for you. To list out the possible commands, use
flo help
You can also see the usage and options for specific commands:
flo help <command>
Flo has been built with the intention of being easy to use within ruby scripts. Flo::Runner
is responsible for parsing your custom configuration and invoking the commands. See the following example:
require 'flo'
runner = Flo::Runner.new
# Load your custom command configurations (see .flo file section for more details)
runner.load_config_file(File.join(__dir__,'.flo'))
# Run the something:useful command defined in the .flo file
response = runner.execute('something:useful', id: '123')
Flo makes very few assumptions about what you want to use it for, or how you want to use it. In order for you to use it for anything useful, you will need to provide it some configuration. This is accomplished by loading one or more .flo configuration files. See Ruby script usage for an example of how to load the file. The .flo file is evaluated in ruby in a cleanroom environment (see the cleanroom gem for more information), so you can require any gems or modules needed to accomplish the functionality you are looking for. There are two required sections:
Before you can do anything useful in your .flo file, you have to declare providers. You can do so using a config block, for example:
config do |cfg|
cfg.provider :developer, {configuration_option: 'value' }
end
You can register any number of commands. Commands are namespaced to make it easier to group together similar commands. Within a command declaration you declare a set of tasks that will be executed in order when the command is invoked. Here is an overly simple example for starting a feature branch that only uses a single provider. In typical usage you would likely utilize multiple providers within a single command.
# Registers a command for starting a feature - feature:start. This command has
# one required argument: 'feature_name'. Note that in order for this to work,
# you will need to declare the git_flo provider in the config section.
register_command('feature:start') do |feature_name: nil|
# During command execution, perform the :check_out_or_create_branch method on
# the git_flo provider, passing in the :from and :name arguments
perform :git_flo, :check_out_or_create_branch, { from: 'master', name: feature_name }
end
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)Copyright (c) 2019, Salesforce.com, Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
Neither the name of Salesforce.com nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
FAQs
Unknown package
We found that flo 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
CISA’s 2025 draft SBOM guidance adds new fields like hashes, licenses, and tool metadata to make software inventories more actionable.
Security News
A clarification on our recent research investigating 60 malicious Ruby gems.
Security News
ESLint now supports parallel linting with a new --concurrency flag, delivering major speed gains and closing a 10-year-old feature request.