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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8b3cc6b1bdd137753680d4adaae8a68a8b82e764f8cd19e1e148b743047ce709
4
- data.tar.gz: 7622c4043fa2d587551d953ee59ee4333fc089aca9fd404c23a083045f87514d
3
+ metadata.gz: 923fe9c7ef4eaac734b6e8467da827d864905d76ac3fec4ba5547913e0249798
4
+ data.tar.gz: 6f279fa98e09d546a57f68482ca391ee83ef4178d07b0440099cb3c58f709d79
5
5
  SHA512:
6
- metadata.gz: 39738d5473cd7ebee83ba42da07ce910db95275660d41d1e892c0b96ddac3b0e1db855f73279556c4abe8084afbe639af465f2bcca3f3224427ea03a20029a25
7
- data.tar.gz: 80de5041df43743bfc132903ca0f2e759702be40a34ac78701c8e977428ba767fc0419391b2665f9ac1088e686465088877d83f3b645061804acee4004e66982
6
+ metadata.gz: 141010d9e2392434651ad2e8c4b8bcdc30dbb476439bc807dfc5324f756a288b884fbe4c982d5fa8934893e0d9c3468e5a19394edc3295c67fa0c6bfd6edf0da
7
+ data.tar.gz: dc99d00ff39f520765770a342110bac34e9d267347d6087b794931aeaf0118c5011b241c33788eb85491e9ccc55b79540085a25a840d166db5afccc49cc015c4
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- browsed (0.1.6)
4
+ browsed (0.1.7)
5
5
  agents
6
6
  capybara (~> 3.4, >= 3.4.1)
7
7
  poltergeist (~> 1.18, >= 1.18.1)
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(driver: driver, browser: browser, device: :desktop, environment: :development, resolution: [1366,768])
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
 
@@ -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?('randomize')
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?('randomize')) || poltergeist?
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)
@@ -1,3 +1,3 @@
1
1
  module Browsed
2
- VERSION = "0.1.6"
2
+ VERSION = "0.1.7"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: browsed
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sebastian