From 8a823d2bd9acecd47a26fc594d432d7a10ff3452 Mon Sep 17 00:00:00 2001 From: Chris Leavoy Date: Sat, 22 Sep 2012 21:24:30 -0400 Subject: [PATCH] Fix for older versions of ruby that 'require rubygems' explicitly --- lib/puppet/provider/sensu_api_config/json.rb | 1 + lib/puppet/provider/sensu_check_config/json.rb | 1 + lib/puppet/provider/sensu_clean_config/json.rb | 1 + lib/puppet/provider/sensu_client_config/json.rb | 1 + lib/puppet/provider/sensu_dashboard_config/json.rb | 1 + lib/puppet/provider/sensu_handler_config/json.rb | 1 + lib/puppet/provider/sensu_rabbitmq_config/json.rb | 1 + lib/puppet/provider/sensu_redis_config/json.rb | 1 + 8 files changed, 8 insertions(+) diff --git a/lib/puppet/provider/sensu_api_config/json.rb b/lib/puppet/provider/sensu_api_config/json.rb index 825531b338..2e93024371 100644 --- a/lib/puppet/provider/sensu_api_config/json.rb +++ b/lib/puppet/provider/sensu_api_config/json.rb @@ -1,3 +1,4 @@ +require 'rubygems' if RUBY_VERSION < '1.9.0' require 'json' Puppet::Type.type(:sensu_api_config).provide(:json) do diff --git a/lib/puppet/provider/sensu_check_config/json.rb b/lib/puppet/provider/sensu_check_config/json.rb index dd6ad688bc..8ffa5de393 100644 --- a/lib/puppet/provider/sensu_check_config/json.rb +++ b/lib/puppet/provider/sensu_check_config/json.rb @@ -1,3 +1,4 @@ +require 'rubygems' if RUBY_VERSION < '1.9.0' require 'json' Puppet::Type.type(:sensu_check_config).provide(:json) do diff --git a/lib/puppet/provider/sensu_clean_config/json.rb b/lib/puppet/provider/sensu_clean_config/json.rb index 8ecd339d62..3ddeb8dc6e 100644 --- a/lib/puppet/provider/sensu_clean_config/json.rb +++ b/lib/puppet/provider/sensu_clean_config/json.rb @@ -1,3 +1,4 @@ +require 'rubygems' if RUBY_VERSION < '1.9.0' require 'json' Puppet::Type.type(:sensu_clean_config).provide(:json) do diff --git a/lib/puppet/provider/sensu_client_config/json.rb b/lib/puppet/provider/sensu_client_config/json.rb index 38ca76e911..11d5b749a2 100644 --- a/lib/puppet/provider/sensu_client_config/json.rb +++ b/lib/puppet/provider/sensu_client_config/json.rb @@ -1,3 +1,4 @@ +require 'rubygems' if RUBY_VERSION < '1.9.0' require 'json' Puppet::Type.type(:sensu_client_config).provide(:json) do diff --git a/lib/puppet/provider/sensu_dashboard_config/json.rb b/lib/puppet/provider/sensu_dashboard_config/json.rb index fb76dc321b..7e401042e5 100644 --- a/lib/puppet/provider/sensu_dashboard_config/json.rb +++ b/lib/puppet/provider/sensu_dashboard_config/json.rb @@ -1,3 +1,4 @@ +require 'rubygems' if RUBY_VERSION < '1.9.0' require 'json' Puppet::Type.type(:sensu_dashboard_config).provide(:json) do diff --git a/lib/puppet/provider/sensu_handler_config/json.rb b/lib/puppet/provider/sensu_handler_config/json.rb index 68e9cf8ef6..5cd2d3cdd8 100644 --- a/lib/puppet/provider/sensu_handler_config/json.rb +++ b/lib/puppet/provider/sensu_handler_config/json.rb @@ -1,3 +1,4 @@ +require 'rubygems' if RUBY_VERSION < '1.9.0' require 'json' Puppet::Type.type(:sensu_handler_config).provide(:json) do diff --git a/lib/puppet/provider/sensu_rabbitmq_config/json.rb b/lib/puppet/provider/sensu_rabbitmq_config/json.rb index e49172a610..ad15eb30a6 100644 --- a/lib/puppet/provider/sensu_rabbitmq_config/json.rb +++ b/lib/puppet/provider/sensu_rabbitmq_config/json.rb @@ -1,3 +1,4 @@ +require 'rubygems' if RUBY_VERSION < '1.9.0' require 'json' Puppet::Type.type(:sensu_rabbitmq_config).provide(:json) do diff --git a/lib/puppet/provider/sensu_redis_config/json.rb b/lib/puppet/provider/sensu_redis_config/json.rb index 777cd0f2f4..edc86daf15 100644 --- a/lib/puppet/provider/sensu_redis_config/json.rb +++ b/lib/puppet/provider/sensu_redis_config/json.rb @@ -1,3 +1,4 @@ +require 'rubygems' if RUBY_VERSION < '1.9.0' require 'json' Puppet::Type.type(:sensu_redis_config).provide(:json) do