X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/18e12b0e123fc3e5f344682f884feabc12da0f5a..a8c510b750277f3be246b87019185e2cbccf2378:/cookbooks/mediawiki/resources/extension.rb diff --git a/cookbooks/mediawiki/resources/extension.rb b/cookbooks/mediawiki/resources/extension.rb index 6dc79ea7e..ad1472c12 100644 --- a/cookbooks/mediawiki/resources/extension.rb +++ b/cookbooks/mediawiki/resources/extension.rb @@ -23,6 +23,7 @@ property :extension, :kind_of => String, :name_attribute => true property :site, :kind_of => String, :required => true property :source, :kind_of => String property :template, :kind_of => String +property :template_cookbook, :kind_of => String, :default => "mediawiki" property :variables, :kind_of => Hash, :default => {} property :version, :kind_of => String property :repository, :kind_of => String @@ -65,7 +66,7 @@ action :create do if new_resource.template # ~FC023 declare_resource :template, "#{mediawiki_directory}/LocalSettings.d/Ext-#{new_resource.extension}.inc.php" do - cookbook "mediawiki" + cookbook new_resource.template_cookbook source new_resource.template user node[:mediawiki][:user] group node[:mediawiki][:group] @@ -73,16 +74,23 @@ action :create do variables new_resource.variables end else - extension_script = "#{extension_directory}/#{new_resource.extension}.php" - file "#{mediawiki_directory}/LocalSettings.d/Ext-#{new_resource.extension}.inc.php" do content "