Skip to content

Support for Debug Mode? #606

@tannerhallman

Description

@tannerhallman

A good practice for integrations is to have a debug mode which lets our code execute the Intercom actions as if they were live, but don't actually hit the Intercom API (would be handled internally to the intercom-ruby gem). Instead of skipping the whole blocks by checking for an environment, it would be great to have this feature.

Something like this, which is done while initializing.
@intercom = Intercom::Client.new(token: ENV['TOKEN'], debug: true)

Here's an example of this; https://github.com/sendgrid/sendgrid-ruby/blob/e17be75683ab64a352893b76c6959803a4b51051/examples/helpers/mail/example.rb#L109 although I am seeing that is likely something that's handled server-side.

Let me know if anyone has any suggestions on how to test. I suppose using VCR? I do realize there's "test" environments intercom will let you create, but I still run into ID conflicts while using it for development across different machines that use sequential numbering for the id fields.

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions