From d054b1902c58aeda444f9c574e46c7638a65544e Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Tue, 28 Feb 2017 08:33:42 +0000 Subject: [PATCH] Use sysment pygmentize for SyntaxHighlight extension --- .rubocop_todo.yml | 2 +- cookbooks/mediawiki/providers/site.rb | 1 + cookbooks/mediawiki/recipes/default.rb | 3 +++ .../templates/default/mw-ext-SyntaxHighlight.inc.php.erb | 4 ++++ 4 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 cookbooks/mediawiki/templates/default/mw-ext-SyntaxHighlight.inc.php.erb diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index d566e2bcc..f651adfb9 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -13,7 +13,7 @@ Metrics/AbcSize: # Offense count: 27 # Configuration parameters: CountComments. Metrics/BlockLength: - Max: 359 + Max: 360 # Offense count: 3 Metrics/CyclomaticComplexity: diff --git a/cookbooks/mediawiki/providers/site.rb b/cookbooks/mediawiki/providers/site.rb index 24b53c8fa..054bbe3c0 100644 --- a/cookbooks/mediawiki/providers/site.rb +++ b/cookbooks/mediawiki/providers/site.rb @@ -276,6 +276,7 @@ action :create do mediawiki_extension "SyntaxHighlight_GeSHi" do site new_resource.name + template "mw-ext-SyntaxHighlight.inc.php.erb" update_site false end diff --git a/cookbooks/mediawiki/recipes/default.rb b/cookbooks/mediawiki/recipes/default.rb index 2ecaaa4eb..9e9d7e75b 100644 --- a/cookbooks/mediawiki/recipes/default.rb +++ b/cookbooks/mediawiki/recipes/default.rb @@ -51,6 +51,9 @@ package "liblz4-tool" package "curl" package "parsoid" +# Mediawiki packages for SyntaxHighight support +package "python-pygments" + template "/etc/mediawiki/parsoid/settings.js" do source "parsoid-settings.js.erb" owner "root" diff --git a/cookbooks/mediawiki/templates/default/mw-ext-SyntaxHighlight.inc.php.erb b/cookbooks/mediawiki/templates/default/mw-ext-SyntaxHighlight.inc.php.erb new file mode 100644 index 000000000..554e82097 --- /dev/null +++ b/cookbooks/mediawiki/templates/default/mw-ext-SyntaxHighlight.inc.php.erb @@ -0,0 +1,4 @@ +