[gentoo-commits] repo/gentoo:master commit in: www-apps/jekyll/files/, www-apps/jekyll/

2023-06-23 Thread Sam James
commit: 033af146ba3540ce45ffb4fc60b08affa9ed764d
Author: Sam James  gentoo  org>
AuthorDate: Fri Jun 23 08:36:58 2023 +
Commit: Sam James  gentoo  org>
CommitDate: Fri Jun 23 08:51:08 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=033af146

www-apps/jekyll: enable ruby31

Signed-off-by: Sam James  gentoo.org>

 .../jekyll/files/jekyll-4.3.2-no-safe_yaml.patch   | 405 +
 www-apps/jekyll/jekyll-4.3.2-r1.ebuild | 105 ++
 2 files changed, 510 insertions(+)

diff --git a/www-apps/jekyll/files/jekyll-4.3.2-no-safe_yaml.patch 
b/www-apps/jekyll/files/jekyll-4.3.2-no-safe_yaml.patch
new file mode 100644
index ..d16b28076816
--- /dev/null
+++ b/www-apps/jekyll/files/jekyll-4.3.2-no-safe_yaml.patch
@@ -0,0 +1,405 @@
+From 
https://sources.debian.org/patches/jekyll/4.3.1%2Bdfsg-2/0016-Drop-usage-of-safe_yaml.patch/
+(added Symbol to allowed classes for jekyll-sass-converter)
+
+From: Antonio Terceiro 
+Date: Sat, 21 Jan 2023 23:25:30 -0300
+Subject: Drop usage of safe_yaml
+
+Squashed commit of the following:
+
+commit 9e8b06e55afab8da1bb134a9f5362f403c82f05b
+Author: f 
+Date:   Sat Aug 21 14:27:31 2021 -0300
+
+Move YAML loading into Utils
+
+commit a91a88119e4b77fff26812384970bbb0b7f1be31
+Author: f 
+Date:   Thu Aug 19 14:45:39 2021 -0300
+
+Support older Psych versions
+
+commit b0526242dff12fa4e95ddc0b67efdb73144fb517
+Author: f...@sutty.nl 
+Date:   Thu Aug 19 13:42:39 2021 -0300
+
+Use Psych as YAML parser
+
+Source: https://github.com/jekyll/jekyll/pull/8772
+Additional changes:
+  - Also make the replacement of SafeYAML in lib/jekyll/commands/serve.rb
+--- a/features/step_definitions.rb
 b/features/step_definitions.rb
+@@ -159,7 +159,7 @@ end
+ Given(%r!^I have a configuration file with "(.*)" set to "(.*)"$!) do |key, 
value|
+   config = \
+ if source_dir.join("_config.yml").exist?
+-  SafeYAML.load_file(source_dir.join("_config.yml"))
++  Jekyll::Utils.safe_load_yaml_file(source_dir.join("_config.yml"))
+ else
+   {}
+ end
+--- a/jekyll.gemspec
 b/jekyll.gemspec
+@@ -44,7 +44,6 @@ Gem::Specification.new do |s|
+   s.add_runtime_dependency("mercenary", ">= 0.3.6", "< 0.5")
+   s.add_runtime_dependency("pathutil",  "~> 0.9")
+   s.add_runtime_dependency("rouge", ">= 3.0", "< 5.0")
+-  s.add_runtime_dependency("safe_yaml", "~> 1.0")
+   s.add_runtime_dependency("terminal-table",">= 1.8", "< 4.0")
+   s.add_runtime_dependency("webrick",   "~> 1.7")
+ end
+--- a/lib/jekyll.rb
 b/lib/jekyll.rb
+@@ -27,18 +27,16 @@ require "logger"
+ require "set"
+ require "csv"
+ require "json"
++require "psych"
+ 
+ # 3rd party
+ require "pathutil"
+ require "addressable/uri"
+-require "safe_yaml/load"
+ require "liquid"
+ require "kramdown"
+ require "colorator"
+ require "i18n"
+ 
+-SafeYAML::OPTIONS[:suppress_warnings] = true
+-
+ module Jekyll
+   # internal requires
+   autoload :Cleaner, "jekyll/cleaner"
+--- a/lib/jekyll/commands/serve.rb
 b/lib/jekyll/commands/serve.rb
+@@ -355,7 +355,7 @@ module Jekyll
+ end
+ 
+ def mime_types_charset
+-  
SafeYAML.load_file(File.expand_path("serve/mime_types_charset.json", __dir__))
++  
Jekyll::Utils.safe_load_yaml_file(File.expand_path("serve/mime_types_charset.json",
 __dir__))
+ end
+ 
+ def read_file(source_dir, file_path)
+--- a/lib/jekyll/configuration.rb
 b/lib/jekyll/configuration.rb
