Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Ruby configuration #36

wants to merge 5 commits into


None yet
2 participants

calavera commented Oct 30, 2011

Backwards compatible ruby configuration for Trinidad. The old yaml file is mapped to the new ruby configuration. This will prevent weird issues like the one we saw at #34.

The new configuration file should look like this:

Trinidad.configure do |config|
  config.port = 4000
  config.address = ''

  config.http = {

  config.extensions = {

kares commented Oct 30, 2011

hey David, that looks great !
one thing strike me while looking into it. if there's both a trinidad.yml and a trinidad.rb file as well it seems it will use both - first the yaml than the ruby config. maybe it would be more use friendly in these cases to only apply one ?


kares commented Oct 30, 2011

meh, actually only the trinidad.yml would have been used. my bad I misread the code on the web ... sorry :)


calavera commented Oct 30, 2011

yep it would use trinidad.yml, Dir.glob sorts the results by pattern precedence, so if both are present it would return ['trinidad.yml', 'trinidad.rb']


@calavera calavera closed this in faa2d79 Nov 8, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment