X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/d1aaa91efdb8ce6731d80943b9696d1538909f5f..8da4be887969f3ee09e0659f76e5b3c52bf7a570:/cookbooks/mediawiki/providers/site.rb diff --git a/cookbooks/mediawiki/providers/site.rb b/cookbooks/mediawiki/providers/site.rb index 7357e7d94..e78ca3a25 100644 --- a/cookbooks/mediawiki/providers/site.rb +++ b/cookbooks/mediawiki/providers/site.rb @@ -87,12 +87,21 @@ action :create do mediawiki_reference = "REL#{new_resource.version}".tr(".", "_") + git "#{mediawiki_directory}/vendor" do + action :nothing + repository "https://gerrit.wikimedia.org/r/p/mediawiki/vendor.git" + revision mediawiki_reference + user node[:mediawiki][:user] + group node[:mediawiki][:group] + end + git mediawiki_directory do action :sync repository "https://gerrit.wikimedia.org/r/p/mediawiki/core.git" revision mediawiki_reference user node[:mediawiki][:user] group node[:mediawiki][:group] + notifies :sync, "git[#{mediawiki_directory}/vendor]", :immediately notifies :run, "execute[#{mediawiki_directory}/maintenance/install.php]", :immediately notifies :run, "execute[#{mediawiki_directory}/maintenance/update.php]" end @@ -182,18 +191,30 @@ action :create do mediawiki_extension "Cite" do site new_resource.name - template "mw-ext-Cite.inc.php.erb" update_site false end - mediawiki_extension "ConfirmEdit" do + mediawiki_extension "CiteThisPage" do site new_resource.name - template "mw-ext-ConfirmEdit.inc.php.erb" - variables :public_key => new_resource.recaptcha_public_key, - :private_key => new_resource.recaptcha_private_key update_site false end + if new_resource.private_accounts || new_resource.private + mediawiki_extension "ConfirmEdit" do + site new_resource.name + update_site false + action :delete + end + else + mediawiki_extension "ConfirmEdit" do + site new_resource.name + template "mw-ext-ConfirmEdit.inc.php.erb" + variables :public_key => new_resource.recaptcha_public_key, + :private_key => new_resource.recaptcha_private_key + update_site false + end + end + mediawiki_extension "Gadgets" do site new_resource.name update_site false @@ -244,6 +265,7 @@ action :create do mediawiki_extension "SimpleAntiSpam" do site new_resource.name update_site false + action :delete end mediawiki_extension "SpamBlacklist" do @@ -270,7 +292,7 @@ action :create do # MediaWiki Language Extension Bundle # FIXME: should automatically resolve tag - mw_lang_ext_bundle_tag = "2015.03" + mw_lang_ext_bundle_tag = "2015.10" mediawiki_extension "Babel" do site new_resource.name @@ -281,6 +303,7 @@ action :create do mediawiki_extension "cldr" do site new_resource.name + template "mw-ext-cldr.inc.php.erb" tag mw_lang_ext_bundle_tag update_site false end @@ -324,6 +347,7 @@ action :create do mediawiki_extension "AntiSpoof" do site new_resource.name + template "mw-ext-AntiSpoof.inc.php.erb" update_site false end @@ -357,6 +381,7 @@ action :create do mediawiki_extension "osmtaginfo" do site new_resource.name + template "mw-ext-osmtaginfo.inc.php.erb" repository "git://github.com/Firefishy/osmtaginfo.git" tag "live" update_site false @@ -364,6 +389,7 @@ action :create do mediawiki_extension "SimpleMap" do site new_resource.name + template "mw-ext-SimpleMap.inc.php.erb" repository "git://github.com/Firefishy/SimpleMap.git" tag "live" update_site false @@ -371,6 +397,7 @@ action :create do mediawiki_extension "SlippyMap" do site new_resource.name + template "mw-ext-SlippyMap.inc.php.erb" repository "git://github.com/Firefishy/SlippyMap.git" tag "live" update_site false @@ -379,6 +406,7 @@ action :create do mediawiki_extension "Mantle" do site new_resource.name update_site false + action :delete end mediawiki_extension "MobileFrontend" do @@ -387,6 +415,18 @@ action :create do update_site false end + mediawiki_extension "DisableAccount" do + site new_resource.name + template "mw-ext-DisableAccount.inc.php.erb" + update_site false + end + + mediawiki_extension "VisualEditor" do + site new_resource.name + template "mw-ext-VisualEditor.inc.php.erb" + update_site false + end + cookbook_file "#{site_directory}/cc-wiki.png" do cookbook "mediawiki" owner node[:mediawiki][:user]