summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-08-20 13:46:10 +0200
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-08-20 13:46:10 +0200
commiteb057209b072e9557f41c6f062832f9b37f62fc8 (patch)
tree363ded628a447c6c24cf1a98d007571476378cc9 /lib
parent55fc58bda4a5592f2f8deaecec9526fbe4eecd6f (diff)
parentbdae9bbebdb8d83fa21024b79aeb703268747f58 (diff)
downloadgitlab-ce-eb057209b072e9557f41c6f062832f9b37f62fc8.tar.gz
Merge pull request #9563 from Telekom-PD/feature/control-import-options
Feature/control import options
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