lib/comic_walker/v1/client.rb in comic_walker-0.3.0 vs lib/comic_walker/v1/client.rb in comic_walker-0.4.0

- old
+ new

@@ -24,11 +24,11 @@ class NoValidSessionError < StandardError end def create_session on_exception = lambda { |exception| create_user } - retryable(tries: 2, on: UnknownDeviceError, sleep: 0, exception_cb: on_exception) do + Retryable.retryable(tries: 2, on: UnknownDeviceError, sleep: 0, exception_cb: on_exception) do res = post('/user_sessions/create', { DID: @uuid, PIN: @uuid, AID: AID, AVER: AVER, @@ -64,10 +64,10 @@ include_meta: 1, languages: 'ja', }.merge(params) on_exception = lambda { |exception| create_session } - retryable(tries: 2, on: NoValidSessionError, sleep: 0, exception_cb: on_exception) do + Retryable.retryable(tries: 2, on: NoValidSessionError, sleep: 0, exception_cb: on_exception) do res = get('/v1/contents', params) case res.body when 'NoValidSessionError' raise NoValidSessionError.new else