+@@ -126,7 +126,7 @@ module Jekyll
+ Jekyll::External.require_with_graceful_fail("tomlrb") unless 
defined?(Tomlrb)
+ Tomlrb.load_file(filename)
+   when %r!\.ya?ml!i
+-SafeYAML.load_file(filename) || {}
++Jekyll::Utils.safe_load_yaml_file(filename) || {}
+   else
+ raise ArgumentError,
+   "No parser for '#{filename}' is available. Use a .y(a)ml or 
.toml file instead."
+--- a/lib/jekyll/convertible.rb
 b/lib/jekyll/convertible.rb
+@@ -42,7 +42,7 @@ module Jekyll
+ self.content = File.read(filename, 
**Utils.merged_file_read_opts(site, opts))
+ if content =~ Document::YAML_FRONT_MATTER_REGEXP
+   self.content = Regexp.last_match.post_match
+-  self.data = SafeYAML.load(Regexp.last_match(1))
++  self.data = Jekyll::Utils.safe_load_yaml(Regexp.last_match(1))
+ end
+   rescue Psych::SyntaxError => e
+ Jekyll.logger.warn "YAML Exception reading #{filename}: #{e.message}"
+--- a/lib/jekyll/document.rb
 b/lib/jekyll/document.rb
+@@ -300,7 +300,7 @@ module Jekyll
+   Jekyll.logger.debug "Reading:", relative_path
+ 
+   if yaml_file?
+-@data = SafeYAML.load_file(path)
++@data = Jekyll::Utils.safe_load_yaml_file(path, :read_opts => 
site.file_read_opts)
+   else
+ begin
+   merge_defaults
+@@ -483,7 +483,7 @@ module Jekyll
+   self.content = File.read(

[gentoo-commits] repo/gentoo:master commit in: www-apps/jekyll/files/

2023-04-05 Thread Hans de Graaff
commit: 839f87a21cf80bf70d72fcfe75b8afec70e29072
Author: Hans de Graaff  gentoo  org>
AuthorDate: Wed Apr  5 15:00:05 2023 +
Commit: Hans de Graaff  gentoo  org>
CommitDate: Wed Apr  5 15:00:43 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=839f87a2

www-apps/jekyll: add missing patch

Closes: https://bugs.gentoo.org/903871
Signed-off-by: Hans de Graaff  gentoo.org>

 www-apps/jekyll/files/jekyll-4.3.2-sass.patch | 100 ++
 1 file changed, 100 insertions(+)

diff --git a/www-apps/jekyll/files/jekyll-4.3.2-sass.patch 
b/www-apps/jekyll/files/jekyll-4.3.2-sass.patch
new file mode 100644
index ..3529ba4dbf3a
--- /dev/null
+++ b/www-apps/jekyll/files/jekyll-4.3.2-sass.patch
@@ -0,0 +1,100 @@
+From 572c86ec130f62722332f85051a8eef5f15deb7b Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?=E3=81=AA=E3=81=A4=E3=81=8D?= 
+Date: Thu, 22 Dec 2022 06:51:02 -0800
+Subject: [PATCH] Update sass related tests for jekyll-sass-converter 3.x
+ (#9223)
+
+Merge pull request 9223
+---
+ features/rendering.feature   | 2 +-
+ features/theme.feature   | 4 ++--
+ test/test_filters.rb | 4 ++--
+ test/test_sass.rb| 4 +++-
+ test/test_theme_assets_reader.rb | 2 +-
+ 5 files changed, 9 insertions(+), 7 deletions(-)
+
+diff --git a/features/rendering.feature b/features/rendering.feature
+index 2b504a07555..c06e06524f5 100644
+--- a/features/rendering.feature
 b/features/rendering.feature
+@@ -168,7 +168,7 @@ Feature: Rendering
+ When I run jekyll build
+ Then I should get a zero exit status
+ And the _site directory should exist
+-And I should see ".foo-bar { color: red; }\n\n\/\*# 
sourceMappingURL=index.css.map \*\/" in "_site/index.css"
++And I should see ".foo-bar {\n  color: red;\n}\n\n\/\*# 
sourceMappingURL=index.css.map \*\/" in "_site/index.css"
+ 
+   Scenario: Not render liquid in CoffeeScript without explicitly including 
jekyll-coffeescript
+ Given I have an "index.coffee" page with animal "cicada" that contains 
"hey='for {{page.animal}}'"
+diff --git a/features/theme.feature b/features/theme.feature
+index 75ff5c69cb3..ec63b21271d 100644
+--- a/features/theme.feature
 b/features/theme.feature
+@@ -19,7 +19,7 @@ Feature: Writing themes
+ When I run jekyll build
+ Then I should get a zero exit status
+ And the _site directory should exist
+-And I should see ".sample { color: red; }\n\n\/\*# 
sourceMappingURL=style.css.map \*\/" in "_site/assets/style.css"
++And I should see ".sample {\n  color: red;\n}\n\n\/\*# 
sourceMappingURL=style.css.map \*\/" in "_site/assets/style.css"
+ 
+   Scenario: Overriding a theme with SCSS
+ Given I have a configuration file with "theme" set to "test-theme"
+@@ -28,7 +28,7 @@ Feature: Writing themes
+ When I run jekyll build
+ Then I should get a zero exit status
+ And the _site directory should exist
+-And I should see ".sample { color: black; }\n\n\/\*# 
sourceMappingURL=style.css.map \*\/" in "_site/assets/style.css"
++And I should see ".sample {\n  color: black;\n}\n\n\/\*# 
sourceMappingURL=style.css.map \*\/" in "_site/assets/style.css"
+ 
+   Scenario: A theme with an include
+ Given I have a configuration file with "theme" set to "test-theme"
+diff --git a/test/test_filters.rb b/test/test_filters.rb
+index 176e5ed6d49..ea82fc5b5e3 100644
+--- a/test/test_filters.rb
 b/test/test_filters.rb
+@@ -143,7 +143,7 @@ def select; end
+ 
+ should "sassify with simple string" do
+   assert_equal(
+-"p { color: #123456; }\n",
++"p {\n  color: #123456;\n}",
+ @filter.sassify(<<~SASS)
+   $blue: #123456
+   p
+@@ -154,7 +154,7 @@ def select; end
+ 
+ should "scssify with simple string" do
+   assert_equal(
+-"p { color: #123456; }\n",
++"p {\n  color: #123456;\n}",
+ @filter.scssify("$blue:#123456; p{color: $blue}")
+   )
+ end
+diff --git a/test/test_sass.rb b/test/test_sass.rb
+index 372cdedbbf8..3d930d00ad7 100644
+--- a/test/test_sass.rb
 b/test/test_sass.rb
+@@ -15,7 +15,9 @@ class TestSass < JekyllUnitTest
+ 
+ should "import SCSS partial" do
+   result = <<~CSS
+-.half { width: 50%; }
++.half {
++  width: 50%;
++}
+ 
+ /*# sourceMappingURL=main.css.map */
+   CSS
+diff --git a/test/test_theme_assets_reader.rb 
b/test/test_theme_assets_reader.rb
+index f45503e7dbb..635cec35618 100644
+--- a/test/test_theme_assets_reader.rb
 b/test/test_theme_assets_reader.rb
+@@ -38,7 +38,7 @@ def refute_file_with_relative_path(haystack, relative_path)
+   file = @site.pages.find { |f| f.relative_path == "assets/style.scss" }
+   refute_nil file
+   assert_equal @site.in_dest_dir("assets/style.css"), 
file.destination(@site.dest)
+-  assert_includes file.output, ".sample { color: black; }"
++  assert_includes file.output, ".sample {\n  color: black;\

[gentoo-commits] repo/gentoo:master commit in: www-apps/jekyll/files/, www-apps/jekyll/

2021-01-25 Thread Aaron Bauman
commit: c9aadb736ba122fb8a237459dca32a9d0d42ced0
Author: Aaron Bauman  gentoo  org>
AuthorDate: Tue Jan 26 02:23:01 2021 +
Commit: Aaron Bauman  gentoo  org>
CommitDate: Tue Jan 26 02:23:35 2021 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c9aadb73

www-apps/jekyll: bump to 4.2.0 and fix tests

* Add missing test deps:
** dev-ruby/kramdown-syntax-coderay
** dev-ruby/nokogiri

* There is no missing dependency on bundler and this bug should be fixed
  in 4.1.1 and in 4.2.0. If not, please re-open.

* Add patch for missing dep in gemspec

Closes: https://bugs.gentoo.org/625994
Closes: https://bugs.gentoo.org/726072

Signed-off-by: Aaron Bauman  gentoo.org>

 www-apps/jekyll/Manifest  |  1 +
 www-apps/jekyll/files/jekyll-missingdep.patch | 14 
 www-apps/jekyll/jekyll-4.2.0.ebuild   | 95 +++
 3 files changed, 110 insertions(+)

diff --git a/www-apps/jekyll/Manifest b/www-apps/jekyll/Manifest
index 5b9729c8243..024159d8adc 100644
--- a/www-apps/jekyll/Manifest
+++ b/www-apps/jekyll/Manifest
@@ -1 +1,2 @@
 DIST jekyll-4.1.1.tar.gz 1398438 BLAKE2B 
ac207d58b155e069fda40b4598d441d8fb88f22e85740082829d018dc9cefe51ca636b23a6207c37711c4d26e078f6e4913946599f0200b8e8cb065a9ceff952
 SHA512 
98c635b54219c9666de6496e76f3a131fc715d650d868049c0fe10d76851a027e0808609c2dce1a138c95eb2fb7e58ef978237a305484071339b4a15d5acc4d5
+DIST jekyll-4.2.0.tar.gz 1412419 BLAKE2B 
351852b52abc227f8e1eedeeef0871a593d66ffc95f4ed61f81e841582ab9f393b206f049107daa7e9deaa63d36359ff8d0b47c69b629dda2ea462cd0481
 SHA512 
aee4d832631a285c3d37576b5f3d80073b56afefcb8c8a19a74435ce431b606b5cedc28a02c8e3930f9bc35ab432c952f96e1878b3bee6b9d33fbd01f0a147ec

diff --git a/www-apps/jekyll/files/jekyll-missingdep.patch 
b/www-apps/jekyll/files/jekyll-missingdep.patch
new file mode 100644
index 000..fcaf8f10e86
--- /dev/null
+++ b/www-apps/jekyll/files/jekyll-missingdep.patch
@@ -0,0 +1,14 @@
+--- a/jekyll.gemspec   2021-01-26 04:08:18.198289608 +0200
 b/jekyll.gemspec   2021-01-26 04:09:08.545548043 +0200
+@@ -41,9 +41,11 @@
+   s.add_runtime_dependency("kramdown",  "~> 2.3")
+   s.add_runtime_dependency("kramdown-parser-gfm",   "~> 1.0")
+   s.add_runtime_dependency("liquid","~> 4.0")
++  s.add_runtime_dependency("listen","~> 3.4")
+   s.add_runtime_dependency("mercenary", "~> 0.4.0")
+   s.add_runtime_dependency("pathutil",  "~> 0.9")
+   s.add_runtime_dependency("rouge", "~> 3.0")
+   s.add_runtime_dependency("safe_yaml", "~> 1.0")
+   s.add_runtime_dependency("terminal-table","~> 2.0")
++
+ end

diff --git a/www-apps/jekyll/jekyll-4.2.0.ebuild 
b/www-apps/jekyll/jekyll-4.2.0.ebuild
new file mode 100644
index 000..8affdcb7794
--- /dev/null
+++ b/www-apps/jekyll/jekyll-4.2.0.ebuild
@@ -0,0 +1,95 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+USE_RUBY="ruby25 ruby26"
+
+inherit ruby-fakegem
+
+RUBY_FAKEGEM_EXTRADOC="README.markdown History.markdown"
+RUBY_FAKEGEM_EXTRAINSTALL="features"
+
+RUBY_FAKEGEM_GEMSPEC="${PN}.gemspec"
+
+RUBY_FAKEGEM_BINDIR="exe"
+
+DESCRIPTION="A simple, blog aware, static site generator"
+HOMEPAGE="https://jekyllrb.com https://github.com/jekyll/jekyll";
+SRC_URI="https://github.com/jekyll/${PN}/archive/v${PV}.tar.gz  -> ${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64"
+IUSE="test"
+
+ruby_add_rdepend "
+   >=dev-ruby/addressable-2.4
+   >=dev-ruby/colorator-1.0
+   >=dev-ruby/em-websocket-0.5
+   dev-ruby/i18n:1
+   >=dev-ruby/kramdown-2.1:2
+   dev-ruby/kramdown-parser-gfm:1
+   dev-ruby/liquid:4
+   >=dev-ruby/mercenary-0.4.0
+   >=dev-ruby/pathutil-0.9
+   =dev-ruby/rouge-3*
+   >=dev-ruby/safe_yaml-1.0
+   >=dev-ruby/terminal-table-1.8:0
+   >=www-apps/jekyll-sass-converter-2.0
+   >=www-apps/jekyll-watch-2.0
+"
+
+ruby_add_bdepend "
+   test? (
+   >=dev-ruby/classifier-reborn-2.1.0
+   dev-ruby/httpclient
+   dev-ruby/kramdown-syntax-coderay
+   dev-ruby/launchy
+   dev-ruby/nokogiri
+   >=dev-ruby/rdiscount-2.0
+   >=dev-ruby/redcarpet-3.2.3
+   dev-ruby/rspec-mocks
+   >=dev-ruby/shoulda-3
+   dev-ruby/test-unit:2
+   www-apps/jekyll-coffeescript
+   )
+"
+
+all_ruby_prepare() {
+   # reported upstream https://github.com/jekyll/jekyll/issues/8556
+   eapply "${FILESDIR}"/jekyll-missingdep.patch
+   eapply "${FILESDIR}"/jekyll-3.6.0-test-helper.patch
+
+   # Drop tests requiring bundler
+   sed -i -e '/bundle_message/d' test/test_new_command.rb || die
+   rm test/test_plugin_manager.rb || die
+
+   # Replace git command in gemspec
+   sed -e 's/git ls-files/find -not -type d -print/' \
+