scrap_kit 0.1.10 → 0.1.11

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: 28049015b73f5b5508d952f54fd9d5a326e3377043be78776ad925e963161ffa
4
- data.tar.gz: ebf4112f8a71bc4fe6ba98d6bc02a417f3cd1269a493f59657164945747363d2
3
+ metadata.gz: 36f370f43360cdc2725cbb83591738dc46c5949cb995039f45cf1ddaccd091a4
4
+ data.tar.gz: b904bef830b3e5cd88892677eed3f0cf97635e2d46277cc69280ca5ee7b6a0a3
5
5
  SHA512:
6
- metadata.gz: 50bbf6756482a1d3a94ea5994efa9921049405bfd3d5486ab854d0478adaa0d4c7e891e645ee9c9d774398cacacb26a6814b34efdf858be6ab14a7765da2c9b2
7
- data.tar.gz: 8457382de09844d4fc469c4045e1e916335a1b3152bfd3b5bd0b0c464b590bc306d1fa7f8d66e0c3c40abe490d0b35aed2659223a6fcb0d81ec9c2efa94498d9
6
+ metadata.gz: e0c1321ef88bf5be53603e41e0826676d9bc50bb741b4d45d8cc79ff42bc6e0360d989c3deb097d8c784b9c795495898a39cf7ff4a41f36c62f57d0f030a8915
7
+ data.tar.gz: b668a193cf260b94239d1d1e016e9eb4b2d8e3de43aaf604d6d9fb255b5147295e2079e5da7b3b3dbb6177ea45ac413ce73467f11ba73d0f2495fa91b3196af4
@@ -1,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.1.11] 2020-09-03
4
+
5
+ ### Changed/Added
6
+ - Add `user_agent` accessor for browser
7
+
3
8
  ## [0.1.10] 2020-09-03
4
9
 
5
10
  ### Changed/Added
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- scrap_kit (0.1.10)
4
+ scrap_kit (0.1.11)
5
5
  activesupport (~> 6.0)
6
6
  watir (~> 6.16.5)
7
7
  webdrivers (~> 4.0)
@@ -4,6 +4,8 @@ require "watir"
4
4
 
5
5
  module ScrapKit
6
6
  class Recipe
7
+ attr_accessor :user_agent
8
+
7
9
  class << self
8
10
  def load(source)
9
11
  input = if source.is_a?(Hash)
@@ -201,6 +203,7 @@ module ScrapKit
201
203
  options.add_argument "--headless"
202
204
  options.add_argument "--window-size=1080x720"
203
205
  options.add_argument "--hide-scrollbars"
206
+ options.add_argument "--user-agent=#{@user_agent}" if @user_agent
204
207
 
205
208
  if chrome_bin = ENV["GOOGLE_CHROME_SHIM"]
206
209
  options.add_argument "--no-sandbox"
@@ -1,3 +1,3 @@
1
1
  module ScrapKit
2
- VERSION = "0.1.10"
2
+ VERSION = "0.1.11"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scrap_kit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.10
4
+ version: 0.1.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gustavo Leon