# limitations under the License.
#
-define :mediawiki_extension, :action => [ :enable ], :variables => {} do
+define :mediawiki_extension, :action => [:enable], :variables => {} do
name = params[:name]
site = params[:site]
- site_directory = node[:mediawiki][:sites][site][:site_directory]
mediawiki_directory = node[:mediawiki][:sites][site][:directory]
extension_directory = "#{mediawiki_directory}/extensions/#{name}"
source = params[:source]
action :sync
repository repository
reference reference
- #depth 1
+ # depth 1
enable_submodules true
user node[:mediawiki][:user]
group node[:mediawiki][:group]
ignore_failure repository.start_with?("git://github.com/wikimedia/mediawiki-extensions")
- notifies :run, resources(:execute => "#{mediawiki_directory}/maintenance/update.php")
+ notifies :run, "execute[#{mediawiki_directory}/maintenance/update.php]"
end
end
- if template
+ if template # ~FC023
template "#{mediawiki_directory}/LocalSettings.d/Ext-#{name}.inc.php" do
cookbook "mediawiki"
source template
group node[:mediawiki][:group]
mode 0664
variables template_variables
- notifies :create, resources(:template => "#{mediawiki_directory}/LocalSettings.php")
+ notifies :create, "template[#{mediawiki_directory}/LocalSettings.php]"
end
end
group node[:mediawiki][:group]
mode 0664
content "<?php require_once('#{extension_directory}/#{name}.php');\n"
- only_if do File.exist?("#{extension_directory}/#{name}.php") end
- notifies :create, resources(:template => "#{mediawiki_directory}/LocalSettings.php")
+ only_if { File.exist?("#{extension_directory}/#{name}.php") }
+ notifies :create, "template[#{mediawiki_directory}/LocalSettings.php]"
end
end