diff options
author | Phil Hughes <me@iamphill.com> | 2017-05-03 17:04:47 +0100 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2017-05-03 17:04:47 +0100 |
commit | f29e5d4d93123ea73e5f58be46020781af2ef7cb (patch) | |
tree | d08a8f8e5a9cf30dd4f238c187673ffe30ac39b3 /config | |
parent | 4134d700623404948f163349882caf4a6d940cf3 (diff) | |
parent | 8f29bf96b9306fd95b9b98019e80173b47b3a6b8 (diff) | |
download | gitlab-ce-f29e5d4d93123ea73e5f58be46020781af2ef7cb.tar.gz |
Merge branch 'master' into deploy-keys-load-async
Diffstat (limited to 'config')
-rw-r--r-- | config/initializers/active_record_query_trace.rb | 5 | ||||
-rw-r--r-- | config/initializers/carrierwave.rb | 2 | ||||
-rw-r--r-- | config/initializers/rspec_profiling.rb | 8 | ||||
-rw-r--r-- | config/routes/admin.rb | 6 | ||||
-rw-r--r-- | config/routes/group.rb | 8 | ||||
-rw-r--r-- | config/routes/project.rb | 9 | ||||
-rw-r--r-- | config/routes/snippets.rb | 11 | ||||
-rw-r--r-- | config/webpack.config.js | 5 |
8 files changed, 38 insertions, 16 deletions
diff --git a/config/initializers/active_record_query_trace.rb b/config/initializers/active_record_query_trace.rb deleted file mode 100644 index 4b3c2803b3b..00000000000 --- a/config/initializers/active_record_query_trace.rb +++ /dev/null @@ -1,5 +0,0 @@ -if ENV['ENABLE_QUERY_TRACE'] - require 'active_record_query_trace' - - ActiveRecordQueryTrace.enabled = 'true' -end diff --git a/config/initializers/carrierwave.rb b/config/initializers/carrierwave.rb index 1933afcbfb1..cd7df44351a 100644 --- a/config/initializers/carrierwave.rb +++ b/config/initializers/carrierwave.rb @@ -6,6 +6,8 @@ if File.exist?(aws_file) AWS_CONFIG = YAML.load(File.read(aws_file))[Rails.env] CarrierWave.configure do |config| + config.fog_provider = 'fog/aws' + config.fog_credentials = { provider: 'AWS', # required aws_access_key_id: AWS_CONFIG['access_key_id'], # required diff --git a/config/initializers/rspec_profiling.rb b/config/initializers/rspec_profiling.rb index b909cc5b9a4..a7efd74f09e 100644 --- a/config/initializers/rspec_profiling.rb +++ b/config/initializers/rspec_profiling.rb @@ -36,10 +36,10 @@ if Rails.env.test? RspecProfiling::Collectors::PSQL.prepend(RspecProfilingExt::PSQL) config.collector = RspecProfiling::Collectors::PSQL end - end - if ENV.has_key?('CI') && ENV['GITLAB_DATABASE'] == 'postgresql' - RspecProfiling::VCS::Git.prepend(RspecProfilingExt::Git) - RspecProfiling::Run.prepend(RspecProfilingExt::Run) + if ENV.key?('CI') + RspecProfiling::VCS::Git.prepend(RspecProfilingExt::Git) + RspecProfiling::Run.prepend(RspecProfilingExt::Run) + end end end diff --git a/config/routes/admin.rb b/config/routes/admin.rb index 52ba10604d4..48993420ed9 100644 --- a/config/routes/admin.rb +++ b/config/routes/admin.rb @@ -50,8 +50,10 @@ namespace :admin do resources :deploy_keys, only: [:index, :new, :create, :destroy] - resources :hooks, only: [:index, :create, :destroy] do - get :test + resources :hooks, only: [:index, :create, :edit, :update, :destroy] do + member do + get :test + end end resources :broadcast_messages, only: [:index, :edit, :create, :update, :destroy] do diff --git a/config/routes/group.rb b/config/routes/group.rb index 73f69d76995..7b29e0e807c 100644 --- a/config/routes/group.rb +++ b/config/routes/group.rb @@ -10,7 +10,13 @@ scope(path: 'groups/*group_id', end resource :avatar, only: [:destroy] - resources :milestones, constraints: { id: /[^\/]+/ }, only: [:index, :show, :update, :new, :create] + resources :milestones, constraints: { id: /[^\/]+/ }, only: [:index, :show, :update, :new, :create] do + member do + get :merge_requests + get :participants + get :labels + end + end resources :labels, except: [:show] do post :toggle_subscription, on: :member diff --git a/config/routes/project.rb b/config/routes/project.rb index 115ae2324b3..a15e365cc2f 100644 --- a/config/routes/project.rb +++ b/config/routes/project.rb @@ -44,7 +44,7 @@ constraints(ProjectUrlConstrainer.new) do resources :snippets, concerns: :awardable, constraints: { id: /\d+/ } do member do - get 'raw' + get :raw post :mark_as_spam end end @@ -138,6 +138,8 @@ constraints(ProjectUrlConstrainer.new) do collection do get :folder, path: 'folders/*id', constraints: { format: /(html|json)/ } end + + resources :deployments, only: [:index] end resource :cycle_analytics, only: [:show] @@ -185,7 +187,7 @@ constraints(ProjectUrlConstrainer.new) do end end - resources :hooks, only: [:index, :create, :destroy], constraints: { id: /\d+/ } do + resources :hooks, only: [:index, :create, :edit, :update, :destroy], constraints: { id: /\d+/ } do member do get :test end @@ -205,6 +207,9 @@ constraints(ProjectUrlConstrainer.new) do member do put :sort_issues put :sort_merge_requests + get :merge_requests + get :participants + get :labels end end diff --git a/config/routes/snippets.rb b/config/routes/snippets.rb index 56534f677be..dae83734fe6 100644 --- a/config/routes/snippets.rb +++ b/config/routes/snippets.rb @@ -1,10 +1,17 @@ resources :snippets, concerns: :awardable do member do - get 'raw' - get 'download' + get :raw post :mark_as_spam post :preview_markdown end + + scope module: :snippets do + resources :notes, only: [:index, :create, :destroy, :update], concerns: :awardable, constraints: { id: /\d+/ } do + member do + delete :delete_attachment + end + end + end end get '/s/:username', to: redirect('/u/%{username}/snippets'), diff --git a/config/webpack.config.js b/config/webpack.config.js index 1721d275685..742d22d0c1f 100644 --- a/config/webpack.config.js +++ b/config/webpack.config.js @@ -79,6 +79,11 @@ var config = { loader: 'raw-loader', }, { + test: /\.gif$/, + loader: 'url-loader', + query: { mimetype: 'image/gif' }, + }, + { test: /\.(worker\.js|pdf)$/, exclude: /node_modules/, loader: 'file-loader', |