ranjib/etcd-ruby — pull request #48 by jumanjiman (2014-09-09 19:16:16+00:00)
Title: 187

Use case:

I'd like to use https://github.com/garethr/hiera-etcd (which depends on this gem)
to provide an etcd backend for hiera on my puppetmaster.
But I must use RHEL 6.5, which only ships with ruby 1.8.7.

I'm aware of Software Collections on RHEL 6, but PuppetLabs
doesn't yet support software collections.
https://tickets.puppetlabs.com/browse/PUP-1112

I'd deploy puppetmaster on RHEL 7 (Ruby 2.x), but el7
doesn't have the passenger gem available yet in rpm format.

Changes:

* Enforce ruby 1.8.7 hashrocket style and update via:
`bundle exec rubocop --only='Style/HashSyntax' -a`

* Handle differences in net/http codebase between 1.8 and 1.9+

* On ruby 1.8, use posix-spawn in test harness

> The posix-spawn library aims to implement a subset of the Ruby
> 1.9 Process::spawn interface in a way that takes advantage of
> fast process spawning interfaces when available and provides
> sane fallbacks on systems that do not.

* Exclude rubocop and coco in bundle on ruby 1.8 to
avoid pulling in deps like celluloid and rainbow.