]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/osqa/recipes/default.rb
Updates for rubocop and foodcritic changes
[chef.git] / cookbooks / osqa / recipes / default.rb
index de65ad99b7248e379dcab3f173f3d68bf60cc957..fe8306fdc7dfb0c192eff61b136bda1c45ef76af 100644 (file)
@@ -40,7 +40,6 @@ apache_module "wsgi"
 node[:osqa][:sites].each do |site|
   name = site[:name]
   directory = site[:directory] || "/srv/#{name}"
-  osqa_revision = site[:revision] || node[:osqa][:revision]
   site_user = site[:user] || node[:osqa][:user]
   site_user = Etc.getpwuid(site_user).name if site_user.is_a?(Integer)
   site_group = site[:group] || node[:osqa][:group] || Etc.getpwnam(site_user).gid
@@ -102,8 +101,8 @@ node[:osqa][:sites].each do |site|
     line.gsub!(/^( *)'PASSWORD': '.*',/, "\\1'PASSWORD': '#{database_password}',")
     line.gsub!(/^ALLOWED_HOSTS = .*/, "ALLOWED_HOSTS = ('help.openstreetmap.org',)")
     line.gsub!(/^CACHE_BACKEND = .*/, "CACHE_BACKEND = 'memcached://127.0.0.1:11211/'")
-    line.gsub!(/^APP_URL = 'http:\/\/'/, "APP_URL = 'http://#{name}'")
-    line.gsub!(/^TIME_ZONE = 'America\/New_York'/, "TIME_ZONE = 'Europe/London'")
+    line.gsub!(%r{^APP_URL = 'http://'}, "APP_URL = 'http://#{name}'")
+    line.gsub!(%r{^TIME_ZONE = 'America/New_York'}, "TIME_ZONE = 'Europe/London'")
     line.gsub!(/^DISABLED_MODULES = \[([^\]]+)\]/, "DISABLED_MODULES = [\\1, 'localauth', 'facebookauth', 'oauthauth']")
 
     line