Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorArtem Sidorenko <artem.sidorenko@telekom.de>2015-08-12 09:13:20 +0300
committerArtem Sidorenko <artem.sidorenko@telekom.de>2015-08-20 12:28:27 +0300
commit55dca86b983496a26a3913aead77439edf96afe9 (patch)
treec02b8dfe8aba50265f59ba0170eb09b9fc2f9e19 /lib
parent55fc58bda4a5592f2f8deaecec9526fbe4eecd6f (diff)
Import sources: settings in the admin interface
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/current_settings.rb3
-rw-r--r--lib/gitlab/import_sources.rb29
2 files changed, 31 insertions, 1 deletions
diff --git a/lib/gitlab/current_settings.rb b/lib/gitlab/current_settings.rb
index 931d51c55d3..1a2a50a14d0 100644
--- a/lib/gitlab/current_settings.rb
+++ b/lib/gitlab/current_settings.rb
@@ -22,7 +22,8 @@ module Gitlab
sign_in_text: Settings.extra['sign_in_text'],
restricted_visibility_levels: Settings.gitlab['restricted_visibility_levels'],
max_attachment_size: Settings.gitlab['max_attachment_size'],
- session_expire_delay: Settings.gitlab['session_expire_delay']
+ session_expire_delay: Settings.gitlab['session_expire_delay'],
+ import_sources: Settings.gitlab['import_sources']
)
end
end
diff --git a/lib/gitlab/import_sources.rb b/lib/gitlab/import_sources.rb
new file mode 100644
index 00000000000..991b70aab6a
--- /dev/null
+++ b/lib/gitlab/import_sources.rb
@@ -0,0 +1,29 @@
+# Gitlab::ImportSources module
+#
+# Define import sources that can be used
+# during the creation of new project
+#
+module Gitlab
+ module ImportSources
+ extend CurrentSettings
+
+ class << self
+ def values
+ options.values
+ end
+
+ def options
+ {
+ 'GitHub' => 'github',
+ 'Bitbucket' => 'bitbucket',
+ 'GitLab.com' => 'gitlab',
+ 'Gitorious.org' => 'gitorious',
+ 'Google Code' => 'google_code',
+ 'Any repo by URL' => 'git',
+ }
+ end
+
+ end
+
+ end
+end