Skip to content

Commit 1e68535

Browse files
committed
Use forked Ferrum library until upstream accepts our patches
We need to expose the mobile setting in the Ferrum API as well. Until that's merged, use a fork of Ferrum that exposes it.
1 parent 4fa8126 commit 1e68535

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

Gemfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ source "https://rubygems.org"
44

55
gem "byebug", "~> 11.1", platforms: %i[mri mingw x64_mingw]
66
gem "chunky_png", "~> 1.4"
7+
gem "ferrum", github: "radiopaedia/ferrum", branch: "94-expose-mobile"
78
gem "image_size", "~> 3.0"
89
gem "launchy", "~> 2.5"
910
gem "pdf-reader", "~> 2.12"

cuprite.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,5 @@ Gem::Specification.new do |s|
2525
s.required_ruby_version = ">= 2.7.0"
2626

2727
s.add_dependency "capybara", "~> 3.0"
28-
s.add_dependency "ferrum", "~> 0.16.0"
28+
#s.add_dependency "ferrum", "~> 0.16.0"
2929
end

lib/capybara/cuprite/page.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ def prepare_page
144144
super
145145

146146
width, height = @options.window_size
147-
resize(width: width, height: height)
147+
resize(width: width, height: height, mobile: @options.mobile)
148148

149149
if @options.url_blacklist.any?
150150
network.blacklist = @options.url_blacklist

0 commit comments

Comments
 (0)