• Ruth Linehan's avatar
    (PE-18347) Handle multiple arities for `get` in http client class · ad0905ab
    Ruth Linehan authored
    Prior to Puppet Server 5, Puppet Server's http client class had an
    implementation of `get` with an arity of 2 (where `path` and `headers` are the
    arguments). However, in Ruby Puppet and in Puppet Server 5, the http client
    class has an implementation of `get` with an arity of 3 (with arguments
    `path`, `headers`, and `options`).
    
    Since we do not know under which version of Puppet Server or the Ruby Puppet
    master this terminus code will be run under, this commit adds a
    `multi_arity_get` helper function that inspects the `http_instance` class to
    determine the arity of `get` before calling it with the appropriate arguments
    for its arity.
    ad0905ab
puppetdb.rb 5.27 KB