pharo
pharo copied to clipboard
Inspector Extensions for Zinc in P10/P11
With the new capabilities of inspector extensions using Spec2 it would be nice to have more additional custom inspector extensions - for instance for Zinc.
inspectionHeaders: aBuilder
<inspectorPresentationOrder: 10 title: 'Headers'>
^ aBuilder newTable
addColumn: (SpStringTableColumn
title: 'Key'
evaluated: [ :each | StObjectPrinter asTruncatedTextFrom: each key ])
beSortable;
addColumn: (SpStringTableColumn
title: 'Value'
evaluated: [ :each | StObjectPrinter asTruncatedTextFrom: each value ])
beSortable;
items: (self headers headers associations collect: [:e | StInspectorAssociationNode hostObject: e ]);
yourself
allows to directly see the headers on the ZnResponse instances:
inspectionEntity: aBuilder
<inspectorPresentationOrder: 10 title: 'Entity'>
^ aBuilder newText
text: self entity contents asString;
yourself
allows to browse the response contents directly:
@svenvc / @MarcusDenker
As Zinc is externally hosted the questions is in which repo / package we can put them and how to load.
Following what NewTools provide it would make sense to have them in a "Zinc-HTTP-Inspector-Extensions":
Yes this would be very nice to have, it is missing right now.
I agree, it is an add-on that would best go into "Zinc-HTTP-Inspector-Extensions"
@svenvc / @estebanlm / @MarcusDenker / @demarey
So how could we introduce this?
Is it better to place them in Zinc repo (Option 1) or would it better fit to provide inspector extensions in NewTools repo (Option 2) ? I personally think that it would be better with option 1 as the tool extensions belong to the code they extend
I do not know how Zinc contributions are handled at the moment?
a) is such new code added in svens repo first and then introduced into Pharo repo b) can it be introduced in Pharo repo and then resynched to your repo
If you want, do a PR to zinc first, then we can test it a bit, after that it can simply be loaded to pharo
@svenvc / @estebanlm / @MarcusDenker / @demarey
So how could we introduce this?
Is it better to place them in Zinc repo (Option 1) or would it better fit to provide inspector extensions in NewTools repo (Option 2) ? I personally think that it would be better with option 1 as the tool extensions belong to the code they extend
I agree: option 1 is better. It should be loadable independently of core Zinc packages. Thanks
Done Zinc repo. See https://github.com/svenvc/zinc/issues/93
I think this issue can be closed then.