File tree Expand file tree Collapse file tree 8 files changed +10
-9
lines changed Expand file tree Collapse file tree 8 files changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -7,9 +7,11 @@ class << self
7
7
deprecate :inherited , 'ActiveModelSerializers::Adapter::Base.'
8
8
end
9
9
10
+ # :nocov:
10
11
def initialize ( serializer , options = { } )
11
12
super ( ActiveModelSerializers ::Adapter ::Base . new ( serializer , options ) )
12
13
end
14
+ # :nocov:
13
15
end
14
16
end
15
17
end
Original file line number Diff line number Diff line change @@ -2,9 +2,6 @@ module ActiveModel
2
2
class Serializer
3
3
# @api private
4
4
class BelongsToReflection < SingularReflection
5
- def macro
6
- :belongs_to
7
- end
8
5
end
9
6
end
10
7
end
Original file line number Diff line number Diff line change @@ -2,9 +2,6 @@ module ActiveModel
2
2
class Serializer
3
3
# @api private
4
4
class HasManyReflection < CollectionReflection
5
- def macro
6
- :has_many
7
- end
8
5
end
9
6
end
10
7
end
Original file line number Diff line number Diff line change @@ -2,9 +2,6 @@ module ActiveModel
2
2
class Serializer
3
3
# @api private
4
4
class HasOneReflection < SingularReflection
5
- def macro
6
- :has_one
7
- end
8
5
end
9
6
end
10
7
end
Original file line number Diff line number Diff line change @@ -5,11 +5,13 @@ module Adapter
5
5
private_constant :ADAPTER_MAP if defined? ( private_constant )
6
6
7
7
class << self # All methods are class functions
8
+ # :nocov:
8
9
def new ( *args )
9
10
fail ArgumentError , 'Adapters inherit from Adapter::Base.' \
10
11
"Adapter.new called with args: '#{ args . inspect } ', from" \
11
12
"'caller[0]'."
12
13
end
14
+ # :nocov:
13
15
14
16
def configured_adapter
15
17
lookup ( ActiveModelSerializers . config . adapter )
Original file line number Diff line number Diff line change @@ -6,8 +6,10 @@ def jsonapi_parse(*args)
6
6
Adapter ::JsonApi ::Deserialization . parse ( *args )
7
7
end
8
8
9
+ # :nocov:
9
10
def jsonapi_parse! ( *args )
10
11
Adapter ::JsonApi ::Deserialization . parse! ( *args )
11
12
end
13
+ # :nocov:
12
14
end
13
15
end
Original file line number Diff line number Diff line change @@ -38,12 +38,14 @@ def read_attribute_for_serialization(key)
38
38
end
39
39
40
40
# The following methods are needed to be minimally implemented for ActiveModel::Errors
41
+ # :nocov:
41
42
def self . human_attribute_name ( attr , _options = { } )
42
43
attr
43
44
end
44
45
45
46
def self . lookup_ancestors
46
47
[ self ]
47
48
end
49
+ # :nocov:
48
50
end
49
51
end
Original file line number Diff line number Diff line change @@ -32,11 +32,13 @@ class Railtie < Rails::Railtie
32
32
end
33
33
end
34
34
35
+ # :nocov:
35
36
generators do |app |
36
37
Rails ::Generators . configure! ( app . config . generators )
37
38
Rails ::Generators . hidden_namespaces . uniq!
38
39
require 'generators/rails/resource_override'
39
40
end
41
+ # :nocov:
40
42
41
43
if Rails . env . test?
42
44
ActionController ::TestCase . send ( :include , ActiveModelSerializers ::Test ::Schema )
You can’t perform that action at this time.
0 commit comments