From f66367ea7fd110c7b0f310c7d0503146b046006d Mon Sep 17 00:00:00 2001 From: Daniel Leidert Date: Sun, 26 Apr 2020 01:30:52 +0200 Subject: [PATCH 1/3] Use platforms instead of install_if https://lists.debian.org/debian-ruby/2020/04/msg00062.html fixes #8139 --- lib/jekyll/commands/new.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/jekyll/commands/new.rb b/lib/jekyll/commands/new.rb index b8539b105bf..4623ddafba4 100644 --- a/lib/jekyll/commands/new.rb +++ b/lib/jekyll/commands/new.rb @@ -91,13 +91,13 @@ def gemfile_contents # Windows and JRuby does not include zoneinfo files, so bundle the tzinfo-data gem # and associated library. - install_if -> { RUBY_PLATFORM =~ %r!mingw|mswin|java! } do + platforms :mingw, :x64_mingw, :mswin, :jruby do gem "tzinfo", "~> 1.2" gem "tzinfo-data" end # Performance-booster for watching directories on Windows - gem "wdm", "~> 0.1.1", :install_if => Gem.win_platform? + gem "wdm", "~> 0.1.1", :platforms => [:mingw, :x64_mingw, :mswin] RUBY end From 7d7653fc3e5d90ed34a176823e4c734cf835610c Mon Sep 17 00:00:00 2001 From: Daniel Leidert Date: Sun, 26 Apr 2020 21:58:06 +0200 Subject: [PATCH 2/3] Also replace install_if in Gemfile .. as requested by @ashmaroli in https://github.com/jekyll/jekyll/pull/8140#issuecomment-619488998 --- Gemfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile b/Gemfile index f78dd52e615..2e7e16d08c3 100644 --- a/Gemfile +++ b/Gemfile @@ -82,7 +82,7 @@ group :jekyll_optional_dependencies do # Windows and JRuby does not include zoneinfo files, so bundle the tzinfo-data gem # and associated library - install_if -> { RUBY_PLATFORM =~ %r!mingw|mswin|java! } do + platform :jruby, :mswin, :mingw, :x64_mingw do gem "tzinfo", "~> 1.2" gem "tzinfo-data" end From 74d80a7575fdb351a64f4a0202aa63a45938553d Mon Sep 17 00:00:00 2001 From: Daniel Leidert Date: Sun, 26 Apr 2020 23:24:01 +0200 Subject: [PATCH 3/3] Use platforms instead of platform although both seem accepted --- Gemfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile b/Gemfile index 2e7e16d08c3..f0611ea28ab 100644 --- a/Gemfile +++ b/Gemfile @@ -74,7 +74,7 @@ group :jekyll_optional_dependencies do gem "rdoc", "~> 6.0" gem "tomlrb", "~> 1.2" - platform :ruby, :mswin, :mingw, :x64_mingw do + platforms :ruby, :mswin, :mingw, :x64_mingw do gem "classifier-reborn", "~> 2.2" gem "liquid-c", "~> 4.0" gem "yajl-ruby", "~> 1.4" @@ -82,7 +82,7 @@ group :jekyll_optional_dependencies do # Windows and JRuby does not include zoneinfo files, so bundle the tzinfo-data gem # and associated library - platform :jruby, :mswin, :mingw, :x64_mingw do + platforms :jruby, :mswin, :mingw, :x64_mingw do gem "tzinfo", "~> 1.2" gem "tzinfo-data" end