Skip to content

net-http-persistent 3.0 and faraday incompatibility #80

Closed
@ProGM

Description

@ProGM

We are using net-http-persistent with faraday in our neo4j-core gem.

              Faraday.new(url) do |c|
                c.request :basic_auth, user, password
                c.request :multi_json

                c.response :multi_json, symbolize_keys: true, content_type: 'application/json'
                c.use Faraday::Adapter::NetHttpPersistent

                # c.response :logger, ::Logger.new(STDOUT), bodies: true

                c.headers['Content-Type'] = 'application/json'
                c.headers['User-Agent'] = @user_agent_string
              end

https://github.com/neo4jrb/neo4j-core/blob/478595b5c6ee6cda2602aad4080ab4a7ea8f0ce3/lib/neo4j/core/cypher_session/adaptors/http.rb#L141

After upgrading to 3.0.0, it breaks on initialization, with:

/home/vagrant/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/net-http-persistent-3.0.0/lib/net/http/persistent.rb:505:in `initialize': wrong number of arguments (given 2, expected 0) (ArgumentError)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions