markevans/dragonfly — Issue #165: Replacing basename with name fails for images with dashes
Author: parndt
Created: 2012-01-27 03:55:36+00:00
State: open

Related to resolve/refinerycms#1253

In my investigations I have found the following code:

https://github.com/markevans/dragonfly/blob/master/lib/dragonfly/server.rb#L75-L81

If I modify this and test (using a Gemfile path source) then my issue goes away when I use the following code:

```ruby
def url_mapper
@url_mapper ||= UrlMapper.new(url_format,
:job => '[\w+~]',
:name => '[^\/]',
:format => '[^\.]'
)
end
```

This leaves me thinking that there is a bug in Dragonfly because I can't override url_mapper and yet it wants to always use basename. Is there any way to customise the url_mapper to use my code instead?

Thanks!