Sha256: b3ac0a5475cb7d19af470c26e63ad95d7cc2a2fe807ce7910bd1715a90593218

Contents?: true

Size: 446 Bytes

Versions: 2

Compression:

Stored size: 446 Bytes

Contents

# Not perfect. Simple `gem` hack to avoid the
# Mysql2Adapter in ActiveREcord from using rubygems.
#
if defined?(Rails)
  $ORIG_GEM_METHOD = method(:gem)
  kernel = (class << ::Kernel; self; end)
  [kernel, ::Kernel].each do |k|
    k.send :remove_method, :gem
    k.send :define_method, :gem do |dep, *reqs|
      unless ['postgresql'].include?(dep)
        $ORIG_GEM_METHOD.call(dep, *reqs)
      end
    end
    k.send :public, :gem
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
postgresql-lambda-1.3.4.3 ./lib/postgresql-lambda.rb
postgresql-lambda-1.3.4.1 ./lib/postgresql-lambda.rb