twingly / twingly-amqp

:bus: Ruby gem for RabbitMQ subscribing and publishing
0 stars 0 forks source link

Remove requires from individual components #87

Closed Pontus4 closed 3 years ago

Pontus4 commented 3 years ago

Close #85

walro commented 3 years ago

I noticed we moved json, we have bunny lurking around too:

$ ag "require \""  lib

# ...

lib/twingly/amqp/session.rb
1:require "bunny"

# ...
Pontus4 commented 3 years ago

I noticed we moved json, we have bunny lurking around too

Same thing there, bunny is only used in session, but json was required in three different files. But it's maybe cleaner to require everything in amqp?

walro commented 3 years ago

But it's maybe cleaner to require everything in amqp?

Good question, I think we should pick one way at least. Might be simpler to move everything into the "main file" as I think that will give a clearer signal on what to do when adding a new dependency.

Pontus4 commented 3 years ago

Might be simpler to move everything into the "main file" as I think that will give a clearer signal on what to do when adding a new dependency.

Sure! Both options seem ok to me :)