diff options
Diffstat (limited to 'config')
-rw-r--r-- | config/application.rb | 2 | ||||
-rw-r--r-- | config/gitlab.yml.example | 4 | ||||
-rw-r--r-- | config/initializers/1_settings.rb | 4 | ||||
-rw-r--r-- | config/initializers/rspec_profiling.rb | 2 | ||||
-rw-r--r-- | config/initializers/sidekiq.rb | 2 | ||||
-rw-r--r-- | config/karma.config.js | 34 | ||||
-rw-r--r-- | config/routes/dashboard.rb | 1 | ||||
-rw-r--r-- | config/webpack.config.js | 15 |
8 files changed, 29 insertions, 35 deletions
diff --git a/config/application.rb b/config/application.rb index 98b2759a8a7..f9f01b66473 100644 --- a/config/application.rb +++ b/config/application.rb @@ -92,6 +92,8 @@ module Gitlab # Enable the asset pipeline config.assets.enabled = true + # Support legacy unicode file named img emojis, `1F939.png` + config.assets.paths << Gemojione.images_path config.assets.paths << "vendor/assets/fonts" config.assets.precompile << "*.png" config.assets.precompile << "print.css" diff --git a/config/gitlab.yml.example b/config/gitlab.yml.example index 954809a882c..ba7f6773985 100644 --- a/config/gitlab.yml.example +++ b/config/gitlab.yml.example @@ -157,8 +157,8 @@ production: &base host: example.com port: 80 # Set to 443 if you serve the pages with HTTPS https: false # Set to true if you serve the pages with HTTPS - # external_http: "1.1.1.1:80" # If defined, enables custom domain support in GitLab Pages - # external_https: "1.1.1.1:443" # If defined, enables custom domain and certificate support in GitLab Pages + # external_http: ["1.1.1.1:80", "[2001::1]:80"] # If defined, enables custom domain support in GitLab Pages + # external_https: ["1.1.1.1:443", "[2001::1]:443"] # If defined, enables custom domain and certificate support in GitLab Pages ## Mattermost ## For enabling Add to Mattermost button diff --git a/config/initializers/1_settings.rb b/config/initializers/1_settings.rb index d049ae9476f..62020fa9a75 100644 --- a/config/initializers/1_settings.rb +++ b/config/initializers/1_settings.rb @@ -278,8 +278,8 @@ Settings.pages['host'] ||= "example.com" Settings.pages['port'] ||= Settings.pages.https ? 443 : 80 Settings.pages['protocol'] ||= Settings.pages.https ? "https" : "http" Settings.pages['url'] ||= Settings.send(:build_pages_url) -Settings.pages['external_http'] ||= false if Settings.pages['external_http'].nil? -Settings.pages['external_https'] ||= false if Settings.pages['external_https'].nil? +Settings.pages['external_http'] ||= false unless Settings.pages['external_http'].present? +Settings.pages['external_https'] ||= false unless Settings.pages['external_https'].present? # # Git LFS diff --git a/config/initializers/rspec_profiling.rb b/config/initializers/rspec_profiling.rb index ac353d14499..70177995356 100644 --- a/config/initializers/rspec_profiling.rb +++ b/config/initializers/rspec_profiling.rb @@ -7,7 +7,7 @@ module RspecProfilingExt module Git def branch - ENV['CI_BUILD_REF_NAME'] || super + ENV['CI_COMMIT_REF_NAME'] || super end end diff --git a/config/initializers/sidekiq.rb b/config/initializers/sidekiq.rb index 2b018c68703..ecd73956488 100644 --- a/config/initializers/sidekiq.rb +++ b/config/initializers/sidekiq.rb @@ -42,7 +42,7 @@ Sidekiq.configure_server do |config| Gitlab::SidekiqThrottler.execute! - config = ActiveRecord::Base.configurations[Rails.env] || + config = Gitlab::Database.config || Rails.application.config.database_configuration[Rails.env] config['pool'] = Sidekiq.options[:concurrency] ActiveRecord::Base.establish_connection(config) diff --git a/config/karma.config.js b/config/karma.config.js index a23e62f5022..eb082dd28bf 100644 --- a/config/karma.config.js +++ b/config/karma.config.js @@ -3,17 +3,6 @@ var webpack = require('webpack'); var webpackConfig = require('./webpack.config.js'); var ROOT_PATH = path.resolve(__dirname, '..'); -// add coverage instrumentation to babel config -if (webpackConfig.module && webpackConfig.module.rules) { - var babelConfig = webpackConfig.module.rules.find(function (rule) { - return rule.loader === 'babel-loader'; - }); - - babelConfig.options = babelConfig.options || {}; - babelConfig.options.plugins = babelConfig.options.plugins || []; - babelConfig.options.plugins.push('istanbul'); -} - // remove problematic plugins if (webpackConfig.plugins) { webpackConfig.plugins = webpackConfig.plugins.filter(function (plugin) { @@ -27,7 +16,8 @@ if (webpackConfig.plugins) { // Karma configuration module.exports = function(config) { var progressReporter = process.env.CI ? 'mocha' : 'progress'; - config.set({ + + var karmaConfig = { basePath: ROOT_PATH, browsers: ['PhantomJS'], frameworks: ['jasmine'], @@ -36,16 +26,22 @@ module.exports = function(config) { { pattern: 'spec/javascripts/fixtures/**/*@(.json|.html|.html.raw)', included: false }, ], preprocessors: { - 'spec/javascripts/**/*.js?(.es6)': ['webpack', 'sourcemap'], + 'spec/javascripts/**/*.js': ['webpack', 'sourcemap'], }, - reporters: [progressReporter, 'coverage-istanbul'], - coverageIstanbulReporter: { + reporters: [progressReporter], + webpack: webpackConfig, + webpackMiddleware: { stats: 'errors-only' }, + }; + + if (process.env.BABEL_ENV === 'coverage' || process.env.NODE_ENV === 'coverage') { + karmaConfig.reporters.push('coverage-istanbul'); + karmaConfig.coverageIstanbulReporter = { reports: ['html', 'text-summary'], dir: 'coverage-javascript/', subdir: '.', fixWebpackSourcePaths: true - }, - webpack: webpackConfig, - webpackMiddleware: { stats: 'errors-only' }, - }); + }; + } + + config.set(karmaConfig); }; diff --git a/config/routes/dashboard.rb b/config/routes/dashboard.rb index adc3ad207cc..8e380a0b0ac 100644 --- a/config/routes/dashboard.rb +++ b/config/routes/dashboard.rb @@ -13,6 +13,7 @@ resource :dashboard, controller: 'dashboard', only: [] do resources :todos, only: [:index, :destroy] do collection do delete :destroy_all + patch :bulk_restore end member do patch :restore diff --git a/config/webpack.config.js b/config/webpack.config.js index 71d9042712a..9753828fe5a 100644 --- a/config/webpack.config.js +++ b/config/webpack.config.js @@ -35,6 +35,7 @@ var config = { issuable: './issuable/issuable_bundle.js', merge_conflicts: './merge_conflicts/merge_conflicts_bundle.js', merge_request_widget: './merge_request_widget/ci_bundle.js', + monitoring: './monitoring/monitoring_bundle.js', network: './network/network_bundle.js', profile: './profile/profile_bundle.js', protected_branches: './protected_branches/protected_branches_bundle.js', @@ -57,15 +58,9 @@ var config = { module: { rules: [ { - test: /\.(js|es6)$/, + test: /\.js$/, exclude: /(node_modules|vendor\/assets)/, - loader: 'babel-loader', - options: { - presets: [ - ["es2015", {"modules": false}], - 'stage-2' - ] - } + loader: 'babel-loader' }, { test: /\.svg$/, @@ -121,7 +116,7 @@ var config = { // create cacheable common library bundle for all d3 chunks new webpack.optimize.CommonsChunkPlugin({ name: 'common_d3', - chunks: ['graphs', 'users'], + chunks: ['graphs', 'users', 'monitoring'], }), // create cacheable common library bundles @@ -131,7 +126,7 @@ var config = { ], resolve: { - extensions: ['.js', '.es6', '.js.es6'], + extensions: ['.js'], alias: { '~': path.join(ROOT_PATH, 'app/assets/javascripts'), 'emojis': path.join(ROOT_PATH, 'fixtures/emojis'), |