RakeDeployLib
RakeDeployLib includes methods for deploying und syncing files to a remote host. The Gem depends on rsync! The OS (Operating System) needs support for the rsync command (e.q. Linux, Unix, OS X).
- deploy = transfare local (repository) files to remote server
- sync = transfare remote server files to local (repository)
Status
This is an alpha stage version of the Gem. More methods are follow.
Installation
Add this line to your application's Gemfile:
gem 'rake_deploy_lib'
And then execute:
$ bundle
Or install it yourself as:
$ gem install rake_deploy_lib
Usage
RakeDeployLib.deploy
RakeDeployLib.deploy(@local, @user, @host, @remote, @excludes)
Deploys local (repository) files, excepts excludes, to the remote server. Please be aware, that files will be deleted at remote host, if they don't exist local! With excludes you are able to prevent deletion.
- local (mendetory) - directory relative to the project root without / (slash) at the end.
- user (mendetory) - ssh user name at the remote server. Use of ssh certificate authentication is recommanded.
- host (mendetory) - server domain like example.com
- remote (mendetory) - absolute directory path without / (slash) at the end.
- excludes (optional) - an arrey of files or directories to exclude.
- Files: e.g. "myfile.txt" or ".gitignore"
- Directories: e.g. "mydirectory/" be aware of the trailing / (slash)
Development
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.
Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/rake_deploy_lib. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.
License
The gem is available as open source under the terms of the MIT License.