lib/stackify/authorization/authorization_client.rb in stackify-api-ruby-1.0.2 vs lib/stackify/authorization/authorization_client.rb in stackify-api-ruby-1.0.3

- old
+ new

@@ -6,20 +6,20 @@ def initialize super @worker = Stackify::AuthWorker.new end - def auth attempts, delay_time= 20 + def auth attempts, delay_time= Stackify::ScheduleDelay.new task = auth_task attempts @worker.perform delay_time, task end def auth_task attempts properties = { limit: 1, attempts: attempts, success_condition: lambda do |result| - result.try(:code) == '200' + result.try(:status) == 200 end } Stackify::ScheduleTask.new properties do Stackify.internal_log :debug, 'AthorizationClient: trying to athorize...' send_request BASE_URI, Stackify::EnvDetails.instance.auth_info.to_json