Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Debug Mode? #606

Open
tannerhallman opened this issue Mar 30, 2023 · 0 comments
Open

Support for Debug Mode? #606

tannerhallman opened this issue Mar 30, 2023 · 0 comments

Comments

@tannerhallman
Copy link

tannerhallman commented Mar 30, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant