Testing configuration

14 views
Skip to first unread message

Anita Graham

unread,
Aug 6, 2015, 12:55:51 AM8/6/15
to Dragonfly

I would like to test that my dragonfly configuration works.

Is there some way to get a dragonfly app to return a configured value?

For example:

app = Dragonfly.app(:myapp)
app.configure  do
  verify_urls false
end
puts app.verify_urls

thanks for any help,

Anita

Mark Evans

unread,
Aug 6, 2015, 6:55:32 AM8/6/15
to dragonf...@googlegroups.com
have a look at https://github.com/markevans/dragonfly/blob/master/lib/dragonfly/app.rb inside set_up_config block.

some configurable values are testable like that, some aren't.
ones that say "writer" should be - in that case

    app.server.verify_urls

would work (the "writer" has a ":for => :server" argument)

Anita Graham

unread,
Aug 8, 2015, 2:43:41 AM8/8/15
to Dragonfly
Thanks for the quick reply.

I had looked at the code but didn't 'get' the .server. part.

Anita
Reply all
Reply to author
Forward
0 new messages