From a8e93b7f51d968c1380ed210499869b62b07fd15 Mon Sep 17 00:00:00 2001 From: Job van der Voort Date: Tue, 21 Apr 2015 16:21:51 +0200 Subject: Version 7.10.0.rc5 --- config/application.rb | 104 ------- config/aws.yml.example | 19 -- config/boot.rb | 6 - config/database.yml.mysql | 42 --- config/database.yml.postgresql | 45 --- config/environment.rb | 5 - config/environments/development.rb | 34 --- config/environments/production.rb | 80 ----- config/environments/test.rb | 33 -- config/gitlab.teatro.yml | 86 ------ config/gitlab.yml.example | 337 --------------------- config/initializers/1_settings.rb | 206 ------------- config/initializers/2_app.rb | 8 - config/initializers/3_grit_ext.rb | 5 - config/initializers/4_sidekiq.rb | 27 -- config/initializers/5_backend.rb | 15 - config/initializers/6_rack_profiler.rb | 8 - config/initializers/7_omniauth.rb | 12 - config/initializers/backtrace_silencers.rb | 7 - config/initializers/carrierwave.rb | 41 --- config/initializers/devise.rb | 246 --------------- config/initializers/devise_async.rb | 1 - .../initializers/devise_password_length.rb.example | 6 - config/initializers/disable_email_interceptor.rb | 2 - config/initializers/gitlab_shell_secret_token.rb | 19 -- config/initializers/haml.rb | 1 - config/initializers/inflections.rb | 31 -- config/initializers/kaminari_config.rb | 10 - config/initializers/postgresql_limit_fix.rb | 26 -- config/initializers/public_key.rb | 2 - config/initializers/rack_attack.rb.example | 26 -- config/initializers/rack_attack_git_basic_auth.rb | 12 - config/initializers/redis-store-fix-expiry.rb | 44 --- config/initializers/secret_token.rb | 26 -- config/initializers/session_store.rb | 11 - config/initializers/smtp_settings.rb.sample | 22 -- config/initializers/state_machine_patch.rb | 9 - config/initializers/static_files.rb | 15 - config/initializers/time_zone.rb | 1 - config/initializers/wrap_parameters.rb | 14 - config/locales/devise.en.yml | 60 ---- config/locales/doorkeeper.en.yml | 73 ----- config/locales/en.yml | 10 - config/newrelic.yml | 16 - config/resque.yml.example | 3 - config/unicorn.rb.example | 123 -------- config/unicorn.rb.example.development | 2 - 47 files changed, 1931 deletions(-) delete mode 100644 config/application.rb delete mode 100644 config/aws.yml.example delete mode 100644 config/boot.rb delete mode 100644 config/database.yml.mysql delete mode 100644 config/database.yml.postgresql delete mode 100644 config/environment.rb delete mode 100644 config/environments/development.rb delete mode 100644 config/environments/production.rb delete mode 100644 config/environments/test.rb delete mode 100644 config/gitlab.teatro.yml delete mode 100644 config/gitlab.yml.example delete mode 100644 config/initializers/1_settings.rb delete mode 100644 config/initializers/2_app.rb delete mode 100644 config/initializers/3_grit_ext.rb delete mode 100644 config/initializers/4_sidekiq.rb delete mode 100644 config/initializers/5_backend.rb delete mode 100644 config/initializers/6_rack_profiler.rb delete mode 100644 config/initializers/7_omniauth.rb delete mode 100644 config/initializers/backtrace_silencers.rb delete mode 100644 config/initializers/carrierwave.rb delete mode 100644 config/initializers/devise.rb delete mode 100644 config/initializers/devise_async.rb delete mode 100644 config/initializers/devise_password_length.rb.example delete mode 100644 config/initializers/disable_email_interceptor.rb delete mode 100644 config/initializers/gitlab_shell_secret_token.rb delete mode 100644 config/initializers/haml.rb delete mode 100644 config/initializers/inflections.rb delete mode 100644 config/initializers/kaminari_config.rb delete mode 100644 config/initializers/postgresql_limit_fix.rb delete mode 100644 config/initializers/public_key.rb delete mode 100644 config/initializers/rack_attack.rb.example delete mode 100644 config/initializers/rack_attack_git_basic_auth.rb delete mode 100644 config/initializers/redis-store-fix-expiry.rb delete mode 100644 config/initializers/secret_token.rb delete mode 100644 config/initializers/session_store.rb delete mode 100644 config/initializers/smtp_settings.rb.sample delete mode 100644 config/initializers/state_machine_patch.rb delete mode 100644 config/initializers/static_files.rb delete mode 100644 config/initializers/time_zone.rb delete mode 100644 config/initializers/wrap_parameters.rb delete mode 100644 config/locales/devise.en.yml delete mode 100644 config/locales/doorkeeper.en.yml delete mode 100644 config/locales/en.yml delete mode 100644 config/newrelic.yml delete mode 100644 config/resque.yml.example delete mode 100644 config/unicorn.rb.example delete mode 100644 config/unicorn.rb.example.development (limited to 'config') diff --git a/config/application.rb b/config/application.rb deleted file mode 100644 index fa399533e52..00000000000 --- a/config/application.rb +++ /dev/null @@ -1,104 +0,0 @@ -require File.expand_path('../boot', __FILE__) - -require 'rails/all' -require 'devise' -I18n.config.enforce_available_locales = false -Bundler.require(:default, Rails.env) - -module Gitlab - class Application < Rails::Application - # Settings in config/environments/* take precedence over those specified here. - # Application configuration should go into files in config/initializers - # -- all .rb files in that directory are automatically loaded. - - # Custom directories with classes and modules you want to be autoloadable. - config.autoload_paths.push(*%W(#{config.root}/lib - #{config.root}/app/models/hooks - #{config.root}/app/models/concerns - #{config.root}/app/models/project_services - #{config.root}/app/models/members)) - - # Only load the plugins named here, in the order given (default is alphabetical). - # :all can be used as a placeholder for all plugins not explicitly named. - # config.plugins = [ :exception_notification, :ssl_requirement, :all ] - - # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded. - # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s] - # config.i18n.default_locale = :de - config.i18n.enforce_available_locales = false - - # Configure the default encoding used in templates for Ruby 1.9. - config.encoding = "utf-8" - - # Configure sensitive parameters which will be filtered from the log file. - config.filter_parameters.push(:password, :password_confirmation, :private_token) - - # Enable escaping HTML in JSON. - config.active_support.escape_html_entities_in_json = true - - # Use SQL instead of Active Record's schema dumper when creating the database. - # This is necessary if your schema can't be completely dumped by the schema dumper, - # like if you have constraints or database-specific column types - # config.active_record.schema_format = :sql - - # Enable the asset pipeline - config.assets.enabled = true - config.assets.paths << Emoji.images_path - config.assets.precompile << "emoji/*.png" - config.assets.precompile << "print.css" - - # Version of your assets, change this if you want to expire all your assets - config.assets.version = '1.0' - - config.action_view.sanitized_allowed_protocols = %w(smb) - - # Relative url support - # Uncomment and customize the last line to run in a non-root path - # WARNING: We recommend creating a FQDN to host GitLab in a root path instead of this. - # Note that following settings need to be changed for this to work. - # 1) In your application.rb file: config.relative_url_root = "/gitlab" - # 2) In your gitlab.yml file: relative_url_root: /gitlab - # 3) In your unicorn.rb: ENV['RAILS_RELATIVE_URL_ROOT'] = "/gitlab" - # 4) In ../gitlab-shell/config.yml: gitlab_url: "http://127.0.0.1/gitlab" - # 5) In lib/support/nginx/gitlab : do not use asset gzipping, remove block starting with "location ~ ^/(assets)/" - # - # To update the path, run: sudo -u git -H bundle exec rake assets:precompile RAILS_ENV=production - # - # config.relative_url_root = "/gitlab" - - config.middleware.use Rack::Attack - - # Allow access to GitLab API from other domains - config.middleware.use Rack::Cors do - allow do - origins '*' - resource '/api/*', - headers: :any, - methods: [:get, :post, :options, :put, :delete], - expose: ['Link'] - end - end - - # Use Redis caching across all environments - redis_config_file = Rails.root.join('config', 'resque.yml') - - redis_url_string = if File.exists?(redis_config_file) - YAML.load_file(redis_config_file)[Rails.env] - else - "redis://localhost:6379" - end - - # Redis::Store does not handle Unix sockets well, so let's do it for them - redis_config_hash = Redis::Store::Factory.extract_host_options_from_uri(redis_url_string) - redis_uri = URI.parse(redis_url_string) - if redis_uri.scheme == 'unix' - redis_config_hash[:path] = redis_uri.path - end - - redis_config_hash[:namespace] = 'cache:gitlab' - config.cache_store = :redis_store, redis_config_hash - - # This is needed for gitlab-shell - ENV['GITLAB_PATH_OUTSIDE_HOOK'] = ENV['PATH'] - end -end diff --git a/config/aws.yml.example b/config/aws.yml.example deleted file mode 100644 index 29d029b078d..00000000000 --- a/config/aws.yml.example +++ /dev/null @@ -1,19 +0,0 @@ -# See https://github.com/jnicklas/carrierwave#using-amazon-s3 -# for more options -production: - access_key_id: AKIA1111111111111UA - secret_access_key: secret - bucket: mygitlab.production.us - region: us-east-1 - -development: - access_key_id: AKIA1111111111111UA - secret_access_key: secret - bucket: mygitlab.development.us - region: us-east-1 - -test: - access_key_id: AKIA1111111111111UA - secret_access_key: secret - bucket: mygitlab.test.us - region: us-east-1 diff --git a/config/boot.rb b/config/boot.rb deleted file mode 100644 index 4489e58688c..00000000000 --- a/config/boot.rb +++ /dev/null @@ -1,6 +0,0 @@ -require 'rubygems' - -# Set up gems listed in the Gemfile. -ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) - -require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE']) diff --git a/config/database.yml.mysql b/config/database.yml.mysql deleted file mode 100644 index a99c50706c5..00000000000 --- a/config/database.yml.mysql +++ /dev/null @@ -1,42 +0,0 @@ -# -# PRODUCTION -# -production: - adapter: mysql2 - encoding: utf8 - collation: utf8_general_ci - reconnect: false - database: gitlabhq_production - pool: 10 - username: git - password: "secure password" - # host: localhost - # socket: /tmp/mysql.sock - -# -# Development specific -# -development: - adapter: mysql2 - encoding: utf8 - collation: utf8_general_ci - reconnect: false - database: gitlabhq_development - pool: 5 - username: root - password: "secure password" - # socket: /tmp/mysql.sock - -# Warning: The database defined as "test" will be erased and -# re-generated from your development database when you run "rake". -# Do not set this db to the same as development or production. -test: &test - adapter: mysql2 - encoding: utf8 - collation: utf8_general_ci - reconnect: false - database: gitlabhq_test - pool: 5 - username: root - password: - # socket: /tmp/mysql.sock diff --git a/config/database.yml.postgresql b/config/database.yml.postgresql deleted file mode 100644 index 7067e0fe402..00000000000 --- a/config/database.yml.postgresql +++ /dev/null @@ -1,45 +0,0 @@ -# -# PRODUCTION -# -production: - adapter: postgresql - encoding: unicode - database: gitlabhq_production - pool: 10 - # username: git - # password: - # host: localhost - # port: 5432 - -# -# Development specific -# -development: - adapter: postgresql - encoding: unicode - database: gitlabhq_development - pool: 5 - username: postgres - password: - -# -# Staging specific -# -staging: - adapter: postgresql - encoding: unicode - database: gitlabhq_staging - pool: 5 - username: postgres - password: - -# Warning: The database defined as "test" will be erased and -# re-generated from your development database when you run "rake". -# Do not set this db to the same as development or production. -test: &test - adapter: postgresql - encoding: unicode - database: gitlabhq_test - pool: 5 - username: postgres - password: diff --git a/config/environment.rb b/config/environment.rb deleted file mode 100644 index 3b186a9d57a..00000000000 --- a/config/environment.rb +++ /dev/null @@ -1,5 +0,0 @@ -# Load the rails application -require File.expand_path('../application', __FILE__) - -# Initialize the rails application -Gitlab::Application.initialize! diff --git a/config/environments/development.rb b/config/environments/development.rb deleted file mode 100644 index 03af7f07864..00000000000 --- a/config/environments/development.rb +++ /dev/null @@ -1,34 +0,0 @@ -Gitlab::Application.configure do - # Settings specified here will take precedence over those in config/application.rb - - # In the development environment your application's code is reloaded on - # every request. This slows down response time but is perfect for development - # since you don't have to restart the web server when you make code changes. - config.cache_classes = false - - # Show full error reports and disable caching - config.consider_all_requests_local = true - config.action_controller.perform_caching = false - - # Don't care if the mailer can't send - config.action_mailer.raise_delivery_errors = false - - # Print deprecation notices to the Rails logger - config.active_support.deprecation = :log - - # Only use best-standards-support built into browsers - config.action_dispatch.best_standards_support = :builtin - - # Do not compress assets - config.assets.compress = false - - # Expands the lines which load the assets - # config.assets.debug = true - - # For having correct urls in mails - config.action_mailer.default_url_options = { host: 'localhost', port: 3000 } - # Open sent mails in browser - config.action_mailer.delivery_method = :letter_opener - - config.eager_load = false -end diff --git a/config/environments/production.rb b/config/environments/production.rb deleted file mode 100644 index 3316ece3873..00000000000 --- a/config/environments/production.rb +++ /dev/null @@ -1,80 +0,0 @@ -Gitlab::Application.configure do - # Settings specified here will take precedence over those in config/application.rb - - # Code is not reloaded between requests - config.cache_classes = true - - # Full error reports are disabled and caching is turned on - config.consider_all_requests_local = false - config.action_controller.perform_caching = true - - # Disable Rails's static asset server (Apache or nginx will already do this) - config.serve_static_assets = false - - # Compress JavaScripts and CSS. - config.assets.js_compressor = :uglifier - # config.assets.css_compressor = :sass - - # Don't fallback to assets pipeline if a precompiled asset is missed - config.assets.compile = true - - # Generate digests for assets URLs - config.assets.digest = true - - # Defaults to nil and saved in location specified by config.assets.prefix - # config.assets.manifest = YOUR_PATH - - # Specifies the header that your server uses for sending files - # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache - # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx - - # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. - # config.force_ssl = true - - # See everything in the log (default is :info) - # config.log_level = :debug - - # Suppress 'Rendered template ...' messages in the log - # source: http://stackoverflow.com/a/16369363 - %w{render_template render_partial render_collection}.each do |event| - ActiveSupport::Notifications.unsubscribe "#{event}.action_view" - end - - # Prepend all log lines with the following tags - # config.log_tags = [ :subdomain, :uuid ] - - # Use a different logger for distributed setups - # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new) - - # Enable serving of images, stylesheets, and JavaScripts from an asset server - # config.action_controller.asset_host = "http://assets.example.com" - - # Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added) - # config.assets.precompile += %w( search.js ) - - # Disable delivery errors, bad email addresses will be ignored - # config.action_mailer.raise_delivery_errors = false - - # Enable threaded mode - # config.threadsafe! unless $rails_rake_task - - # Enable locale fallbacks for I18n (makes lookups for any locale fall back to - # the I18n.default_locale when a translation can not be found) - config.i18n.fallbacks = true - - # Send deprecation notices to registered listeners - config.active_support.deprecation = :notify - - config.action_mailer.delivery_method = :sendmail - # Defaults to: - # # config.action_mailer.sendmail_settings = { - # # location: '/usr/sbin/sendmail', - # # arguments: '-i -t' - # # } - config.action_mailer.perform_deliveries = true - config.action_mailer.raise_delivery_errors = true - - config.eager_load = true - - config.allow_concurrency = false -end diff --git a/config/environments/test.rb b/config/environments/test.rb deleted file mode 100644 index 2d5e7addcd3..00000000000 --- a/config/environments/test.rb +++ /dev/null @@ -1,33 +0,0 @@ -Gitlab::Application.configure do - # Settings specified here will take precedence over those in config/application.rb - - # The test environment is used exclusively to run your application's - # test suite. You never need to work with it otherwise. Remember that - # your test database is "scratch space" for the test suite and is wiped - # and recreated between test runs. Don't rely on the data there! - config.cache_classes = false - - # Configure static asset server for tests with Cache-Control for performance - config.serve_static_assets = true - config.static_cache_control = "public, max-age=3600" - - # Show full error reports and disable caching - config.consider_all_requests_local = true - config.action_controller.perform_caching = false - - # Raise exceptions instead of rendering exception templates - config.action_dispatch.show_exceptions = false - - # Disable request forgery protection in test environment - config.action_controller.allow_forgery_protection = false - - # Tell Action Mailer not to deliver emails to the real world. - # The :test delivery method accumulates sent emails in the - # ActionMailer::Base.deliveries array. - config.action_mailer.delivery_method = :test - - # Print deprecation notices to the stderr - config.active_support.deprecation = :stderr - - config.eager_load = false -end diff --git a/config/gitlab.teatro.yml b/config/gitlab.teatro.yml deleted file mode 100644 index f0656400beb..00000000000 --- a/config/gitlab.teatro.yml +++ /dev/null @@ -1,86 +0,0 @@ - -production: &base - gitlab: - host: localhost - port: 80 - https: false - - user: root - - email_from: example@example.com - - support_email: support@example.com - - default_projects_features: - issues: true - merge_requests: true - wiki: true - wall: false - snippets: false - visibility_level: "private" # can be "private" | "internal" | "public" - - issues_tracker: - - gravatar: - enabled: true # Use user avatar image from Gravatar.com (default: true) - - ldap: - enabled: false - host: '_your_ldap_server' - port: 636 - uid: 'sAMAccountName' - method: 'ssl' # "tls" or "ssl" or "plain" - bind_dn: '_the_full_dn_of_the_user_you_will_bind_with' - password: '_the_password_of_the_bind_user' - allow_username_or_email_login: true - - base: '' - - user_filter: '' - - omniauth: - enabled: false - - satellites: - # Relative paths are relative to Rails.root (default: tmp/repo_satellites/) - path: /apps/gitlab-satellites/ - - backup: - path: "tmp/backups" # Relative paths are relative to Rails.root (default: tmp/backups/) - - gitlab_shell: - path: /apps/gitlab-shell/ - - # REPOS_PATH MUST NOT BE A SYMLINK!!! - repos_path: /apps/repositories/ - hooks_path: /apps/gitlab-shell/hooks/ - - upload_pack: true - receive_pack: true - - git: - bin_path: /usr/bin/git - max_size: 5242880 # 5.megabytes - timeout: 10 - - extra: - -development: - <<: *base - -test: - <<: *base - gravatar: - enabled: true - gitlab: - host: localhost - port: 80 - issues_tracker: - redmine: - title: "Redmine" - project_url: "http://redmine/projects/:issues_tracker_id" - issues_url: "http://redmine/:project_id/:issues_tracker_id/:id" - new_issue_url: "http://redmine/projects/:issues_tracker_id/issues/new" - -staging: - <<: *base diff --git a/config/gitlab.yml.example b/config/gitlab.yml.example deleted file mode 100644 index ba40671b162..00000000000 --- a/config/gitlab.yml.example +++ /dev/null @@ -1,337 +0,0 @@ -# # # # # # # # # # # # # # # # # # -# GitLab application config file # -# # # # # # # # # # # # # # # # # # -# -########################### NOTE ##################################### -# This file should not receive new settings. All configuration options # -# are being moved to ApplicationSetting model! # -######################################################################## -# -# How to use: -# 1. Copy file as gitlab.yml -# 2. Update gitlab -> host with your fully qualified domain name -# 3. Update gitlab -> email_from -# 4. If you installed Git from source, change git -> bin_path to /usr/local/bin/git -# 5. Review this configuration file for other settings you may want to adjust - -production: &base - # - # 1. GitLab app settings - # ========================== - - ## GitLab settings - gitlab: - ## Web server settings (note: host is the FQDN, do not include http://) - host: localhost - port: 80 # Set to 443 if using HTTPS, see installation.md#using-https for additional HTTPS configuration details - https: false # Set to true if using HTTPS, see installation.md#using-https for additional HTTPS configuration details - - # Uncommment this line below if your ssh host is different from HTTP/HTTPS one - # (you'd obviously need to replace ssh.host_example.com with your own host). - # Otherwise, ssh host will be set to the `host:` value above - # ssh_host: ssh.host_example.com - - # WARNING: See config/application.rb under "Relative url support" for the list of - # other files that need to be changed for relative url support - # relative_url_root: /gitlab - - # Uncomment and customize if you can't use the default user to run GitLab (default: 'git') - # user: git - - ## Date & Time settings - # Uncomment and customize if you want to change the default time zone of GitLab application. - # To see all available zones, run `bundle exec rake time:zones:all RAILS_ENV=production` - # time_zone: 'UTC' - - ## Email settings - # Uncomment and set to false if you need to disable email sending from GitLab (default: true) - # email_enabled: true - # Email address used in the "From" field in mails sent by GitLab - email_from: example@example.com - email_display_name: GitLab - email_reply_to: noreply@example.com - - # Email server smtp settings are in config/initializers/smtp_settings.rb.sample - - # default_can_create_group: false # default: true - # username_changing_enabled: false # default: true - User can change her username/namespace - ## Default theme - ## BASIC = 1 - ## MARS = 2 - ## MODERN = 3 - ## GRAY = 4 - ## COLOR = 5 - # default_theme: 2 # default: 2 - - ## Automatic issue closing - # If a commit message matches this regular expression, all issues referenced from the matched text will be closed. - # This happens when the commit is pushed or merged into the default branch of a project. - # When not specified the default issue_closing_pattern as specified below will be used. - # Tip: you can test your closing pattern at http://rubular.com. - # issue_closing_pattern: '((?:[Cc]los(?:e[sd]?|ing)|[Ff]ix(?:e[sd]|ing)?) +(?:(?:issues? +)?#\d+(?:(?:, *| +and +)?))+)' - - ## Default project features settings - default_projects_features: - issues: true - merge_requests: true - wiki: true - snippets: false - visibility_level: "private" # can be "private" | "internal" | "public" - - ## Webhook settings - # Number of seconds to wait for HTTP response after sending webhook HTTP POST request (default: 10) - # webhook_timeout: 10 - - ## Repository downloads directory - # When a user clicks e.g. 'Download zip' on a project, a temporary zip file is created in the following directory. - # The default is 'tmp/repositories' relative to the root of the Rails app. - # repository_downloads_path: tmp/repositories - - ## Gravatar - ## For Libravatar see: http://doc.gitlab.com/ce/customization/libravatar.html - gravatar: - enabled: true # Use user avatar image from Gravatar.com (default: true) - # gravatar urls: possible placeholders: %{hash} %{size} %{email} - # plain_url: "http://..." # default: http://www.gravatar.com/avatar/%{hash}?s=%{size}&d=identicon - # ssl_url: "https://..." # default: https://secure.gravatar.com/avatar/%{hash}?s=%{size}&d=identicon - - # - # 2. Auth settings - # ========================== - - ## LDAP settings - # You can inspect a sample of the LDAP users with login access by running: - # bundle exec rake gitlab:ldap:check RAILS_ENV=production - ldap: - enabled: false - servers: - ########################################################################## - # - # Since GitLab 7.4, LDAP servers get ID's (below the ID is 'main'). GitLab - # Enterprise Edition now supports connecting to multiple LDAP servers. - # - # If you are updating from the old (pre-7.4) syntax, you MUST give your - # old server the ID 'main'. - # - ########################################################################## - main: # 'main' is the GitLab 'provider ID' of this LDAP server - ## label - # - # A human-friendly name for your LDAP server. It is OK to change the label later, - # for instance if you find out it is too large to fit on the web page. - # - # Example: 'Paris' or 'Acme, Ltd.' - label: 'LDAP' - - host: '_your_ldap_server' - port: 389 - uid: 'sAMAccountName' - method: 'plain' # "tls" or "ssl" or "plain" - bind_dn: '_the_full_dn_of_the_user_you_will_bind_with' - password: '_the_password_of_the_bind_user' - - # This setting specifies if LDAP server is Active Directory LDAP server. - # For non AD servers it skips the AD specific queries. - # If your LDAP server is not AD, set this to false. - active_directory: true - - # If allow_username_or_email_login is enabled, GitLab will ignore everything - # after the first '@' in the LDAP username submitted by the user on login. - # - # Example: - # - the user enters 'jane.doe@example.com' and 'p@ssw0rd' as LDAP credentials; - # - GitLab queries the LDAP server with 'jane.doe' and 'p@ssw0rd'. - # - # If you are using "uid: 'userPrincipalName'" on ActiveDirectory you need to - # disable this setting, because the userPrincipalName contains an '@'. - allow_username_or_email_login: false - - # To maintain tight control over the number of active users on your GitLab installation, - # enable this setting to keep new users blocked until they have been cleared by the admin - # (default: false). - block_auto_created_users: false - - # Base where we can search for users - # - # Ex. ou=People,dc=gitlab,dc=example - # - base: '' - - # Filter LDAP users - # - # Format: RFC 4515 http://tools.ietf.org/search/rfc4515 - # Ex. (employeeType=developer) - # - # Note: GitLab does not support omniauth-ldap's custom filter syntax. - # - user_filter: '' - - # GitLab EE only: add more LDAP servers - # Choose an ID made of a-z and 0-9 . This ID will be stored in the database - # so that GitLab can remember which LDAP server a user belongs to. - # uswest2: - # label: - # host: - # .... - - - ## OmniAuth settings - omniauth: - # Allow login via Twitter, Google, etc. using OmniAuth providers - enabled: false - - # CAUTION! - # This allows users to login without having a user account first (default: false). - # User accounts will be created automatically when authentication was successful. - allow_single_sign_on: false - # Locks down those users until they have been cleared by the admin (default: true). - block_auto_created_users: true - - ## Auth providers - # Uncomment the following lines and fill in the data of the auth provider you want to use - # If your favorite auth provider is not listed you can use others: - # see https://github.com/gitlabhq/gitlab-public-wiki/wiki/Custom-omniauth-provider-configurations - # The 'app_id' and 'app_secret' parameters are always passed as the first two - # arguments, followed by optional 'args' which can be either a hash or an array. - # Documentation for this is available at http://doc.gitlab.com/ce/integration/omniauth.html - 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', - # args: { scope: 'user:email' } } - # - { name: 'gitlab', app_id: 'YOUR_APP_ID', - # app_secret: 'YOUR_APP_SECRET', - # args: { scope: 'api' } } - # - { name: 'bitbucket', app_id: 'YOUR_APP_ID', - # app_secret: 'YOUR_APP_SECRET'} - - - - # - # 3. Advanced settings - # ========================== - - # GitLab Satellites - satellites: - # Relative paths are relative to Rails.root (default: tmp/repo_satellites/) - path: /home/git/gitlab-satellites/ - timeout: 30 - - ## Backup settings - backup: - path: "tmp/backups" # Relative paths are relative to Rails.root (default: tmp/backups/) - # keep_time: 604800 # default: 0 (forever) (in seconds) - # upload: - # # Fog storage connection settings, see http://fog.io/storage/ . - # connection: - # provider: AWS - # region: eu-west-1 - # aws_access_key_id: AKIAKIAKI - # aws_secret_access_key: 'secret123' - # # The remote 'directory' to store your backups. For S3, this would be the bucket name. - # remote_directory: 'my.s3.bucket' - - ## GitLab Shell settings - gitlab_shell: - path: /home/git/gitlab-shell/ - - # REPOS_PATH MUST NOT BE A SYMLINK!!! - repos_path: /home/git/repositories/ - hooks_path: /home/git/gitlab-shell/hooks/ - - # Git over HTTP - upload_pack: true - receive_pack: true - - # If you use non-standard ssh port you need to specify it - # ssh_port: 22 - - ## Git settings - # CAUTION! - # Use the default values unless you really know what you are doing - git: - bin_path: /usr/bin/git - # The next value is the maximum memory size grit can use - # Given in number of bytes per git object (e.g. a commit) - # This value can be increased if you have very large commits - max_size: 20971520 # 20.megabytes - # Git timeout to read a commit, in seconds - timeout: 10 - - # - # 4. Extra customization - # ========================== - - extra: - ## Google analytics. Uncomment if you want it - # google_analytics_id: '_your_tracking_id' - - ## Piwik analytics. - # piwik_url: '_your_piwik_url' - # piwik_site_id: '_your_piwik_site_id' - - rack_attack: - git_basic_auth: - # Rack Attack IP banning enabled - # enabled: true - # - # Whitelist requests from 127.0.0.1 for web proxies (NGINX/Apache) with incorrect headers - # ip_whitelist: ["127.0.0.1"] - # - # Limit the number of Git HTTP authentication attempts per IP - # maxretry: 10 - # - # Reset the auth attempt counter per IP after 60 seconds - # findtime: 60 - # - # Ban an IP for one hour (3600s) after too many auth attempts - # bantime: 3600 - -development: - <<: *base - -test: - <<: *base - gravatar: - enabled: true - gitlab: - host: localhost - port: 80 - - # When you run tests we clone and setup gitlab-shell - # In order to setup it correctly you need to specify - # your system username you use to run GitLab - # user: YOUR_USERNAME - satellites: - path: tmp/tests/gitlab-satellites/ - gitlab_shell: - path: tmp/tests/gitlab-shell/ - repos_path: tmp/tests/repositories/ - hooks_path: tmp/tests/gitlab-shell/hooks/ - issues_tracker: - redmine: - title: "Redmine" - project_url: "http://redmine/projects/:issues_tracker_id" - issues_url: "http://redmine/:project_id/:issues_tracker_id/:id" - new_issue_url: "http://redmine/projects/:issues_tracker_id/issues/new" - ldap: - enabled: false - servers: - main: - label: ldap - host: 127.0.0.1 - port: 3890 - uid: 'uid' - method: 'plain' # "tls" or "ssl" or "plain" - base: 'dc=example,dc=com' - user_filter: '' - group_base: 'ou=groups,dc=example,dc=com' - admin_group: '' - sync_ssh_keys: false - -staging: - <<: *base diff --git a/config/initializers/1_settings.rb b/config/initializers/1_settings.rb deleted file mode 100644 index 0abd34fc3e0..00000000000 --- a/config/initializers/1_settings.rb +++ /dev/null @@ -1,206 +0,0 @@ -require 'gitlab' # Load lib/gitlab.rb as soon as possible - -class Settings < Settingslogic - source ENV.fetch('GITLAB_CONFIG') { "#{Rails.root}/config/gitlab.yml" } - namespace Rails.env - - class << self - def gitlab_on_standard_port? - gitlab.port.to_i == (gitlab.https ? 443 : 80) - end - - private - - def build_gitlab_shell_ssh_path_prefix - if gitlab_shell.ssh_port != 22 - "ssh://#{gitlab_shell.ssh_user}@#{gitlab_shell.ssh_host}:#{gitlab_shell.ssh_port}/" - else - if gitlab_shell.ssh_host.include? ':' - "[#{gitlab_shell.ssh_user}@#{gitlab_shell.ssh_host}]:" - else - "#{gitlab_shell.ssh_user}@#{gitlab_shell.ssh_host}:" - end - end - 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('') - end - - # check that values in `current` (string or integer) is a contant in `modul`. - def verify_constant_array(modul, current, default) - values = default || [] - if !current.nil? - values = [] - current.each do |constant| - values.push(verify_constant(modul, constant, nil)) - end - values.delete_if { |value| value.nil? } - end - values - end - - # check that `current` (string or integer) is a contant in `modul`. - def verify_constant(modul, current, default) - constant = modul.constants.find{ |name| modul.const_get(name) == current } - value = constant.nil? ? default : modul.const_get(constant) - if current.is_a? String - value = modul.const_get(current.upcase) rescue default - end - value - end - end -end - - -# Default settings -Settings['ldap'] ||= Settingslogic.new({}) -Settings.ldap['enabled'] = false if Settings.ldap['enabled'].nil? - -# backwards compatibility, we only have one host -if Settings.ldap['enabled'] || Rails.env.test? - if Settings.ldap['host'].present? - # We detected old LDAP configuration syntax. Update the config to make it - # look like it was entered with the new syntax. - server = Settings.ldap.except('sync_time') - Settings.ldap['servers'] = { - 'main' => server - } - end - - Settings.ldap['servers'].each do |key, server| - server['label'] ||= 'LDAP' - server['block_auto_created_users'] = false if server['block_auto_created_users'].nil? - server['allow_username_or_email_login'] = false if server['allow_username_or_email_login'].nil? - server['active_directory'] = true if server['active_directory'].nil? - server['provider_name'] ||= "ldap#{key}".downcase - server['provider_class'] = OmniAuth::Utils.camelize(server['provider_name']) - end -end - - -Settings['omniauth'] ||= Settingslogic.new({}) -Settings.omniauth['enabled'] = false if Settings.omniauth['enabled'].nil? -Settings.omniauth['providers'] ||= [] - -Settings['issues_tracker'] ||= {} - -# -# GitLab -# -Settings['gitlab'] ||= Settingslogic.new({}) -Settings.gitlab['default_projects_limit'] ||= 10 -Settings.gitlab['default_branch_protection'] ||= 2 -Settings.gitlab['default_can_create_group'] = true if Settings.gitlab['default_can_create_group'].nil? -Settings.gitlab['default_theme'] = Gitlab::Theme::MARS if Settings.gitlab['default_theme'].nil? -Settings.gitlab['host'] ||= 'localhost' -Settings.gitlab['ssh_host'] ||= Settings.gitlab.host -Settings.gitlab['https'] = false if Settings.gitlab['https'].nil? -Settings.gitlab['port'] ||= Settings.gitlab.https ? 443 : 80 -Settings.gitlab['relative_url_root'] ||= ENV['RAILS_RELATIVE_URL_ROOT'] || '' -Settings.gitlab['protocol'] ||= Settings.gitlab.https ? "https" : "http" -Settings.gitlab['email_enabled'] ||= true if Settings.gitlab['email_enabled'].nil? -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['url'] ||= Settings.send(:build_gitlab_url) -Settings.gitlab['user'] ||= 'git' -Settings.gitlab['user_home'] ||= begin - Etc.getpwnam(Settings.gitlab['user']).dir -rescue ArgumentError # no user configured - '/home/' + Settings.gitlab['user'] -end -Settings.gitlab['time_zone'] ||= nil -Settings.gitlab['signup_enabled'] ||= true if Settings.gitlab['signup_enabled'].nil? -Settings.gitlab['signin_enabled'] ||= true if Settings.gitlab['signin_enabled'].nil? -Settings.gitlab['twitter_sharing_enabled'] ||= true if Settings.gitlab['twitter_sharing_enabled'].nil? -Settings.gitlab['restricted_visibility_levels'] = Settings.send(:verify_constant_array, Gitlab::VisibilityLevel, Settings.gitlab['restricted_visibility_levels'], []) -Settings.gitlab['username_changing_enabled'] = true if Settings.gitlab['username_changing_enabled'].nil? -Settings.gitlab['issue_closing_pattern'] = '((?:[Cc]los(?:e[sd]?|ing)|[Ff]ix(?:e[sd]|ing)?|[Rr]esolv(?:e[sd]?|ing)) +(?:(?:issues? +)?#\d+(?:(?:, *| +and +)?))+)' if Settings.gitlab['issue_closing_pattern'].nil? -Settings.gitlab['default_projects_features'] ||= {} -Settings.gitlab['webhook_timeout'] ||= 10 -Settings.gitlab['max_attachment_size'] ||= 10 -Settings.gitlab.default_projects_features['issues'] = true if Settings.gitlab.default_projects_features['issues'].nil? -Settings.gitlab.default_projects_features['merge_requests'] = true if Settings.gitlab.default_projects_features['merge_requests'].nil? -Settings.gitlab.default_projects_features['wiki'] = true if Settings.gitlab.default_projects_features['wiki'].nil? -Settings.gitlab.default_projects_features['snippets'] = false if Settings.gitlab.default_projects_features['snippets'].nil? -Settings.gitlab.default_projects_features['visibility_level'] = Settings.send(:verify_constant, Gitlab::VisibilityLevel, Settings.gitlab.default_projects_features['visibility_level'], Gitlab::VisibilityLevel::PRIVATE) -Settings.gitlab['repository_downloads_path'] = File.absolute_path(Settings.gitlab['repository_downloads_path'] || 'tmp/repositories', Rails.root) - -# -# Gravatar -# -Settings['gravatar'] ||= Settingslogic.new({}) -Settings.gravatar['enabled'] = true if Settings.gravatar['enabled'].nil? -Settings.gravatar['plain_url'] ||= 'http://www.gravatar.com/avatar/%{hash}?s=%{size}&d=identicon' -Settings.gravatar['ssl_url'] ||= 'https://secure.gravatar.com/avatar/%{hash}?s=%{size}&d=identicon' - -# -# GitLab Shell -# -Settings['gitlab_shell'] ||= Settingslogic.new({}) -Settings.gitlab_shell['path'] ||= Settings.gitlab['user_home'] + '/gitlab-shell/' -Settings.gitlab_shell['hooks_path'] ||= Settings.gitlab['user_home'] + '/gitlab-shell/hooks/' -Settings.gitlab_shell['receive_pack'] = true if Settings.gitlab_shell['receive_pack'].nil? -Settings.gitlab_shell['upload_pack'] = true if Settings.gitlab_shell['upload_pack'].nil? -Settings.gitlab_shell['repos_path'] ||= Settings.gitlab['user_home'] + '/repositories/' -Settings.gitlab_shell['ssh_host'] ||= Settings.gitlab.ssh_host -Settings.gitlab_shell['ssh_port'] ||= 22 -Settings.gitlab_shell['ssh_user'] ||= Settings.gitlab.user -Settings.gitlab_shell['owner_group'] ||= Settings.gitlab.user -Settings.gitlab_shell['ssh_path_prefix'] ||= Settings.send(:build_gitlab_shell_ssh_path_prefix) - -# -# Backup -# -Settings['backup'] ||= Settingslogic.new({}) -Settings.backup['keep_time'] ||= 0 -Settings.backup['path'] = File.expand_path(Settings.backup['path'] || "tmp/backups/", Rails.root) -Settings.backup['upload'] ||= Settingslogic.new({ 'remote_directory' => nil, 'connection' => nil }) -# Convert upload connection settings to use symbol keys, to make Fog happy -if Settings.backup['upload']['connection'] - Settings.backup['upload']['connection'] = Hash[Settings.backup['upload']['connection'].map { |k, v| [k.to_sym, v] }] -end - -# -# Git -# -Settings['git'] ||= Settingslogic.new({}) -Settings.git['max_size'] ||= 20971520 # 20.megabytes -Settings.git['bin_path'] ||= '/usr/bin/git' -Settings.git['timeout'] ||= 10 - -Settings['satellites'] ||= Settingslogic.new({}) -Settings.satellites['path'] = File.expand_path(Settings.satellites['path'] || "tmp/repo_satellites/", Rails.root) -Settings.satellites['timeout'] ||= 30 - -# -# Extra customization -# -Settings['extra'] ||= Settingslogic.new({}) - -# -# Rack::Attack settings -# -Settings['rack_attack'] ||= Settingslogic.new({}) -Settings.rack_attack['git_basic_auth'] ||= Settingslogic.new({}) -Settings.rack_attack.git_basic_auth['enabled'] = true if Settings.rack_attack.git_basic_auth['enabled'].nil? -Settings.rack_attack.git_basic_auth['ip_whitelist'] ||= %w{127.0.0.1} -Settings.rack_attack.git_basic_auth['maxretry'] ||= 10 -Settings.rack_attack.git_basic_auth['findtime'] ||= 1.minute -Settings.rack_attack.git_basic_auth['bantime'] ||= 1.hour - -# -# Testing settings -# -if Rails.env.test? - Settings.gitlab['default_projects_limit'] = 42 - Settings.gitlab['default_can_create_group'] = true - Settings.gitlab['default_can_create_team'] = false -end diff --git a/config/initializers/2_app.rb b/config/initializers/2_app.rb deleted file mode 100644 index 688cdf5f4b0..00000000000 --- a/config/initializers/2_app.rb +++ /dev/null @@ -1,8 +0,0 @@ -module Gitlab - VERSION = File.read(Rails.root.join("VERSION")).strip - REVISION = Gitlab::Popen.popen(%W(git log --pretty=format:%h -n 1)).first.chomp - - def self.config - Settings - end -end diff --git a/config/initializers/3_grit_ext.rb b/config/initializers/3_grit_ext.rb deleted file mode 100644 index 6540ac839cb..00000000000 --- a/config/initializers/3_grit_ext.rb +++ /dev/null @@ -1,5 +0,0 @@ -require 'grit' - -Grit::Git.git_binary = Gitlab.config.git.bin_path -Grit::Git.git_timeout = Gitlab.config.git.timeout -Grit::Git.git_max_size = Gitlab.config.git.max_size diff --git a/config/initializers/4_sidekiq.rb b/config/initializers/4_sidekiq.rb deleted file mode 100644 index e856499732e..00000000000 --- a/config/initializers/4_sidekiq.rb +++ /dev/null @@ -1,27 +0,0 @@ -# Custom Redis configuration -config_file = Rails.root.join('config', 'resque.yml') - -resque_url = if File.exists?(config_file) - YAML.load_file(config_file)[Rails.env] - else - "redis://localhost:6379" - end - -Sidekiq.configure_server do |config| - config.redis = { - url: resque_url, - namespace: 'resque:gitlab' - } - - config.server_middleware do |chain| - chain.add Gitlab::SidekiqMiddleware::ArgumentsLogger if ENV['SIDEKIQ_LOG_ARGUMENTS'] - chain.add Gitlab::SidekiqMiddleware::MemoryKiller if ENV['SIDEKIQ_MEMORY_KILLER_MAX_RSS'] - end -end - -Sidekiq.configure_client do |config| - config.redis = { - url: resque_url, - namespace: 'resque:gitlab' - } -end diff --git a/config/initializers/5_backend.rb b/config/initializers/5_backend.rb deleted file mode 100644 index 80d641d73a3..00000000000 --- a/config/initializers/5_backend.rb +++ /dev/null @@ -1,15 +0,0 @@ -# GIT over HTTP -require Rails.root.join("lib", "gitlab", "backend", "grack_auth") - -# GIT over SSH -require Rails.root.join("lib", "gitlab", "backend", "shell") - -# GitLab shell adapter -require Rails.root.join("lib", "gitlab", "backend", "shell_adapter") - -required_version = Gitlab::VersionInfo.parse(Gitlab::Shell.version_required) -current_version = Gitlab::VersionInfo.parse(Gitlab::Shell.new.version) - -unless current_version.valid? && required_version <= current_version - warn "WARNING: This version of GitLab depends on gitlab-shell #{required_version}, but you're running #{current_version}. Please update gitlab-shell." -end diff --git a/config/initializers/6_rack_profiler.rb b/config/initializers/6_rack_profiler.rb deleted file mode 100644 index b6340287569..00000000000 --- a/config/initializers/6_rack_profiler.rb +++ /dev/null @@ -1,8 +0,0 @@ -if Rails.env == 'development' - require 'rack-mini-profiler' - - # initialization is skipped so trigger it - Rack::MiniProfilerRails.initialize!(Rails.application) - Rack::MiniProfiler.config.position = 'right' - Rack::MiniProfiler.config.start_hidden = true -end diff --git a/config/initializers/7_omniauth.rb b/config/initializers/7_omniauth.rb deleted file mode 100644 index 8f6c5673103..00000000000 --- a/config/initializers/7_omniauth.rb +++ /dev/null @@ -1,12 +0,0 @@ -if Gitlab::LDAP::Config.enabled? - module OmniAuth::Strategies - server = Gitlab.config.ldap.servers.values.first - klass = server['provider_class'] - const_set(klass, Class.new(LDAP)) unless klass == 'LDAP' - end - - OmniauthCallbacksController.class_eval do - server = Gitlab.config.ldap.servers.values.first - alias_method server['provider_name'], :ldap - end -end diff --git a/config/initializers/backtrace_silencers.rb b/config/initializers/backtrace_silencers.rb deleted file mode 100644 index 59385cdf379..00000000000 --- a/config/initializers/backtrace_silencers.rb +++ /dev/null @@ -1,7 +0,0 @@ -# Be sure to restart your server when you modify this file. - -# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces. -# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ } - -# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code. -# Rails.backtrace_cleaner.remove_silencers! diff --git a/config/initializers/carrierwave.rb b/config/initializers/carrierwave.rb deleted file mode 100644 index bfb8656df55..00000000000 --- a/config/initializers/carrierwave.rb +++ /dev/null @@ -1,41 +0,0 @@ -CarrierWave::SanitizedFile.sanitize_regexp = /[^[:word:]\.\-\+]/ - -aws_file = Rails.root.join('config', 'aws.yml') - -if File.exists?(aws_file) - AWS_CONFIG = YAML.load(File.read(aws_file))[Rails.env] - - CarrierWave.configure do |config| - config.fog_credentials = { - provider: 'AWS', # required - aws_access_key_id: AWS_CONFIG['access_key_id'], # required - aws_secret_access_key: AWS_CONFIG['secret_access_key'], # required - region: AWS_CONFIG['region'], # optional, defaults to 'us-east-1' - } - - # required - config.fog_directory = AWS_CONFIG['bucket'] - - # optional, defaults to true - config.fog_public = false - - # optional, defaults to {} - config.fog_attributes = { 'Cache-Control'=>'max-age=315576000' } - - # optional time (in seconds) that authenticated urls will be valid. - # when fog_public is false and provider is AWS or Google, defaults to 600 - config.fog_authenticated_url_expiration = 1 << 29 - end - - # Mocking Fog requests, based on: https://github.com/carrierwaveuploader/carrierwave/wiki/How-to%3A-Test-Fog-based-uploaders - if Rails.env.test? - Fog.mock! - connection = ::Fog::Storage.new( - aws_access_key_id: AWS_CONFIG['access_key_id'], - aws_secret_access_key: AWS_CONFIG['secret_access_key'], - provider: 'AWS', - region: AWS_CONFIG['region'] - ) - connection.directories.create(key: AWS_CONFIG['bucket']) - end -end diff --git a/config/initializers/devise.rb b/config/initializers/devise.rb deleted file mode 100644 index 9dce495106f..00000000000 --- a/config/initializers/devise.rb +++ /dev/null @@ -1,246 +0,0 @@ -# Use this hook to configure devise mailer, warden hooks and so forth. The first -# four configuration values can also be set straight in your models. -Devise.setup do |config| - # ==> Mailer Configuration - # Configure the e-mail address which will be shown in Devise::Mailer, - # note that it will be overwritten if you use your own mailer class with default "from" parameter. - config.mailer_sender = "GitLab <#{Gitlab.config.gitlab.email_from}>" - - - # Configure the class responsible to send e-mails. - # config.mailer = "Devise::Mailer" - - # ==> ORM configuration - # Load and configure the ORM. Supports :active_record (default) and - # :mongoid (bson_ext recommended) by default. Other ORMs may be - # available as additional gems. - require 'devise/orm/active_record' - - # ==> Configuration for any authentication mechanism - # Configure which keys are used when authenticating a user. The default is - # just :email. You can configure it to use [:username, :subdomain], so for - # authenticating a user, both parameters are required. Remember that those - # parameters are used only when authenticating and not when retrieving from - # session. If you need permissions, you should implement that in a before filter. - # You can also supply a hash where the value is a boolean determining whether - # or not authentication should be aborted when the value is not present. - config.authentication_keys = [ :login ] - - # Configure parameters from the request object used for authentication. Each entry - # given should be a request method and it will automatically be passed to the - # find_for_authentication method and considered in your model lookup. For instance, - # if you set :request_keys to [:subdomain], :subdomain will be used on authentication. - # The same considerations mentioned for authentication_keys also apply to request_keys. - # config.request_keys = [] - - # Configure which authentication keys should be case-insensitive. - # These keys will be downcased upon creating or modifying a user and when used - # to authenticate or find a user. Default is :email. - config.case_insensitive_keys = [ :email ] - - # Configure which authentication keys should have whitespace stripped. - # These keys will have whitespace before and after removed upon creating or - # modifying a user and when used to authenticate or find a user. Default is :email. - config.strip_whitespace_keys = [ :email ] - - # Tell if authentication through request.params is enabled. True by default. - # config.params_authenticatable = true - - # Tell if authentication through HTTP Basic Auth is enabled. False by default. - # config.http_authenticatable = false - - # If http headers should be returned for AJAX requests. True by default. - # config.http_authenticatable_on_xhr = true - - # The realm used in Http Basic Authentication. "Application" by default. - # config.http_authentication_realm = "Application" - - config.reconfirmable = true - - # It will change confirmation, password recovery and other workflows - # to behave the same regardless if the e-mail provided was right or wrong. - # Does not affect registerable. - # config.paranoid = true - - # ==> Configuration for :database_authenticatable - # For bcrypt, this is the cost for hashing the password and defaults to 10. If - # using other encryptors, it sets how many times you want the password re-encrypted. - # - # Limiting the stretches to just one in testing will increase the performance of - # your test suite dramatically. However, it is STRONGLY RECOMMENDED to not use - # a value less than 10 in other environments. - config.stretches = Rails.env.test? ? 1 : 10 - - # Setup a pepper to generate the encrypted password. - # config.pepper = "2ef62d549c4ff98a5d3e0ba211e72cff592060247e3bbbb9f499af1222f876f53d39b39b823132affb32858168c79c1d7741d26499901b63c6030a42129924ef" - - # ==> Configuration for :confirmable - # The time you want to give a user to confirm their account. During this time - # they will be able to access your application without confirming. Default is 0.days - # When allow_unconfirmed_access_for is zero, the user won't be able to sign in without confirming. - # You can use this to let your user access some features of your application - # without confirming the account, but blocking it after a certain period - # (ie 2 days). - # config.allow_unconfirmed_access_for = 2.days - - # Defines which key will be used when confirming an account - # config.confirmation_keys = [ :email ] - - # ==> Configuration for :rememberable - # The time the user will be remembered without asking for credentials again. - # config.remember_for = 2.weeks - - # If true, a valid remember token can be re-used between multiple browsers. - # config.remember_across_browsers = true - - # If true, extends the user's remember period when remembered via cookie. - # config.extend_remember_period = false - - # Options to be passed to the created cookie. For instance, you can set - # secure: true in order to force SSL only cookies. - # config.cookie_options = {} - - # ==> Configuration for :validatable - # Range for password length. Default is 6..128. - config.password_length = 8..128 - - # Email regex used to validate email formats. It simply asserts that - # an one (and only one) @ exists in the given string. This is mainly - # to give user feedback and not to assert the e-mail validity. - # config.email_regexp = /\A[^@]+@[^@]+\z/ - - # ==> Configuration for :timeoutable - # The time you want to timeout the user session without activity. After this - # time the user will be asked for credentials again. Default is 30 minutes. - # config.timeout_in = 30.minutes - - # ==> Configuration for :lockable - # Defines which strategy will be used to lock an account. - # :failed_attempts = Locks an account after a number of failed attempts to sign in. - # :none = No lock strategy. You should handle locking by yourself. - config.lock_strategy = :failed_attempts - - # Defines which key will be used when locking and unlocking an account - # config.unlock_keys = [ :email ] - - # Defines which strategy will be used to unlock an account. - # :email = Sends an unlock link to the user email - # :time = Re-enables login after a certain amount of time (see :unlock_in below) - # :both = Enables both strategies - # :none = No unlock strategy. You should handle unlocking by yourself. - config.unlock_strategy = :time - - # Number of authentication tries before locking an account if lock_strategy - # is failed attempts. - config.maximum_attempts = 10 - - # Time interval to unlock the account if :time is enabled as unlock_strategy. - config.unlock_in = 10.minutes - - # ==> Configuration for :recoverable - # - # Defines which key will be used when recovering the password for an account - # config.reset_password_keys = [ :email ] - - # Time interval you can reset your password with a reset password key. - # Don't put a too small interval or your users won't have the time to - # change their passwords. - # When someone else invites you to GitLab this time is also used so it should be pretty long. - config.reset_password_within = 2.days - - # ==> Configuration for :encryptable - # Allow you to use another encryption algorithm besides bcrypt (default). You can use - # :sha1, :sha512 or encryptors from others authentication tools as :clearance_sha1, - # :authlogic_sha512 (then you should set stretches above to 20 for default behavior) - # and :restful_authentication_sha1 (then you should set stretches to 10, and copy - # REST_AUTH_SITE_KEY to pepper) - # config.encryptor = :sha512 - - # Authentication through token does not store user in session and needs - # to be supplied on each request. Useful if you are using the token as API token. - config.skip_session_storage << :token_auth - - # ==> Scopes configuration - # Turn scoped views on. Before rendering "sessions/new", it will first check for - # "users/sessions/new". It's turned off by default because it's slower if you - # are using only default views. - # config.scoped_views = false - - # Configure the default scope given to Warden. By default it's the first - # devise role declared in your routes (usually :user). - # config.default_scope = :user - - # Configure sign_out behavior. - # Sign_out action can be scoped (i.e. /users/sign_out affects only :user scope). - # The default is true, which means any logout action will sign out all active scopes. - # config.sign_out_all_scopes = true - - # ==> Navigation configuration - # Lists the formats that should be treated as navigational. Formats like - # :html, should redirect to the sign in page when the user does not have - # access, but formats like :xml or :json, should return 401. - # - # If you have any extra navigational formats, like :iphone or :mobile, you - # should add them to the navigational formats lists. - # - # The :"*/*" and "*/*" formats below is required to match Internet - # Explorer requests. - # config.navigational_formats = [:"*/*", "*/*", :html] - - # The default HTTP method used to sign out a resource. Default is :delete. - config.sign_out_via = :delete - - # ==> OmniAuth - # To configure a new OmniAuth provider copy and edit omniauth.rb.sample - # selecting the provider you require. - # Check the wiki for more information on setting up on your models - - # ==> Warden configuration - # If you want to use other strategies, that are not supported by Devise, or - # change the failure app, you can configure them inside the config.warden block. - # - # config.warden do |manager| - # manager.failure_app = AnotherApp - # manager.intercept_401 = false - # manager.default_strategies(scope: :user).unshift :some_external_strategy - # end - - if Gitlab::LDAP::Config.enabled? - Gitlab.config.ldap.servers.values.each do |server| - if server['allow_username_or_email_login'] - email_stripping_proc = ->(name) {name.gsub(/@.*\z/,'')} - else - email_stripping_proc = ->(name) {name} - end - - config.omniauth server['provider_name'], - host: server['host'], - base: server['base'], - uid: server['uid'], - port: server['port'], - method: server['method'], - bind_dn: server['bind_dn'], - password: server['password'], - name_proc: email_stripping_proc - end - end - - Gitlab.config.omniauth.providers.each do |provider| - provider_arguments = [] - - %w[app_id app_secret].each do |argument| - provider_arguments << provider[argument] if provider[argument] - end - - case provider['args'] - when Array - # An Array from the configuration will be expanded. - provider_arguments.concat provider['args'] - when Hash - # A Hash from the configuration will be passed as is. - provider_arguments << provider['args'] - end - - config.omniauth provider['name'].to_sym, *provider_arguments - end -end diff --git a/config/initializers/devise_async.rb b/config/initializers/devise_async.rb deleted file mode 100644 index 05a1852cdbd..00000000000 --- a/config/initializers/devise_async.rb +++ /dev/null @@ -1 +0,0 @@ -Devise::Async.backend = :sidekiq diff --git a/config/initializers/devise_password_length.rb.example b/config/initializers/devise_password_length.rb.example deleted file mode 100644 index 97305825e07..00000000000 --- a/config/initializers/devise_password_length.rb.example +++ /dev/null @@ -1,6 +0,0 @@ -Devise.setup do |config| - # The following line changes the password length limits for new users. In the - # example below the minimum length is 12 characters, and the maximum length - # is 128 characters. - config.password_length = 12..128 -end diff --git a/config/initializers/disable_email_interceptor.rb b/config/initializers/disable_email_interceptor.rb deleted file mode 100644 index c76a6b8b19f..00000000000 --- a/config/initializers/disable_email_interceptor.rb +++ /dev/null @@ -1,2 +0,0 @@ -# Interceptor in lib/disable_email_interceptor.rb -ActionMailer::Base.register_interceptor(DisableEmailInterceptor) unless Gitlab.config.gitlab.email_enabled diff --git a/config/initializers/gitlab_shell_secret_token.rb b/config/initializers/gitlab_shell_secret_token.rb deleted file mode 100644 index e7c9f0ba7c2..00000000000 --- a/config/initializers/gitlab_shell_secret_token.rb +++ /dev/null @@ -1,19 +0,0 @@ -# Be sure to restart your server when you modify this file. - -require 'securerandom' - -# Your secret key for verifying the gitlab_shell. - - -secret_file = Rails.root.join('.gitlab_shell_secret') -gitlab_shell_symlink = File.join(Gitlab.config.gitlab_shell.path, '.gitlab_shell_secret') - -unless File.exist? secret_file - # Generate a new token of 16 random hexadecimal characters and store it in secret_file. - token = SecureRandom.hex(16) - File.write(secret_file, token) -end - -if File.exist?(Gitlab.config.gitlab_shell.path) && !File.exist?(gitlab_shell_symlink) - FileUtils.symlink(secret_file, gitlab_shell_symlink) -end diff --git a/config/initializers/haml.rb b/config/initializers/haml.rb deleted file mode 100644 index 7e8ddb3716b..00000000000 --- a/config/initializers/haml.rb +++ /dev/null @@ -1 +0,0 @@ -Haml::Template.options[:ugly] = true diff --git a/config/initializers/inflections.rb b/config/initializers/inflections.rb deleted file mode 100644 index 5d46ece1e1b..00000000000 --- a/config/initializers/inflections.rb +++ /dev/null @@ -1,31 +0,0 @@ -# Be sure to restart your server when you modify this file. - -# Add new inflection rules using the following format -# (all these examples are active by default): -# ActiveSupport::Inflector.inflections do |inflect| -# inflect.plural /^(ox)$/i, '\1en' -# inflect.singular /^(ox)en/i, '\1' -# inflect.irregular 'person', 'people' -# inflect.uncountable %w( fish sheep ) -# end - -# Mark "commits" as uncountable. -# -# Without this change, the routes -# -# resources :commit, only: [:show], constraints: {id: /[[:alnum:]]{6,40}/} -# resources :commits, only: [:show], constraints: {id: /.+/} -# -# would generate identical route helper methods (`project_commit_path`), resulting -# in one of them not getting a helper method at all. -# -# After this change, the helper methods are: -# -# project_commit_path(@project, @project.commit) -# # => "/gitlabhq/commit/bcf03b5de6c33f3869ef70d68cf06e679d1d7f9a -# -# project_commits_path(@project, 'stable/README.md') -# # => "/gitlabhq/commits/stable/README.md" -ActiveSupport::Inflector.inflections do |inflect| - inflect.uncountable %w(commits) -end diff --git a/config/initializers/kaminari_config.rb b/config/initializers/kaminari_config.rb deleted file mode 100644 index 3cbe9a058d7..00000000000 --- a/config/initializers/kaminari_config.rb +++ /dev/null @@ -1,10 +0,0 @@ -Kaminari.configure do |config| - config.default_per_page = 20 - config.max_per_page = 100 - # config.window = 4 - # config.outer_window = 0 - # config.left = 0 - # config.right = 0 - # config.page_method_name = :page - # config.param_name = :page -end diff --git a/config/initializers/postgresql_limit_fix.rb b/config/initializers/postgresql_limit_fix.rb deleted file mode 100644 index 0cb3aaf4d24..00000000000 --- a/config/initializers/postgresql_limit_fix.rb +++ /dev/null @@ -1,26 +0,0 @@ -if defined?(ActiveRecord::ConnectionAdapters::PostgreSQLAdapter) - class ActiveRecord::ConnectionAdapters::PostgreSQLAdapter - class TableDefinition - def text(*args) - options = args.extract_options! - options.delete(:limit) - column_names = args - type = :text - column_names.each { |name| column(name, type, options) } - end - end - - def add_column_with_limit_filter(table_name, column_name, type, options = {}) - options.delete(:limit) if type == :text - add_column_without_limit_filter(table_name, column_name, type, options) - end - - def change_column_with_limit_filter(table_name, column_name, type, options = {}) - options.delete(:limit) if type == :text - change_column_without_limit_filter(table_name, column_name, type, options) - end - - alias_method_chain :add_column, :limit_filter - alias_method_chain :change_column, :limit_filter - end -end diff --git a/config/initializers/public_key.rb b/config/initializers/public_key.rb deleted file mode 100644 index e4f09a2d020..00000000000 --- a/config/initializers/public_key.rb +++ /dev/null @@ -1,2 +0,0 @@ -path = File.expand_path("~/.ssh/bitbucket_rsa.pub") -Gitlab::BitbucketImport.public_key = File.read(path) if File.exist?(path) diff --git a/config/initializers/rack_attack.rb.example b/config/initializers/rack_attack.rb.example deleted file mode 100644 index 332865d2881..00000000000 --- a/config/initializers/rack_attack.rb.example +++ /dev/null @@ -1,26 +0,0 @@ -# 1. Rename this file to rack_attack.rb -# 2. Review the paths_to_be_protected and add any other path you need protecting -# - -paths_to_be_protected = [ - "#{Rails.application.config.relative_url_root}/users/password", - "#{Rails.application.config.relative_url_root}/users/sign_in", - "#{Rails.application.config.relative_url_root}/api/#{API::API.version}/session.json", - "#{Rails.application.config.relative_url_root}/api/#{API::API.version}/session", - "#{Rails.application.config.relative_url_root}/users", - "#{Rails.application.config.relative_url_root}/users/confirmation", - "#{Rails.application.config.relative_url_root}/unsubscribes/" - -] - -# Create one big regular expression that matches strings starting with any of -# the paths_to_be_protected. -paths_regex = Regexp.union(paths_to_be_protected.map { |path| /\A#{Regexp.escape(path)}/ }) - -unless Rails.env.test? - Rack::Attack.throttle('protected paths', limit: 10, period: 60.seconds) do |req| - if req.post? && req.path =~ paths_regex - req.ip - end - end -end diff --git a/config/initializers/rack_attack_git_basic_auth.rb b/config/initializers/rack_attack_git_basic_auth.rb deleted file mode 100644 index bbbfed68329..00000000000 --- a/config/initializers/rack_attack_git_basic_auth.rb +++ /dev/null @@ -1,12 +0,0 @@ -unless Rails.env.test? - # Tell the Rack::Attack Rack middleware to maintain an IP blacklist. We will - # update the blacklist from Grack::Auth#authenticate_user. - Rack::Attack.blacklist('Git HTTP Basic Auth') do |req| - Rack::Attack::Allow2Ban.filter(req.ip, Gitlab.config.rack_attack.git_basic_auth) do - # This block only gets run if the IP was not already banned. - # Return false, meaning that we do not see anything wrong with the - # request at this time - false - end - end -end diff --git a/config/initializers/redis-store-fix-expiry.rb b/config/initializers/redis-store-fix-expiry.rb deleted file mode 100644 index fce0a135330..00000000000 --- a/config/initializers/redis-store-fix-expiry.rb +++ /dev/null @@ -1,44 +0,0 @@ -# Monkey-patch Redis::Store to make 'setex' and 'expire' work with namespacing - -module Gitlab - class Redis - class Store - module Namespace - # Redis::Store#setex in redis-store 1.1.4 does not respect namespaces; - # this new method does. - def setex(key, expires_in, value, options=nil) - namespace(key) { |key| super(key, expires_in, value) } - end - - # Redis::Store#expire in redis-store 1.1.4 does not respect namespaces; - # this new method does. - def expire(key, expires_in) - namespace(key) { |key| super(key, expires_in) } - end - - private - - # Our new definitions of #setex and #expire above assume that the - # #namespace method exists. Because we cannot be sure of that, we - # re-implement the #namespace method from Redis::Store::Namespace so - # that it is available for all Redis::Store instances, whether they use - # namespacing or not. - # - # Based on lib/redis/store/namespace.rb L49-51 (redis-store 1.1.4) - def namespace(key) - if @namespace - yield interpolate(key) - else - # This Redis::Store instance does not use a namespace so we should - # just pass through the key. - yield key - end - end - end - end - end -end - -Redis::Store.class_eval do - include Gitlab::Redis::Store::Namespace -end diff --git a/config/initializers/secret_token.rb b/config/initializers/secret_token.rb deleted file mode 100644 index 62a54bc8c63..00000000000 --- a/config/initializers/secret_token.rb +++ /dev/null @@ -1,26 +0,0 @@ -# Be sure to restart your server when you modify this file. - -require 'securerandom' - -# Your secret key for verifying the integrity of signed cookies. -# If you change this key, all old signed cookies will become invalid! -# Make sure the secret is at least 30 characters and all random, -# no regular words or you'll be exposed to dictionary attacks. - -def find_secure_token - token_file = Rails.root.join('.secret') - if ENV.key?('SECRET_KEY_BASE') - ENV['SECRET_KEY_BASE'] - elsif File.exist? token_file - # Use the existing token. - File.read(token_file).chomp - else - # Generate a new token of 64 random hexadecimal characters and store it in token_file. - token = SecureRandom.hex(64) - File.write(token_file, token) - token - end -end - -Gitlab::Application.config.secret_token = find_secure_token -Gitlab::Application.config.secret_key_base = find_secure_token diff --git a/config/initializers/session_store.rb b/config/initializers/session_store.rb deleted file mode 100644 index b2d59f1c4b7..00000000000 --- a/config/initializers/session_store.rb +++ /dev/null @@ -1,11 +0,0 @@ -# Be sure to restart your server when you modify this file. - -Gitlab::Application.config.session_store( - :redis_store, # Using the cookie_store would enable session replay attacks. - servers: Gitlab::Application.config.cache_store[1].merge(namespace: 'session:gitlab'), # re-use the Redis config from the Rails cache store - key: '_gitlab_session', - secure: Gitlab.config.gitlab.https, - httponly: true, - expire_after: 1.week, - path: (Rails.application.config.relative_url_root.nil?) ? '/' : Rails.application.config.relative_url_root -) diff --git a/config/initializers/smtp_settings.rb.sample b/config/initializers/smtp_settings.rb.sample deleted file mode 100644 index f0fe2fdfa43..00000000000 --- a/config/initializers/smtp_settings.rb.sample +++ /dev/null @@ -1,22 +0,0 @@ -# To enable smtp email delivery for your GitLab instance do the following: -# 1. Rename this file to smtp_settings.rb -# 2. Edit settings inside this file -# 3. Restart GitLab instance -# -# For full list of options and their values see http://api.rubyonrails.org/classes/ActionMailer/Base.html -# - -if Rails.env.production? - Gitlab::Application.config.action_mailer.delivery_method = :smtp - - ActionMailer::Base.smtp_settings = { - address: "email.server.com", - port: 456, - user_name: "smtp", - password: "123456", - domain: "gitlab.company.com", - authentication: :login, - enable_starttls_auto: true, - openssl_verify_mode: 'peer' # See ActionMailer documentation for other possible options - } -end diff --git a/config/initializers/state_machine_patch.rb b/config/initializers/state_machine_patch.rb deleted file mode 100644 index 72d010fa5de..00000000000 --- a/config/initializers/state_machine_patch.rb +++ /dev/null @@ -1,9 +0,0 @@ -# This is a patch to address the issue in https://github.com/pluginaweek/state_machine/issues/251 -# where gem 'state_machine' was not working for Rails 4.1 -module StateMachine - module Integrations - module ActiveModel - public :around_validation - end - end -end diff --git a/config/initializers/static_files.rb b/config/initializers/static_files.rb deleted file mode 100644 index d9042c652bb..00000000000 --- a/config/initializers/static_files.rb +++ /dev/null @@ -1,15 +0,0 @@ -app = Rails.application - -if app.config.serve_static_assets - # The `ActionDispatch::Static` middleware intercepts requests for static files - # by checking if they exist in the `/public` directory. - # We're replacing it with our `Gitlab::Middleware::Static` that does the same, - # except ignoring `/uploads`, letting those go through to the GitLab Rails app. - - app.config.middleware.swap( - ActionDispatch::Static, - Gitlab::Middleware::Static, - app.paths["public"].first, - app.config.static_cache_control - ) -end diff --git a/config/initializers/time_zone.rb b/config/initializers/time_zone.rb deleted file mode 100644 index ee246e67d66..00000000000 --- a/config/initializers/time_zone.rb +++ /dev/null @@ -1 +0,0 @@ -Time.zone = Gitlab.config.gitlab.time_zone || Time.zone diff --git a/config/initializers/wrap_parameters.rb b/config/initializers/wrap_parameters.rb deleted file mode 100644 index 999df20181e..00000000000 --- a/config/initializers/wrap_parameters.rb +++ /dev/null @@ -1,14 +0,0 @@ -# Be sure to restart your server when you modify this file. -# -# This file contains settings for ActionController::ParamsWrapper which -# is enabled by default. - -# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array. -ActiveSupport.on_load(:action_controller) do - wrap_parameters format: [:json] -end - -# Disable root element in JSON by default. -ActiveSupport.on_load(:active_record) do - self.include_root_in_json = false -end diff --git a/config/locales/devise.en.yml b/config/locales/devise.en.yml deleted file mode 100644 index f3db5b7476e..00000000000 --- a/config/locales/devise.en.yml +++ /dev/null @@ -1,60 +0,0 @@ -# Additional translations at http://github.com/plataformatec/devise/wiki/I18n - -en: - errors: - messages: - expired: "has expired, please request a new one" - not_found: "not found" - already_confirmed: "was already confirmed, please try signing in" - not_locked: "was not locked" - not_saved: - one: "1 error prohibited this %{resource} from being saved:" - other: "%{count} errors prohibited this %{resource} from being saved:" - - devise: - failure: - already_authenticated: 'You are already signed in.' - unauthenticated: 'You need to sign in before continuing.' - unconfirmed: 'You have to confirm your account before continuing.' - locked: 'Your account is locked.' - not_found_in_database: 'Invalid email or password.' - invalid: 'Invalid email or password.' - invalid_token: 'Invalid authentication token.' - timeout: 'Your session expired, please sign in again to continue.' - inactive: 'Your account was not activated yet.' - sessions: - signed_in: '' - signed_out: '' - users_sessions: - user: - signed_in: 'Signed in successfully.' - passwords: - send_instructions: 'You will receive an email with instructions about how to reset your password in a few minutes.' - updated: 'Your password was changed successfully. You are now signed in.' - updated_not_active: 'Your password was changed successfully.' - send_paranoid_instructions: "If your e-mail exists on our database, you will receive a password recovery link on your e-mail" - confirmations: - send_instructions: 'You will receive an email with instructions about how to confirm your account in a few minutes.' - send_paranoid_instructions: 'If your e-mail exists on our database, you will receive an email with instructions about how to confirm your account in a few minutes.' - confirmed: 'Your account was successfully confirmed. You are now signed in.' - registrations: - signed_up: 'Welcome! You have signed up successfully.' - updated: 'You updated your account successfully.' - destroyed: 'Bye! Your account was successfully cancelled. We hope to see you again soon.' - signed_up_but_unconfirmed: 'A message with a confirmation link has been sent to your email address. Please open the link to activate your account.' - signed_up_but_inactive: 'You have signed up successfully. However, we could not sign you in because your account is not yet activated.' - signed_up_but_locked: 'You have signed up successfully. However, we could not sign you in because your account is locked.' - unlocks: - send_instructions: 'You will receive an email with instructions about how to unlock your account in a few minutes.' - unlocked: 'Your account was successfully unlocked. You are now signed in.' - send_paranoid_instructions: 'If your account exists, you will receive an email with instructions about how to unlock it in a few minutes.' - omniauth_callbacks: - success: 'Successfully authorized from %{kind} account.' - failure: 'Could not authorize you from %{kind} because "%{reason}".' - mailer: - confirmation_instructions: - subject: 'Confirmation instructions' - reset_password_instructions: - subject: 'Reset password instructions' - unlock_instructions: - subject: 'Unlock Instructions' \ No newline at end of file diff --git a/config/locales/doorkeeper.en.yml b/config/locales/doorkeeper.en.yml deleted file mode 100644 index c5b6b75e7f6..00000000000 --- a/config/locales/doorkeeper.en.yml +++ /dev/null @@ -1,73 +0,0 @@ -en: - activerecord: - errors: - models: - application: - attributes: - redirect_uri: - fragment_present: 'cannot contain a fragment.' - invalid_uri: 'must be a valid URI.' - relative_uri: 'must be an absolute URI.' - mongoid: - errors: - models: - application: - attributes: - redirect_uri: - fragment_present: 'cannot contain a fragment.' - invalid_uri: 'must be a valid URI.' - relative_uri: 'must be an absolute URI.' - mongo_mapper: - errors: - models: - application: - attributes: - redirect_uri: - fragment_present: 'cannot contain a fragment.' - invalid_uri: 'must be a valid URI.' - relative_uri: 'must be an absolute URI.' - doorkeeper: - errors: - messages: - # Common error messages - invalid_request: 'The request is missing a required parameter, includes an unsupported parameter value, or is otherwise malformed.' - invalid_redirect_uri: 'The redirect uri included is not valid.' - unauthorized_client: 'The client is not authorized to perform this request using this method.' - access_denied: 'The resource owner or authorization server denied the request.' - invalid_scope: 'The requested scope is invalid, unknown, or malformed.' - server_error: 'The authorization server encountered an unexpected condition which prevented it from fulfilling the request.' - temporarily_unavailable: 'The authorization server is currently unable to handle the request due to a temporary overloading or maintenance of the server.' - - #configuration error messages - credential_flow_not_configured: 'Resource Owner Password Credentials flow failed due to Doorkeeper.configure.resource_owner_from_credentials being unconfigured.' - resource_owner_authenticator_not_configured: 'Resource Owner find failed due to Doorkeeper.configure.resource_owner_authenticator being unconfiged.' - - # Access grant errors - unsupported_response_type: 'The authorization server does not support this response type.' - - # Access token errors - invalid_client: 'Client authentication failed due to unknown client, no client authentication included, or unsupported authentication method.' - invalid_grant: 'The provided authorization grant is invalid, expired, revoked, does not match the redirection URI used in the authorization request, or was issued to another client.' - unsupported_grant_type: 'The authorization grant type is not supported by the authorization server.' - - # Password Access token errors - invalid_resource_owner: 'The provided resource owner credentials are not valid, or resource owner cannot be found' - - invalid_token: - revoked: "The access token was revoked" - expired: "The access token expired" - unknown: "The access token is invalid" - scopes: - api: Access your API - - flash: - applications: - create: - notice: 'Application created.' - destroy: - notice: 'Application deleted.' - update: - notice: 'Application updated.' - authorized_applications: - destroy: - notice: 'Application revoked.' diff --git a/config/locales/en.yml b/config/locales/en.yml deleted file mode 100644 index f6cfb5efd2a..00000000000 --- a/config/locales/en.yml +++ /dev/null @@ -1,10 +0,0 @@ -# Sample localization file for English. Add more files in this directory for other locales. -# See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points. - -en: - hello: "Hello world" - errors: - messages: - wrong_size: "is the wrong size (should be %{file_size})" - size_too_small: "is too small (should be at least %{file_size})" - size_too_big: "is too big (should be at most %{file_size})" diff --git a/config/newrelic.yml b/config/newrelic.yml deleted file mode 100644 index 9ef922a38d9..00000000000 --- a/config/newrelic.yml +++ /dev/null @@ -1,16 +0,0 @@ -# New Relic configuration file -# -# This file is here to make sure the New Relic gem stays -# quiet by default. -# -# To enable and configure New Relic, please use -# environment variables, e.g. NEW_RELIC_ENABLED=true - -production: - enabled: false - -development: - enabled: false - -test: - enabled: false diff --git a/config/resque.yml.example b/config/resque.yml.example deleted file mode 100644 index 347f3599b20..00000000000 --- a/config/resque.yml.example +++ /dev/null @@ -1,3 +0,0 @@ -development: redis://localhost:6379 -test: redis://localhost:6379 -production: unix:/var/run/redis/redis.sock diff --git a/config/unicorn.rb.example b/config/unicorn.rb.example deleted file mode 100644 index 86a5512e761..00000000000 --- a/config/unicorn.rb.example +++ /dev/null @@ -1,123 +0,0 @@ -# Sample verbose configuration file for Unicorn (not Rack) -# -# This configuration file documents many features of Unicorn -# that may not be needed for some applications. See -# http://unicorn.bogomips.org/examples/unicorn.conf.minimal.rb -# for a much simpler configuration file. -# -# See http://unicorn.bogomips.org/Unicorn/Configurator.html for complete -# documentation. - -# WARNING: See config/application.rb under "Relative url support" for the list of -# other files that need to be changed for relative url support -# -# ENV['RAILS_RELATIVE_URL_ROOT'] = "/gitlab" - -# Read about unicorn workers here: -# http://doc.gitlab.com/ee/install/requirements.html#unicorn-workers -# -worker_processes 3 - -# Since Unicorn is never exposed to outside clients, it does not need to -# run on the standard HTTP port (80), there is no reason to start Unicorn -# as root unless it's from system init scripts. -# If running the master process as root and the workers as an unprivileged -# user, do this to switch euid/egid in the workers (also chowns logs): -# user "unprivileged_user", "unprivileged_group" - -# Help ensure your application will always spawn in the symlinked -# "current" directory that Capistrano sets up. -working_directory "/home/git/gitlab" # available in 0.94.0+ - -# Listen on both a Unix domain socket and a TCP port. -# If you are load-balancing multiple Unicorn masters, lower the backlog -# setting to e.g. 64 for faster failover. -listen "/home/git/gitlab/tmp/sockets/gitlab.socket", :backlog => 1024 -listen "127.0.0.1:8080", :tcp_nopush => true - -# nuke workers after 30 seconds instead of 60 seconds (the default) -# -# NOTICE: git push over http depends on this value. -# If you want be able to push huge amount of data to git repository over http -# you will have to increase this value too. -# -# Example of output if you try to push 1GB repo to GitLab over http. -# -> git push http://gitlab.... master -# -# error: RPC failed; result=18, HTTP code = 200 -# fatal: The remote end hung up unexpectedly -# fatal: The remote end hung up unexpectedly -# -# For more information see http://stackoverflow.com/a/21682112/752049 -# -timeout 60 - -# feel free to point this anywhere accessible on the filesystem -pid "/home/git/gitlab/tmp/pids/unicorn.pid" - -# By default, the Unicorn logger will write to stderr. -# Additionally, some applications/frameworks log to stderr or stdout, -# so prevent them from going to /dev/null when daemonized here: -stderr_path "/home/git/gitlab/log/unicorn.stderr.log" -stdout_path "/home/git/gitlab/log/unicorn.stdout.log" - -# combine Ruby 2.0.0dev or REE with "preload_app true" for memory savings -# http://rubyenterpriseedition.com/faq.html#adapt_apps_for_cow -preload_app true -GC.respond_to?(:copy_on_write_friendly=) and - GC.copy_on_write_friendly = true - -# Enable this flag to have unicorn test client connections by writing the -# beginning of the HTTP headers before calling the application. This -# prevents calling the application for connections that have disconnected -# while queued. This is only guaranteed to detect clients on the same -# host unicorn runs on, and unlikely to detect disconnects even on a -# fast LAN. -check_client_connection false - -before_fork do |server, worker| - # the following is highly recomended for Rails + "preload_app true" - # as there's no need for the master process to hold a connection - defined?(ActiveRecord::Base) and - ActiveRecord::Base.connection.disconnect! - - # The following is only recommended for memory/DB-constrained - # installations. It is not needed if your system can house - # twice as many worker_processes as you have configured. - # - # This allows a new master process to incrementally - # phase out the old master process with SIGTTOU to avoid a - # thundering herd (especially in the "preload_app false" case) - # when doing a transparent upgrade. The last worker spawned - # will then kill off the old master process with a SIGQUIT. - old_pid = "#{server.config[:pid]}.oldbin" - if old_pid != server.pid - begin - sig = (worker.nr + 1) >= server.worker_processes ? :QUIT : :TTOU - Process.kill(sig, File.read(old_pid).to_i) - rescue Errno::ENOENT, Errno::ESRCH - end - end - # - # Throttle the master from forking too quickly by sleeping. Due - # to the implementation of standard Unix signal handlers, this - # helps (but does not completely) prevent identical, repeated signals - # from being lost when the receiving process is busy. - # sleep 1 -end - -after_fork do |server, worker| - # per-process listener ports for debugging/admin/migrations - # addr = "127.0.0.1:#{9293 + worker.nr}" - # server.listen(addr, :tries => -1, :delay => 5, :tcp_nopush => true) - - # the following is *required* for Rails + "preload_app true", - defined?(ActiveRecord::Base) and - ActiveRecord::Base.establish_connection - - # if preload_app is true, then you may also want to check and - # restart any other shared sockets/descriptors such as Memcached, - # and Redis. TokyoCabinet file handles are safe to reuse - # between any number of forked children (assuming your kernel - # correctly implements pread()/pwrite() system calls) -end diff --git a/config/unicorn.rb.example.development b/config/unicorn.rb.example.development deleted file mode 100644 index 3cd00d53a15..00000000000 --- a/config/unicorn.rb.example.development +++ /dev/null @@ -1,2 +0,0 @@ -worker_processes 2 -timeout 60 -- cgit v1.2.3