Add some CiviCRM extensions
authorTom Hughes <tom@compton.nu>
Mon, 2 Nov 2015 20:28:19 +0000 (20:28 +0000)
committerTom Hughes <tom@compton.nu>
Mon, 2 Nov 2015 20:32:46 +0000 (20:32 +0000)
cookbooks/civicrm/attributes/default.rb
cookbooks/civicrm/recipes/default.rb

index 0d8a881ca389bdef548ac6d294ddfa6ac13ab471..feb2aeb6cd8e0aa76d855f4a6903f541b5c56f71 100644 (file)
@@ -1 +1,17 @@
 default[:civicrm][:version] = "4.6.9"
+
+default[:civicrm][:extensions][:cividiscount][:name] = "org.civicrm.module.cividiscount"
+default[:civicrm][:extensions][:cividiscount][:repository] = "git://github.com/dlobo/org.civicrm.module.cividiscount.git"
+default[:civicrm][:extensions][:cividiscount][:revision] = "3.1"
+
+default[:civicrm][:extensions][:osm][:name] = "de.systopia.osm"
+default[:civicrm][:extensions][:osm][:repository] = "git://github.com/systopia/de.systopia.osm.git"
+default[:civicrm][:extensions][:osm][:revision] = "1.1"
+
+default[:civicrm][:extensions][:civirules][:name] = "org.civicoop.civirules"
+default[:civicrm][:extensions][:civirules][:repository] = "git://github.com/CiviCooP/org.civicoop.civirules.git"
+default[:civicrm][:extensions][:civirules][:revision] = "1.1"
+
+default[:civicrm][:extensions][:stripe][:name] = "com.drastikbydesign.stripe"
+default[:civicrm][:extensions][:stripe][:repository] = "git://github.com/drastik/com.drastikbydesign.stripe.git"
+default[:civicrm][:extensions][:stripe][:revision] = "1.9.1"
index da727600c533c8b0f0f652c9d4ca86b64d2c9e07..cf46d686e97b7a5c3f4916e255a287995e2b8397 100644 (file)
@@ -117,6 +117,24 @@ directory "/srv/join.osmfoundation.org/wp-content/plugins/files" do
   mode 0755
 end
 
+extensions_directory = "/srv/join.osmfoundation.org/wp-content/plugins/civicrm-extensions"
+
+directory extensions_directory do
+  owner "wordpress"
+  group "wordpress"
+  mode 0755
+end
+
+node[:civicrm][:extensions].each do |_, details|
+  git "#{extensions_directory}/#{details[:name]}" do
+    action :sync
+    repository details[:repository]
+    revision details[:revision]
+    user "wordpress"
+    group "wordpress"
+  end
+end
+
 settings = edit_file "#{civicrm_directory}/civicrm/templates/CRM/common/civicrm.settings.php.template" do |line|
   line.gsub!(/%%cms%%/, "WordPress")
   line.gsub!(/%%CMSdbUser%%/, "civicrm")
@@ -131,6 +149,7 @@ settings = edit_file "#{civicrm_directory}/civicrm/templates/CRM/common/civicrm.
   line.gsub!(/%%templateCompileDir%%/, "/srv/join.osmfoundation.org/wp-content/plugins/files/civicrm/templates_c/")
   line.gsub!(/%%baseURL%%/, "http://join.osmfoundation.org/")
   line.gsub!(/%%siteKey%%/, site_key)
+  line.gsub!(%r{// *(.*'ext_repo_url'.*)$}, "\\1")
 
   line
 end