Module: RightScale::Serializable

Overview

MessagePack and JSON serializable types that are sent to and from agents

Defined Under Namespace

Modules: ClassMethods, InstanceMethods

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object



31
32
33
34
35
36
37
38
39
40
41
42
43
# File 'lib/right_agent/serialize/serializable.rb', line 31

def self.included(base)
  if @check_active_support
    if require_succeeds?("active_support") && (v = Gem.loaded_specs['activesupport'].version.to_s) != "2.3.18"
      raise Exception.new("Some versions of the activesupport gem modify json in ways that are incompatible with this " +
                          "RightScale::Serializable module. Version #{v} used here is not allowed, use 2.3.18 instead.")
    else
      @check_active_support = false
    end
  end

  base.extend ClassMethods
  base.send(:include, InstanceMethods)
end