Skip to content

Commit c1c21f0

Browse files
author
Juanito Fatas
committed
Use correct Nokogiri versions for different Ruby versions
1 parent 7d30b71 commit c1c21f0

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

Gemfile

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,15 @@ source 'https://rubygems.org'
33
# Specify your gem's dependencies in html-sanitizer.gemspec
44
gemspec
55

6-
gem "nokogiri", RUBY_VERSION < "2.1" ? "~> 1.6.0" : ">= 1.7"
6+
nokogiri_version = case
7+
when RUBY_VERSION < "2.1"
8+
"~> 1.6.0"
9+
when RUBY_VERSION < "2.3"
10+
"~> 1.9.1"
11+
else
12+
">= 1.10.0"
13+
end
14+
end
15+
16+
gem "nokogiri", nokogiri_version
717
gem "activesupport", RUBY_VERSION < "2.2.2" ? "~> 4.2.0" : ">= 5"

0 commit comments

Comments
 (0)