Skip to content

Commit dca327c

Browse files
committed
fix: Support new style of functions syntax in appmap.yml
1 parent f557dde commit dca327c

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

lib/appmap/config.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@ def load(config_data)
366366
# hook config.
367367
declare_hook(hook_decl)
368368
end
369-
end
369+
end.flatten
370370
end
371371

372372
config_params[:packages] = \

spec/config_spec.rb

+19
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@
1111
functions: [
1212
{
1313
name: 'pkg/cls#fn',
14+
},
15+
{
16+
methods: ['cls#new_fn'],
17+
path: 'pkg'
1418
}
1519
]
1620
}.deep_stringify_keys!
@@ -64,6 +68,15 @@
6468
"fn"
6569
]
6670
}
71+
},
72+
{
73+
"cls": "cls",
74+
"target_methods": {
75+
"package": "pkg",
76+
"method_names": [
77+
"new_fn"
78+
]
79+
}
6780
}
6881
],
6982
"builtin_hooks": {
@@ -195,6 +208,12 @@
195208
"method_names": [
196209
"fn"
197210
]
211+
},
212+
{
213+
"package": "pkg",
214+
"method_names": [
215+
"new_fn"
216+
]
198217
}
199218
],
200219
"ActiveSupport::Callbacks::CallbackSequence": [

0 commit comments

Comments
 (0)