stealth_browser_automation 1.1.6 → 1.1.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/browserfactory.rb +12 -5
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f8319fc7f70cf5e5f63e26f627b76cbbbbe1dbad
4
- data.tar.gz: c53b548d25ba886538d27ca12ede9a1e702632ce
3
+ metadata.gz: be8057b06c9a41b1cd8da4865b2bddf03183504d
4
+ data.tar.gz: 78540ec7c5f6fc96e533db3fc945017713f0907d
5
5
  SHA512:
6
- metadata.gz: 429f46cba2b83403c0ceca9c0cdbf2bee8a09f06c81d3700d1cb8196827793b0751f9b822c15ad175ee9e8b689c83cabee159054fba449c70aa42a997e4d2fed
7
- data.tar.gz: e482d3e54791885e664b908037d0cd7b27dffead2fcd70e08be77587b9c9436a05802d16bb73f53d2b0fe303cf30eaa11fe42a9bd3f8ff05bc4461bff485aeb3
6
+ metadata.gz: 8770b01b07d77366c6724c9d34ad193d0241a23de1e20f42ad1ef6fa07ca594ffd0604fe9fdf6724d60a99dd013709c4b61ab7f2d6a05060a78228f9bb30459f
7
+ data.tar.gz: 4d5585456eecda4c299bdfc23b5758737541e7987cc5d5193c7e4a2592cbb48abf131b6678c33cbd91bf6c8555392a210b1022e4cc1ec19aaa71a42628a57ced
@@ -397,11 +397,18 @@ module BlackStack
397
397
  rescue
398
398
  # nothing here
399
399
  end
400
- url = "http://127.0.0.1:#{BlackStack::StealthBrowserAutomation::Multilogin::mla_local_port}/api/v1/profile/stop?profileId=#{@@profile_name}"
401
- uri = URI.parse(url)
402
- body = Net::HTTP.get(uri)
403
- res = JSON.parse(body)
404
- raise 'Error requesting to close Mimic' if res['status'].to_s != 'OK'
400
+ i = 0
401
+ max = 3
402
+ success = false
403
+ while i<max && !success
404
+ i+=1
405
+ url = "http://127.0.0.1:#{BlackStack::StealthBrowserAutomation::Multilogin::mla_local_port}/api/v1/profile/stop?profileId=#{@@profile_name}"
406
+ uri = URI.parse(url)
407
+ body = Net::HTTP.get(uri)
408
+ res = JSON.parse(body)
409
+ success = true if res['status'].to_s == 'OK'
410
+ end # while i<max
411
+ raise 'Error requesting Mimic to stop (tried #{i.to_s} times)' if !success
405
412
  end
406
413
  # reseteo las variables
407
414
  @@browser = nil
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stealth_browser_automation
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.6
4
+ version: 1.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Leandro Daniel Sardi