]> git.openstreetmap.org Git - chef.git/commitdiff
Use sysment pygmentize for SyntaxHighlight extension
authorTom Hughes <tom@compton.nu>
Tue, 28 Feb 2017 08:33:42 +0000 (08:33 +0000)
committerTom Hughes <tom@compton.nu>
Tue, 28 Feb 2017 08:36:38 +0000 (08:36 +0000)
.rubocop_todo.yml
cookbooks/mediawiki/providers/site.rb
cookbooks/mediawiki/recipes/default.rb
cookbooks/mediawiki/templates/default/mw-ext-SyntaxHighlight.inc.php.erb [new file with mode: 0644]

index d566e2bccb3ef4c0be8ad081759795b32aa0a36e..f651adfb9e8d53e333229a7bafa131009db682b0 100644 (file)
@@ -13,7 +13,7 @@ Metrics/AbcSize:
 # Offense count: 27
 # Configuration parameters: CountComments.
 Metrics/BlockLength:
-  Max: 359
+  Max: 360
 
 # Offense count: 3
 Metrics/CyclomaticComplexity:
index 24b53c8faed420473759fb3b2ef0f9b46f45566f..054bbe3c002687ff449452a853e463996cef14a1 100644 (file)
@@ -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
 
index 2ecaaa4ebe5f30dacc53ea8f4304b4694bfbe0a7..9e9d7e75b96a735b4206cb9f0683d901df8b1567 100644 (file)
@@ -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 (file)
index 0000000..554e820
--- /dev/null
@@ -0,0 +1,4 @@
+<?php
+# DO NOT EDIT - This file is being maintained by Chef
+wfLoadExtension( 'SyntaxHighlight_GeSHi' );
+$wgPygmentizePath = '/usr/bin/pygmentize';