waterpig 0.9.3 → 0.10.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3a9c11834b4217885829979fea038543cd198083
4
- data.tar.gz: eef4f7e90c5db5a7e14539f463b33054522b955a
3
+ metadata.gz: eb779cc2309d3228baf9a7c5da66dce346eaab60
4
+ data.tar.gz: 7aa701eb92b5df140f6ebe349e6867903f84c3dc
5
5
  SHA512:
6
- metadata.gz: e34939aa6c2b4764947689c71305af995f344352db8034e0b9f646ddd7d53682bacfa073fe55dff0c8679c820f609579d269cdef11330885a1cdb5587454c18e
7
- data.tar.gz: 2706da25526fb916a4da589761954d58a39243fbac818583b65971e0a4cefd75e17a81d5ea776ca3af64fdf778e79ef8eeb47e9545bb94bd6a95018920354276
6
+ metadata.gz: b797094918a03deb2b41e292b82439a90589cba8eb0a52f08fac66f1e87b2ec6054f961c9a2ca92e8f29391d115abaa207aca0b719b4d0cc7d2faa497707b9f3
7
+ data.tar.gz: 03222551e49a35ff05c35e26d0ab55395c4e5bdc63797cd7ac1d1b9b4af5b4aca5fa10fa81893389740fdcf683cb823842ff7e1933980f45e9170f53a5aaa6ce
@@ -22,7 +22,8 @@ module Waterpig
22
22
  if width < MIN_WIDTH
23
23
  unless @@warned_about_size
24
24
  warn "Requested browser size #{size.inspect} - but minimum width is #{MIN_WIDTH}. Adjusting."
25
- warn "You might consider setting up mobile browser emulation. (details forthcoming)"
25
+ warn "You might consider setting up mobile browser emulation. Try running with"
26
+ warn "CAPYBARA_DRIVER=mobile_chrome_android CAPYBARA_JS_DRIVER=mobile_chrome_android"
26
27
  @@warned_about_size = true
27
28
  end
28
29
  width = MIN_WIDTH
@@ -4,5 +4,17 @@ begin
4
4
  Capybara::Selenium::Driver.new(app, :browser => :chrome)
5
5
  end
6
6
 
7
+ Capybara.register_driver :mobile_chrome_ios do |app|
8
+ mobile_emulation = { "deviceName" => "Apple iPhone 6" }
9
+ capabilities = Selenium::WebDriver::Remote::Capabilities.chrome('chromeOptions' => {'mobileEmulation' => mobile_emulation})
10
+ Capybara::Selenium::Driver.new(app, :browser => :chrome, :desired_capabilities => capabilities)
11
+ end
12
+
13
+ Capybara.register_driver :mobile_chrome_android do |app|
14
+ mobile_emulation = { "deviceName" => "Samsung Galaxy S4" }
15
+ capabilities = Selenium::WebDriver::Remote::Capabilities.chrome('chromeOptions' => {'mobileEmulation' => mobile_emulation})
16
+ Capybara::Selenium::Driver.new(app, :browser => :chrome, :desired_capabilities => capabilities)
17
+ end
18
+
7
19
  rescue LoadError
8
20
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: waterpig
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.3
4
+ version: 0.10.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Judson Lester
@@ -106,7 +106,7 @@ rdoc_options:
106
106
  - --main
107
107
  - doc/README
108
108
  - --title
109
- - waterpig-0.9.3 Documentation
109
+ - waterpig-0.10.0 Documentation
110
110
  require_paths:
111
111
  - lib/
112
112
  required_ruby_version: !ruby/object:Gem::Requirement