Skip to content
Extraits de code Groupes Projets
Valider 6d6ca3d8 rédigé par ilya's avatar ilya
Parcourir les fichiers

added terse_pod_url to the APP_CONFIG hash

parent d60dc03d
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -239,11 +239,8 @@ class User
###Helpers############
def self.instantiate!( opts = {} )
terse_url = APP_CONFIG[:pod_url].gsub(/(https?:|www\.)\/\//, '')
terse_url.chop! if terse_url[-1, 1] == '/'
opts[:person][:diaspora_handle] = "#{opts[:username]}@#{terse_url}"
opts[:person][:url] = APP_CONFIG[:pod_url]
opts[:person][:diaspora_handle] = "#{opts[:username]}@#{APP_CONFIG[:terse_pod_url]}"
pts[:person][:url] = APP_CONFIG[:pod_url]
opts[:person][:serialized_key] = generate_key
User.create(opts)
end
......
......@@ -20,4 +20,7 @@ else
APP_CONFIG = all_envs['default'].symbolize_keys
end
puts "WARNING: Please modify your app_config.yml to have a proper pod_url!" if APP_CONFIG[:pod_url] == "http://example.org/" && Rails.env != :test
APP_CONFIG[:terse_pod_url] = APP_CONFIG[:pod_url].gsub(/(https?:|www\.)\/\//, '')
APP_CONFIG[:terse_pod_url].chop! if APP_CONFIG[:terse_pod_url][-1, 1] == '/'
puts "WARNING: Please modify your app_config.yml to have a proper pod_url!" if APP_CONFIG[:terse_pod_url] == "example.org" && Rails.env != :test
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter