Project

pigtail

0.0
No commit activity in last 3 years
No release in over 3 years
Pigtail is a Ruby gem that provides a clear syntax for writing configurations.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.9
>= 0.9.5, ~> 0.9
~> 0
 Project Readme

Pigtail is a Ruby gem that provides a clear syntax for writing configurations.

Installation

$ gem install pigtail

Or with Bundler in your Gemfile.

gem 'pigtail'

Getting started

$ cd /apps/my-great-project
$ pigtailize .

This will create an initial config/pigtail.rb file for you.

Example config/pigtail.rb file

Pigtail ships with three pre-defined config types: command, runner, and rake. You can define your own with config_type.

config_type :sports, <<-YAML
global:
  - category: :task
    place: :place
    log: :log
    feeds:
      - http://www.example.com/ski_1.rss
      - http://www.example.com/ski_2.rss
YAML
set :log, "/path/to/my/sports.log"

to "foo/bar" do
  sports "ski", {
    place: "/japan/nagano"
  }
end

Would configure global: foo to "/bar/buzz". :task is always replaced with the first argument, and any additional hash arguments are replaced with the options passed in or by variables that have been defined with set.

The pigtail command

$ cd /apps/my-great-project
$ pigtail

This will simply show you your config/pigtail.rb file converted to cron syntax. It does not read or write your crontab file. Run pigtail --help for a complete list of options.

Acknowledgement

Pigtail is based heavily on Whenever.

Epilogue

A whale!
Down it goes, and more, and more
Up goes its tail!

-Buson Yosa

Compatible with Ruby 1.8.7-2.2.0, JRuby, and Rubinius. Build Status


Copyright © 2015 Nab Inno