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 +4 -4
- data/lib/watchdoge/configuration.rb +3 -0
- data/lib/watchdoge/version.rb +1 -1
- data/lib/watchdoge/worker.rb +4 -2
- data/watchdoge.gemspec +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: fb82d4889e328658e1e5524ed541aa9f47ba91dd9b5cff6a52cecfbdabf6bd85
|
|
4
|
+
data.tar.gz: 82539f1163f15f512ba0973b914b970f539d3c17b145930dc9ecf4ba697569ea
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
data/lib/watchdoge/version.rb
CHANGED
data/lib/watchdoge/worker.rb
CHANGED
|
@@ -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