Merge branch 'master' of https://github.com/funglaub/gitlabhq into funglaub-master

Conflicts:
	Gemfile.lock
	app/helpers/application_helper.rb
	app/views/devise/sessions/new.html.erb
	db/schema.rb
This commit is contained in:
Dmitriy Zaporozhets 2012-09-12 06:49:52 +03:00
commit 621affecb5
18 changed files with 189 additions and 35 deletions

View file

@ -50,3 +50,21 @@ git:
git_max_size: 5242880 # 5.megabytes
# Git timeout to read commit, in seconds
git_timeout: 10
# Omniauth configuration
omniauth:
enabled: false
providers:
allow_single_sign_on: false
block_auto_created_users: true
# omniauth:
# enabled: true
# providers:
# - { name: 'google_oauth2', app_id: 'YOUR APP ID',
# app_secret: 'YOUR APP SECRET',
# args: { access_type: 'offline', approval_prompt: '' } }
# - { name: 'twitter', app_id: 'YOUR APP ID',
# app_secret: 'YOUR APP SECRET'}
# - { name: 'github', app_id: 'YOUR APP ID',
# app_secret: 'YOUR APP SECRET' }

View file

@ -6,7 +6,7 @@ class Settings < Settingslogic
self.web['protocol'] ||= web.https ? "https" : "http"
end
def web_host
def web_host
self.web['host'] ||= 'localhost'
end
@ -14,11 +14,11 @@ class Settings < Settingslogic
self.email['from'] ||= ("notify@" + web_host)
end
def url
def url
self['url'] ||= build_url
end
end
def web_port
def web_port
if web.https
web['port'] = 443
else
@ -36,7 +36,7 @@ class Settings < Settingslogic
raw_url << web_host
if web_custom_port?
raw_url << ":#{web_port}"
raw_url << ":#{web_port}"
end
raw_url
@ -120,6 +120,14 @@ class Settings < Settingslogic
app['backup_keep_time'] || 0
end
def omniauth_enabled?
omniauth['enabled'] || false
end
def omniauth_providers
omniauth['providers'] || []
end
def disable_gravatar?
app['disable_gravatar'] || false
end