summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to 'config')
-rw-r--r--config/gitlab.yml.example7
-rw-r--r--config/initializers/1_settings.rb32
-rw-r--r--config/initializers/7_omniauth.rb2
-rw-r--r--config/mail_room.yml.example27
-rw-r--r--config/routes.rb1
5 files changed, 60 insertions, 9 deletions
diff --git a/config/gitlab.yml.example b/config/gitlab.yml.example
index 56770335ddc..c7b60a1d4b1 100644
--- a/config/gitlab.yml.example
+++ b/config/gitlab.yml.example
@@ -94,6 +94,13 @@ production: &base
# The default is 'tmp/repositories' relative to the root of the Rails app.
# repository_downloads_path: tmp/repositories
+ ## Reply by email
+ # Allow users to comment on issues and merge requests by replying to notification emails.
+ # For documentation on how to set this up, see http://doc.gitlab.com/ce/reply_by_email/README.md
+ reply_by_email:
+ enabled: false
+ address: "replies+%{reply_key}@gitlab.example.com"
+
## Gravatar
## For Libravatar see: http://doc.gitlab.com/ce/customization/libravatar.html
gravatar:
diff --git a/config/initializers/1_settings.rb b/config/initializers/1_settings.rb
index ef6e074c108..c47e5dab27c 100644
--- a/config/initializers/1_settings.rb
+++ b/config/initializers/1_settings.rb
@@ -8,7 +8,7 @@ class Settings < Settingslogic
def gitlab_on_standard_port?
gitlab.port.to_i == (gitlab.https ? 443 : 80)
end
-
+
# get host without www, thanks to http://stackoverflow.com/a/6674363/1233435
def get_host_without_www(url)
url = URI.encode(url)
@@ -32,14 +32,12 @@ class Settings < Settingslogic
end
end
+ def build_base_gitlab_url
+ base_gitlab_url.join('')
+ end
+
def build_gitlab_url
- custom_port = gitlab_on_standard_port? ? nil : ":#{gitlab.port}"
- [ gitlab.protocol,
- "://",
- gitlab.host,
- custom_port,
- gitlab.relative_url_root
- ].join('')
+ (base_gitlab_url + [gitlab.relative_url_root]).join('')
end
# check that values in `current` (string or integer) is a contant in `modul`.
@@ -64,6 +62,17 @@ class Settings < Settingslogic
end
value
end
+
+ private
+
+ def base_gitlab_url
+ custom_port = gitlab_on_standard_port? ? nil : ":#{gitlab.port}"
+ [ gitlab.protocol,
+ "://",
+ gitlab.host,
+ custom_port
+ ]
+ end
end
end
@@ -123,6 +132,7 @@ Settings.gitlab['email_enabled'] ||= true if Settings.gitlab['email_enabled'].ni
Settings.gitlab['email_from'] ||= "gitlab@#{Settings.gitlab.host}"
Settings.gitlab['email_display_name'] ||= "GitLab"
Settings.gitlab['email_reply_to'] ||= "noreply@#{Settings.gitlab.host}"
+Settings.gitlab['base_url'] ||= Settings.send(:build_base_gitlab_url)
Settings.gitlab['url'] ||= Settings.send(:build_gitlab_url)
Settings.gitlab['user'] ||= 'git'
Settings.gitlab['user_home'] ||= begin
@@ -151,6 +161,12 @@ Settings.gitlab['restricted_signup_domains'] ||= []
Settings.gitlab['import_sources'] ||= ['github','bitbucket','gitlab','gitorious','google_code','git']
#
+# Reply by email
+#
+Settings['reply_by_email'] ||= Settingslogic.new({})
+Settings.reply_by_email['enabled'] = false if Settings.reply_by_email['enabled'].nil?
+
+#
# Gravatar
#
Settings['gravatar'] ||= Settingslogic.new({})
diff --git a/config/initializers/7_omniauth.rb b/config/initializers/7_omniauth.rb
index 7f73546ac89..70ed10e8275 100644
--- a/config/initializers/7_omniauth.rb
+++ b/config/initializers/7_omniauth.rb
@@ -11,7 +11,7 @@ if Gitlab::LDAP::Config.enabled?
end
end
-OmniAuth.config.full_host = Settings.gitlab['url']
+OmniAuth.config.full_host = Settings.gitlab['base_url']
OmniAuth.config.allowed_request_methods = [:post]
#In case of auto sign-in, the GET method is used (users don't get to click on a button)
OmniAuth.config.allowed_request_methods << :get if Gitlab.config.omniauth.auto_sign_in_with_provider.present?
diff --git a/config/mail_room.yml.example b/config/mail_room.yml.example
new file mode 100644
index 00000000000..dd8edfc42eb
--- /dev/null
+++ b/config/mail_room.yml.example
@@ -0,0 +1,27 @@
+:mailboxes:
+ -
+ # # IMAP server host
+ # :host: "imap.gmail.com"
+ # # IMAP server port
+ # :port: 993
+ # # Whether the IMAP server uses SSL
+ # :ssl: true
+ # # Email account username. Usually the full email address.
+ # :email: "replies@gitlab.example.com"
+ # # Email account password
+ # :password: "password"
+ # # The name of the mailbox where incoming mail will end up. Usually "inbox".
+ # :name: "inbox"
+ # # Always "sidekiq".
+ # :delivery_method: sidekiq
+ # # Always true.
+ # :delete_after_delivery: true
+ # :delivery_options:
+ # # The URL to the Redis server used by Sidekiq. Should match the URL in config/resque.yml.
+ # :redis_url: redis://localhost:6379
+ # # Always "resque:gitlab".
+ # :namespace: resque:gitlab
+ # # Always "incoming_email".
+ # :queue: incoming_email
+ # # Always "EmailReceiverWorker"
+ # :worker: EmailReceiverWorker
diff --git a/config/routes.rb b/config/routes.rb
index d7307a61ede..8ba439f08b8 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -261,6 +261,7 @@ Gitlab::Application.routes.draw do
member do
get :issues
get :merge_requests
+ get :activity
end
scope module: :dashboard do