I am delving into rom-rb with particular interest in rom-http for interacting with a web service.
I noticed that the default behavior of the JSON request handler clobbers the path of the dataset URI with dataset.absolute_path:
def self.call(dataset) uri = URI(dataset.uri) uri.path = dataset.absolute_path [...] end
The default implementation of absolute path prepends dataset.base_path with a slash. The effect of the behavior is that the path of the gateway URI is ignored.
My question is whether this behavior is intentional. Of course one can explicitly set base_path to the full path, but that seems odd. The base HTTP endpoint of a service is often not the root path of the site, so wouldn’t it make sense to configure this in the gateway and let the “base_path” of the dataset be relative to the gateway URI path?
For the moment I am overriding the request handler to behave the way I expect, but I wonder how other folks are using the library. It seems very well designed, but this one point is puzzling me.