figo-connect / ruby-figo

Ruby binding for the figo Connect API.
http://figo.io
8 stars 15 forks source link

Dependency not fixed #19

Closed felix1m closed 7 years ago

felix1m commented 7 years ago

Figo assumes net-http-persistent (~> 2.9.4) Now 3.0.0 was released and it breaks some calls for me because of interface changes in net-http-persistent major release.

dzdidi commented 7 years ago

It does not look like what you are saying is the reason: https://github.com/drbrain/net-http-persistent/blob/master/History.txt#L3-L9 https://github.com/figo-connect/ruby-figo/blob/9c902df50922e4e17de17affc11502a38ee6a164/lib/helpers/https.rb#L8-L9

felix1m commented 7 years ago

strange, i got a backtrace saying that figo is calling net-http-persistent with wrong number of arguments. I added this line to my gemfile gem 'net-http-persistent', '~> 2.9.4' and ran bundle update again. Then it was working again.

Well if you cannot reproduce this, feel free to close. I just figured i wouldn't be the only one stumbling over this :)

felix1m commented 7 years ago

i rolled back my fix and i do get the same error again. Here is the backtrace:

[Exception error="wrong number of arguments (given 2, expected 0)" error_class=ArgumentError backtrace=
/usr/local/bundle/gems/net-http-persistent-3.0.0/lib/net/http/persistent.rb:505:in `initialize',
/usr/local/bundle/gems/figo-1.3.2/lib/helpers/https.rb:9:in `initialize',
/usr/local/bundle/gems/figo-1.3.2/lib/figo.rb:51:in `new',
/usr/local/bundle/gems/figo-1.3.2/lib/figo.rb:51:in `initialize',
/myapp/app/services/hbci/figo_client.rb:13:in `new',
/myapp/app/services/hbci/figo_client.rb:13:in `initialize',
/myapp/app/services/hbci/figo_manager.rb:6:in `new',
/myapp/app/services/hbci/figo_manager.rb:6:in `initialize',
/myapp/app/workers/hbci_update_user_worker.rb:27:in `new',
/myapp/app/workers/hbci_update_user_worker.rb:27:in `consume',
/myapp/app/workers/worker_additions.rb:4:in `work',
/usr/local/bundle/gems/sneakers-2.4.0/lib/sneakers/worker.rb:59:in `block (3 levels) in do_work',
/usr/local/bundle/gems/sneakers-2.4.0/lib/sneakers/metrics/null_metrics.rb:8:in `timing',
/usr/local/bundle/gems/sneakers-2.4.0/lib/sneakers/worker.rb:55:in `block (2 levels) in do_work',
/usr/local/lib/ruby/2.3.0/timeout.rb:91:in `block in timeout',
/usr/local/lib/ruby/2.3.0/timeout.rb:101:in `timeout',
/usr/local/bundle/gems/sneakers-2.4.0/lib/sneakers/worker.rb:54:in `block in do_work',
/usr/local/bundle/gems/thread-0.1.7/lib/thread/pool.rb:56:in `execute',
/usr/local/bundle/gems/thread-0.1.7/lib/thread/pool.rb:404:in `block (2 levels) in spawn_thread',
/usr/local/bundle/gems/thread-0.1.7/lib/thread/pool.rb:371:in `loop',
/usr/local/bundle/gems/thread-0.1.7/lib/thread/pool.rb:371:in `block in spawn_thread']
felix1m commented 7 years ago

def initialize name: nil, proxy: nil, pool_size: DEFAULT_POOL_SIZE from /lib/net/http/persistent.rb:505

they just switched to keyword arguments (hash based)

dzdidi commented 7 years ago

Fixed here: https://github.com/figo-connect/ruby-figo/commit/88001999640adf769c386dfdf8aafb5430004eef

felix1m commented 7 years ago

Thanks :)