watchdoge 0.0.19 → 0.0.20

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: 398c14865e7fef97f94eff50002f7de2623878eb022aedb31d16ff5995a2aaa3
4
- data.tar.gz: 7e6c5d44a7f720dc2825c7484bd194fc2382816423c0ecf77aa44621d89a3f54
3
+ metadata.gz: 323a2a000a062371819b18b2511b17a2cad737ce0cdf1a98c383bd1395df0532
4
+ data.tar.gz: ac47c7fbee5445d73bc655b7de93f56a6c57d77cd459feec9ed0412708f02af6
5
5
  SHA512:
6
- metadata.gz: c40e84bba42b2fd4be21b64576bf97d0cff5d9451447a49fe8deadf8c4eeaf21f867d6057cb87842ef8edb4e4fa9783eaed7cf3079d12f2c61c399bf663c953e
7
- data.tar.gz: 9779a8aa2a0d0de5e96b7a34c5c3f931be3d13cbff206d52d34802492be28e6e88c76feae7ca635ad5ad062c3358b1d79a67ed829bc2822831835be5e8aefc53
6
+ metadata.gz: 4917cf13e6a7fe40b332bd354e6925398b34d983aa833279b27298458472ed877a809b7e60421df5011bc60dd2030409e3822084292ebf1bdbbcbf5575a52878
7
+ data.tar.gz: 5c66ce62a0a1d6a9e53f4235eddb776f72c38bd7554427c85138f6811e3f913c5ce88a73784ea0d7269f9e830505767da8e51c7671b1999c58c73b88d066b4b7
@@ -1,3 +1,3 @@
1
1
  module WatchDoge
2
- Version = '0.0.19'
2
+ Version = '0.0.20'
3
3
  end
@@ -9,10 +9,12 @@ module WatchDoge
9
9
  width: 1280,
10
10
  height: 768,
11
11
  headless: true,
12
- browser: WatchDoge.configuration.browser,
13
12
  http_client: @http
14
13
  }.merge(opt)
15
- @core = WatchDoge.configuration.engine.new default_opt[:browser], default_opt
14
+
15
+ default_opt.merge _browser_config
16
+
17
+ @core = WatchDoge.configuration.engine.new @browser, default_opt
16
18
 
17
19
  # for generate uri hash
18
20
  @landed_page = nil
@@ -86,7 +88,28 @@ module WatchDoge
86
88
  Selenium::WebDriver::Firefox::Service.driver_path = WatchDoge.configuration.web_drivers_dir + "/geckodriver"
87
89
  Selenium::WebDriver::Chrome::Service.driver_path = WatchDoge.configuration.web_drivers_dir + "/chromedriver"
88
90
  @http = Selenium::WebDriver::Remote::Http::Default.new
91
+ @browser = WatchDoge.configuration.browser
92
+ end
93
+
94
+ def _browser_config
95
+ case @browser
96
+ when :chrome
97
+ prefs = {}
98
+
99
+ {
100
+ options: {
101
+ prefs: prefs
102
+ }
103
+ }
104
+ when :firefox
105
+ profile = Selenium::WebDriver::Firefox::Profile.new
106
+ profile['security.sandbox.content.level'] = 2
107
+ {
108
+ profile: profile
109
+ }
110
+ end
89
111
  end
112
+
90
113
  def _after_initialize
91
114
  end
92
115
 
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.19'
3
+ s.version = '0.0.20'
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.19
4
+ version: 0.0.20
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shen Lee