lib/imgix/client.rb in imgix-0.3.3 vs lib/imgix/client.rb in imgix-0.3.4
- old
+ new
@@ -11,13 +11,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)
end
def path(path)
- Path.new(prefix(path), @token, path)
+ p = Path.new(prefix(path), @token, path)
+ p.ixlib("rb-#{Imgix::VERSION}") if @include_library_param
+ p
end
def prefix(path)
"#{@secure ? 'https' : 'http'}://#{get_host(path)}"
end