fix skylight normalizers issue

This commit is contained in:
Les Fletcher 2018-05-15 08:14:46 -07:00 committed by Shishir Kakaraddi
parent ac136b988c
commit 077817ecec
4 changed files with 25 additions and 4 deletions

View File

@ -0,0 +1,7 @@
require 'skylight'
SKYLIGHT_NORMALIZER_BASE_CLASS = begin
::Skylight::Core::Normalizers::Normalizer
rescue NameError
::Skylight::Normalizers::Normalizer
end

View File

@ -1,11 +1,11 @@
require 'skylight'
require 'fast_jsonapi/instrumentation/skylight/normalizers/base'
require 'fast_jsonapi/instrumentation/serializable_hash'
module FastJsonapi
module Instrumentation
module Skylight
module Normalizers
class SerializableHash < Skylight::Normalizers::Normalizer
class SerializableHash < SKYLIGHT_NORMALIZER_BASE_CLASS
register FastJsonapi::ObjectSerializer::SERIALIZABLE_HASH_NOTIFICATION

View File

@ -1,11 +1,11 @@
require 'skylight'
require 'fast_jsonapi/instrumentation/skylight/normalizers/base'
require 'fast_jsonapi/instrumentation/serializable_hash'
module FastJsonapi
module Instrumentation
module Skylight
module Normalizers
class SerializedJson < Skylight::Normalizers::Normalizer
class SerializedJson < SKYLIGHT_NORMALIZER_BASE_CLASS
register FastJsonapi::ObjectSerializer::SERIALIZED_JSON_NOTIFICATION

View File

@ -0,0 +1,14 @@
require 'spec_helper'
describe FastJsonapi::ObjectSerializer do
context 'instrument' do
context 'skylight' do
# skip for normal runs because this could alter some
# other test by insterting the instrumentation
xit 'make sure requiring skylight normalizers works' do
require 'fast_jsonapi/instrumentation/skylight'
end
end
end
end