browsed 0.1.9 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1ac593ddda39f90bf445f8e858cd4a05a3b08cf997f33b1ee448f9791127148c
4
- data.tar.gz: e79c1d0d006db49e81b872706868ca00d5ddc087b52738e19a863df33c598cf3
3
+ metadata.gz: 6d36d1bfa590a1edc3ce949a6138b1dc0191c889c6f5194aee4e40ef61d1f1e0
4
+ data.tar.gz: e6b480c46b0e1c2a8b0f92b5a983a7a2a3763b7d7cecb6b5d06427f755012727
5
5
  SHA512:
6
- metadata.gz: 7bc94644afe6938c6df5ce3e3ad53a7c99b93acc52334fab62a1a03c0913551071a07aa3525ff400d97180bc508ac7cbdff645ca2c9e41ff66ba0913769240aa
7
- data.tar.gz: 80db44c4e2bae419e34e5aba0c28d597a55d1204ce3d2c0cce1fbda40204bfd959fb0180e4b8b74a6284a4f5bd2fcad2d5536c7f24405018a6c5229e2f3c1dde
6
+ metadata.gz: 8bbf86f64ac1ddd7a4fe0f61dda213c81f515e6308196f0872db07232cb144ad6d76935bdd1f74f4a13c88b340f7635a9cfbff6b12afab69016dab906c5adf60
7
+ data.tar.gz: 13d870575253ed835f18d356d48c69bd2f303988739a60ff3bd4ad315bd73d9f9d3ce90cf8345e33113fadcc09d954780ed1bbca9f5cc468dea3e53b5b802f75
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- browsed (0.1.9)
4
+ browsed (0.2.0)
5
5
  agents
6
6
  capybara (~> 3.4, >= 3.4.1)
7
7
  poltergeist (~> 1.18, >= 1.18.1)
@@ -13,7 +13,7 @@ GEM
13
13
  addressable (2.5.2)
14
14
  public_suffix (>= 2.0.2, < 4.0)
15
15
  agents (0.1.2)
16
- capybara (3.6.0)
16
+ capybara (3.9.0)
17
17
  addressable
18
18
  mini_mime (>= 0.1.3)
19
19
  nokogiri (~> 1.8)
@@ -31,7 +31,7 @@ GEM
31
31
  method_source (0.9.0)
32
32
  mini_mime (1.0.1)
33
33
  mini_portile2 (2.3.0)
34
- nokogiri (1.8.4)
34
+ nokogiri (1.8.5)
35
35
  mini_portile2 (~> 2.3.0)
36
36
  poltergeist (1.18.1)
37
37
  capybara (>= 2.1, < 4)
@@ -51,17 +51,17 @@ GEM
51
51
  rspec-mocks (~> 3.8.0)
52
52
  rspec-core (3.8.0)
53
53
  rspec-support (~> 3.8.0)
54
- rspec-expectations (3.8.1)
54
+ rspec-expectations (3.8.2)
55
55
  diff-lcs (>= 1.2.0, < 2.0)
56
56
  rspec-support (~> 3.8.0)
57
57
  rspec-mocks (3.8.0)
58
58
  diff-lcs (>= 1.2.0, < 2.0)
59
59
  rspec-support (~> 3.8.0)
60
60
  rspec-support (3.8.0)
61
- rubyzip (1.2.1)
62
- selenium-webdriver (3.14.0)
61
+ rubyzip (1.2.2)
62
+ selenium-webdriver (3.14.1)
63
63
  childprocess (~> 0.5)
64
- rubyzip (~> 1.2)
64
+ rubyzip (~> 1.2, >= 1.2.2)
65
65
  websocket-driver (0.7.0)
66
66
  websocket-extensions (>= 0.1.0)
67
67
  websocket-extensions (0.1.3)
@@ -44,6 +44,8 @@ module Browsed
44
44
  include ::Browsed::Chrome
45
45
 
46
46
  def setup_capybara(options: {}, retries: 3)
47
+ self.manager.kill_stale_processes!
48
+
47
49
  if can_start_new_process?
48
50
  register_driver!(options)
49
51
 
@@ -44,6 +44,10 @@ module Browsed
44
44
  return processes
45
45
  end
46
46
 
47
+ def kill_stale_processes!
48
+ kill_processes!(started_after: ::Browsed.configuration.processes_max_ttl)
49
+ end
50
+
47
51
  def kill_processes!(started_after: nil)
48
52
  processes = get_current_processes
49
53
 
@@ -1,3 +1,3 @@
1
1
  module Browsed
2
- VERSION = "0.1.9"
2
+ VERSION = "0.2.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: browsed
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.9
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sebastian