Questions tagged [configatron]

Configatron is a Ruby library that makes it easy to have persistently accessible configuration data available through your Ruby application.

Configatron is a Ruby library that makes it easy to have persistently accessible configuration data available through your Ruby application.

10 questions
2
votes
2 answers

What is the right /best place to store Configatron configuration in a Rails app?

I'm using the configatron gem for a new Rails app that is backed up by ActiveRecord. Some of my configatron settings are set in a file and some are pulled from DB, as they will change from time to time, here are a couple of lines from my…
konung
  • 6,908
  • 6
  • 54
  • 79
2
votes
2 answers

Can't convert Configatron::Store to String error when value used as parameter to Object.const_get

I recently replaced a home-grown configuration module with Configatron, but I'm unable to get one use case working. When I attempt to use a configatron value as an argument to Object.const_get like this: def formatter_class …
neontapir
  • 4,698
  • 3
  • 37
  • 52
2
votes
1 answer

configatron a singleton? Why can't I access the configatron in my class

I'm using configatron to store my config values. I can access the config values without a problem, except when the scope is within a class's method. I'm using configatron 3.0.0-rc1 with ruby 2.0.0 Here is the source I'm using in a single file…
John
  • 2,640
  • 1
  • 16
  • 16
2
votes
1 answer

Ruby: uninitialized constant Logger::Warn

I'm using Logger through config and this line: configatron.log.level = Logger::Warn gives me the error: `': uninitialized constant Logger::Warn (NameError) Even if I require 'logger' at the top. what gives? < Ruby N00B >
dlite922
  • 1,924
  • 3
  • 24
  • 60
1
vote
1 answer

configatron shorthand for namespaces

Is there a way to avoid typing the namespace each time when using the configatron gem? Say, you have configatron.email.pop.address = 1 configatron.email.pop.port = 2 Can I configure port and address by somehow typing configatron.email.pop only…
m33lky
  • 7,055
  • 9
  • 41
  • 48
0
votes
0 answers

Change IOptions object in runtime doesn't fire OnChanges

As described in Microsoft guides, I'm using services.Configure() method to create a config of T type from app configuration and to put it into DI container. My implementation of HttpClient receives IOptionsMonitor and httpClient through its…
Laser42
  • 646
  • 2
  • 7
  • 24
0
votes
1 answer

How to store Configatron persistently, after Ruby app has run

I'm pretty new to Ruby (though not to programming) and am trying to create a persistent config. Though I thought using Configatron would automatically make my config persistent, it does not seem to be the case. How would I make this persistent…
Ambidex
  • 755
  • 1
  • 5
  • 27
0
votes
2 answers

Rails: configatron

In my app I'm using configatron gem. The problem is I dont't understand clearly where I should store configatron settings. I put configatron.application_url = 'http://google.com/' in config/configatron/defaults.rb but this is not working. In the…
Pavel
  • 1,934
  • 3
  • 30
  • 49
0
votes
1 answer

Ruby Configuration: replacing nested key value for dev environment doesn't work

Case: Development environment log level is DEBUG while Production is INFO. I want to use every default log configuration and overwrite only level if environment == develoment. Problem: first level configs can be over-written but not sub levels.…
dlite922
  • 1,924
  • 3
  • 24
  • 60
0
votes
1 answer

ruby configatron foreach, How to display the name of a config?

I want to see test and test2 configatron.providers.test.remote_dir = '/incoming/test/current' configatron.providers.test.local_dir = 'data/test' configatron.providers.test2.remote_dir = '/incoming/test2/current' configatron.providers.test2.local_dir…
dlite922
  • 1,924
  • 3
  • 24
  • 60