From ebe7b10737a3af9065bd3cf4bfbba5bab21808d4 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Sun, 20 Aug 2023 10:45:38 +0100 Subject: [PATCH] Rename windowslive_auth to microsoft_auth --- cookbooks/web/recipes/rails.rb | 4 ++-- cookbooks/web/resources/rails_port.rb | 14 +++++++------- test/data_bags/web/passwords.json | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/cookbooks/web/recipes/rails.rb b/cookbooks/web/recipes/rails.rb index f321ef537..82c777b96 100644 --- a/cookbooks/web/recipes/rails.rb +++ b/cookbooks/web/recipes/rails.rb @@ -123,8 +123,8 @@ rails_port "www.openstreetmap.org" do google_openid_realm "https://www.openstreetmap.org" facebook_auth_id "427915424036881" facebook_auth_secret web_passwords["facebook_auth_secret"] - windowslive_auth_id "0000000040153C51" - windowslive_auth_secret web_passwords["windowslive_auth_secret"] + microsoft_auth_id "0000000040153C51" + microsoft_auth_secret web_passwords["microsoft_auth_secret"] github_auth_id "acf7da34edee99e35499" github_auth_secret web_passwords["github_auth_secret"] wikipedia_auth_id "e4fe0c2c5855d23ed7e1f1c0fa1f1c58" diff --git a/cookbooks/web/resources/rails_port.rb b/cookbooks/web/resources/rails_port.rb index 4825307b2..34ae01458 100644 --- a/cookbooks/web/resources/rails_port.rb +++ b/cookbooks/web/resources/rails_port.rb @@ -61,8 +61,8 @@ property :google_auth_secret, String property :google_openid_realm, String property :facebook_auth_id, String property :facebook_auth_secret, String -property :windowslive_auth_id, String -property :windowslive_auth_secret, String +property :microsoft_auth_id, String +property :microsoft_auth_secret, String property :github_auth_id, String property :github_auth_secret, String property :wikipedia_auth_id, String @@ -241,9 +241,9 @@ action :create do line.gsub!(/^( *)#facebook_auth_secret:.*$/, "\\1facebook_auth_secret: \"#{new_resource.facebook_auth_secret}\"") end - if new_resource.windowslive_auth_id - line.gsub!(/^( *)#windowslive_auth_id:.*$/, "\\1windowslive_auth_id: \"#{new_resource.windowslive_auth_id}\"") - line.gsub!(/^( *)#windowslive_auth_secret:.*$/, "\\1windowslive_auth_secret: \"#{new_resource.windowslive_auth_secret}\"") + if new_resource.microsoft_auth_id + line.gsub!(/^( *)#microsoft_auth_id:.*$/, "\\1microsoft_auth_id: \"#{new_resource.microsoft_auth_id}\"") + line.gsub!(/^( *)#microsoft_auth_secret:.*$/, "\\1microsoft_auth_secret: \"#{new_resource.microsoft_auth_secret}\"") end if new_resource.github_auth_id @@ -314,8 +314,8 @@ action :create do "google_openid_realm", "facebook_auth_id", "facebook_auth_secret", - "windowslive_auth_id", - "windowslive_auth_secret", + "microsoft_auth_id", + "microsoft_auth_secret", "github_auth_id", "github_auth_secret", "wikipedia_auth_id", diff --git a/test/data_bags/web/passwords.json b/test/data_bags/web/passwords.json index ad20fa1a1..844086210 100644 --- a/test/data_bags/web/passwords.json +++ b/test/data_bags/web/passwords.json @@ -6,7 +6,7 @@ "oauth_key": "oauth", "google_auth_secret": "google", "facebook_auth_secret": "facebook", - "windowslive_auth_secret": "windowslive", + "microsoft_auth_secret": "microsoft", "github_auth_secret": "github", "wikipedia_auth_secret": "wikipedia", "mapquest_key": "mapquest", -- 2.39.5