watchdoge 0.0.15 → 0.0.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 71e9541984abacd3fd2c70cd0bd5d9fd657bf04dd599474d335f96da29eaa510
4
- data.tar.gz: f21073b8a3723f3da851576b4d597f6662e3535384d13c39a5e3a64a44991060
3
+ metadata.gz: fb82d4889e328658e1e5524ed541aa9f47ba91dd9b5cff6a52cecfbdabf6bd85
4
+ data.tar.gz: 82539f1163f15f512ba0973b914b970f539d3c17b145930dc9ecf4ba697569ea
5
5
  SHA512:
6
- metadata.gz: b0c9072c8a1e181f8d1f2460f6e94616ba8b7518808a86a72eeb92ab477c733f4d5bdabd293c6e1b419a787ac5708dbbb53ffcb40d6b16facc9ea23013756969
7
- data.tar.gz: 9f1cb7e45e1061bd344c1caf0e76db8d639e1d627216153c48e617f2ffa0b14098750731414be3b180b0e08aa13f319bfd4e9689a6134528cab1b6dec882900f
6
+ metadata.gz: 62e5e050843d264005883275be97ab81d303f68ea4a3078ae33952eab4272a3df8988736a6658c9a7dde283331c02b3aab8bd975cbe352d6d2a96b94a26fc506
7
+ data.tar.gz: 1bb5c0879096b213bb4eba0430eaa3f634ced37f8cecb18d5ecbc11ae346ec737af2c810203444cd9f6040a9a192480de07f9e7fe1899fcc6eb262cf090ddab2
@@ -8,6 +8,7 @@ module WatchDoge
8
8
  attr_accessor :engine
9
9
  attr_accessor :browser
10
10
  attr_accessor :cookie_pool
11
+ attr_accessor :http_timeout
11
12
 
12
13
  attr_accessor :notifications
13
14
 
@@ -30,6 +31,8 @@ module WatchDoge
30
31
  # cuurently using local fs, probably support NoSQL also maybe?
31
32
  @cookie_pool = @base_dir + '/.doge_cookie'
32
33
 
34
+ @http_timeout = 120
35
+
33
36
  @notifications = {
34
37
  # slack: {
35
38
  # incoming_url: SLACK_WEBHOOK
@@ -1,3 +1,3 @@
1
1
  module WatchDoge
2
- Version = '0.0.15'
2
+ Version = '0.0.16'
3
3
  end
@@ -2,14 +2,15 @@ module WatchDoge
2
2
  class Worker
3
3
  def initialize uuid, opt={}
4
4
  _before_initialize
5
-
5
+ @http.timeout = opt.delete(:timeout) || WatchDoge.configuration.http_timeout
6
6
  @uuid = uuid
7
7
 
8
8
  default_opt = {
9
9
  width: 1280,
10
10
  height: 768,
11
11
  headless: true,
12
- browser: WatchDoge.configuration.browser
12
+ browser: WatchDoge.configuration.browser,
13
+ http_client: @http
13
14
  }.merge(opt)
14
15
  @core = WatchDoge.configuration.engine.new default_opt[:browser], default_opt
15
16
 
@@ -84,6 +85,7 @@ module WatchDoge
84
85
  def _before_initialize
85
86
  Selenium::WebDriver::Firefox::Service.driver_path = WatchDoge.configuration.web_drivers_dir + "/geckodriver"
86
87
  Selenium::WebDriver::Chrome::Service.driver_path = WatchDoge.configuration.web_drivers_dir + "/chromedriver"
88
+ @http = Selenium::WebDriver::Remote::Http::Default.new
87
89
  end
88
90
  def _after_initialize
89
91
  end
data/watchdoge.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'watchdoge'
3
- s.version = '0.0.15'
3
+ s.version = '0.0.16'
4
4
  s.date = '2019-07-22'
5
5
  s.summary = "dogi"
6
6
  s.description = "A collection of web test tools"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: watchdoge
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.15
4
+ version: 0.0.16
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shen Lee