Project

git_flo

0.0
Repository is archived
No release in over 3 years
Low commit activity in last 3 years
"Git plugin for Flo"
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.10
>= 0
~> 10.0

Runtime

>= 0
 Project Readme

GitFlo

Gem Version Code Climate Build Status

GitFlo is a Git plugin for the Flo workflow automation library. If you aren't familiar with Flo, then please start here

Installation

Add this line to your application's Gemfile:

gem 'git_flo'

And then execute:

$ bundle

Or install it yourself as:

$ gem install git_flo

Compatibility

GitFlo uses the Rugged rubygem, which includes C bindings to the libgit2 C library. For this reason, this gem is not expected to work with jruby. For more information on Rugged, check it out on Github

Configuration

In your Flo configuration file, configure git inside the config block

config do |cfg|
  cfg.provider :git_flo, { credentials: Rugged::Credentials::SshKeyFromAgent.new(username: 'git') }
end

If you will not be running flo within your local git repository, you can pass in a :repo_location option to specify where the git repo exists.

If you wish to push to a repo requiring authentication, you must specify a credentials provider. See the Rugged::Credentials module for options.

Usage

Specify the commands you wish to run in the register_command block. For example

# Checks out a branch with the name "my_new_branch".  If the branch does not exist, a new branch is created based off the master branch
perform :git_flo, :check_out_or_create_branch, { from: 'master', name: 'my_new_branch' }

# pushes the 'my_new_branch' up to the 'origin' remote repo.  This will raise an error if this would result in a force push
perform :git_flo, :push, { branch: 'my_new_branch' }

Contributing

  1. Fork it (http://github.com/your-github-username/git_flo/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

License

Copyright (c) 2017, 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.