RakeScript

RakeScript is a scripts helper for rake tasks that allows easy managing file system and shell commands.

Installation

Add this line to your application's Gemfile:

gem 'rake_script', require: false

And then execute:

$ bundle

Or install it yourself as:

$ gem install rake_script

Usage

add rake file something.rake to your project with following code

require 'rake_script'

namespace :something do
  include RakeScript::RakeMethods

  desc 'Task that do something useful'
  task :some_task do
    with_puts_benchmark('Some task') do
      cmd 'foo --bar', env: { BAZ: 'boo' }
      abort('fail') unless folder_exist?('/path/to/created/folder')
    end
  end
end

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/senid231/rake_script.

License

The gem is available as open source under the terms of the MIT License.