influxdb-rails
influxdb-rails copied to clipboard
More flexible client configuration
With the following config:
InfluxDB::Rails.configure do |config|
config.client.hosts = ['localhost']
config.client.port = 8086
config.client.username = 'root'
config.client.password = 'pa$$word'
config.client.auth_method = 'basic_auth'
When my app loads, I get a undefined method 'auth_method=' for #<InfluxDB::Rails::ClientConfig:0x000055af834ef718> (NoMethodError)
However, if I remove it and enter a rails console, I can set it to InfluxDB::Rails.client.config.auth_method = 'basic_auth'
and am able to write_point
without any issues.
Am I missing something?
I guess we shouldn't hardcode client configuration and allow anything you want to pass in so we don't have to run after influxdb-ruby
options.
:+1: on this. That this gem only allows a limited number of configuration options is no benefit to any user. Also, if influxdb-ruby ever changes configuration on their end this gem must follow suit, or else it becomes unusable.