K
K
Kirill Bobykin2015-12-19 17:34:57
Ruby on Rails
Kirill Bobykin, 2015-12-19 17:34:57

How can I find out which application is currently using the gem inside the gem?

The bottom line is this: there is a system that includes a number of applications that communicate with each other via REST, let's say two applications use one gem. We send a REST request to one of them, which provokes the work of the gem, since we call the route described by the gem. What is the most elegant way to recognize the gem of the application we are accessing?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Wolf, 2015-12-19
@Qelphybox

You have an initially wrong understanding of modularity. This is where all the sugar is, that the gem should work without knowing anything about how and where it is launched.
In your case, I think you need to make a gem config, where you can set the "name" of the application.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question