browsed 0.1.6 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/bin/browse +8 -1
- data/lib/browsed/client.rb +2 -2
- data/lib/browsed/version.rb +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: 923fe9c7ef4eaac734b6e8467da827d864905d76ac3fec4ba5547913e0249798
|
4
|
+
data.tar.gz: 6f279fa98e09d546a57f68482ca391ee83ef4178d07b0440099cb3c58f709d79
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 141010d9e2392434651ad2e8c4b8bcdc30dbb476439bc807dfc5324f756a288b884fbe4c982d5fa8934893e0d9c3468e5a19394edc3295c67fa0c6bfd6edf0da
|
7
|
+
data.tar.gz: dc99d00ff39f520765770a342110bac34e9d267347d6087b794931aeaf0118c5011b241c33788eb85491e9ccc55b79540085a25a840d166db5afccc49cc015c4
|
data/Gemfile.lock
CHANGED
data/bin/browse
CHANGED
@@ -10,7 +10,14 @@ browser = :firefox
|
|
10
10
|
url = "https://whatismyipaddress.com"
|
11
11
|
path = File.expand_path("../../files/#{Time.now.to_i}.png", __FILE__)
|
12
12
|
|
13
|
-
client = Browsed::Client.new(
|
13
|
+
client = Browsed::Client.new(
|
14
|
+
driver: driver,
|
15
|
+
browser: browser,
|
16
|
+
device: :desktop,
|
17
|
+
environment: :development,
|
18
|
+
user_agent: :randomize,
|
19
|
+
resolution: [1366,768]
|
20
|
+
)
|
14
21
|
|
15
22
|
client.resize! # Set resolution
|
16
23
|
|
data/lib/browsed/client.rb
CHANGED
@@ -125,9 +125,9 @@ module Browsed
|
|
125
125
|
|
126
126
|
# User Agents
|
127
127
|
def set_user_agent(user_agent)
|
128
|
-
if !user_agent.to_s.empty? && !user_agent.eql?(
|
128
|
+
if !user_agent.to_s.empty? && !user_agent.to_sym.eql?(:randomize)
|
129
129
|
self.user_agent = user_agent
|
130
|
-
elsif (!user_agent.to_s.empty? && user_agent.eql?(
|
130
|
+
elsif (!user_agent.to_s.empty? && user_agent.to_sym.eql?(:randomize)) || poltergeist?
|
131
131
|
case self.device
|
132
132
|
when :iphone
|
133
133
|
self.user_agent = Agents.random_user_agent(:phones, :iphone)
|
data/lib/browsed/version.rb
CHANGED