lib/imgix/client.rb in imgix-0.3.4 vs lib/imgix/client.rb in imgix-0.3.5

- old
+ new

@@ -12,14 +12,16 @@ @hosts = Array(options[:host]) + Array(options[:hosts]) and validate_hosts! @token = options[:token] @secure = options[:secure] @shard_strategy = options[:shard_strategy] and validate_strategy! @include_library_param = options.fetch(:include_library_param, true) + @library = options.fetch(:library_param, "rb") + @version = options.fetch(:library_version, Imgix::VERSION) end def path(path) p = Path.new(prefix(path), @token, path) - p.ixlib("rb-#{Imgix::VERSION}") if @include_library_param + p.ixlib("#{@library}-#{@version}") if @include_library_param p end def prefix(path) "#{@secure ? 'https' : 'http'}://#{get_host(path)}"