summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorMike Greiling <mike@pixelcog.com>2017-01-28 11:25:15 -0600
committerMike Greiling <mike@pixelcog.com>2017-01-28 11:25:15 -0600
commitc454dec170da32fc83b8d78c61c3f452c819f0ed (patch)
treedf05c491f06e845a0e8266afcb23962e95160a4a /config
parenta5f7934420e1d26682700e02aa8fc9333e808f47 (diff)
parentb78d06b78143b16dccc5d5afaa8796473b68bea1 (diff)
downloadgitlab-ce-c454dec170da32fc83b8d78c61c3f452c819f0ed.tar.gz
Merge branch 'master' into go-go-gadget-webpack
* master: (33 commits) Improved code style on the issue_sidebar_spec.rb add CHAGELOG.md entry for !8831 remove assets:compile step from relative_url docs update scripts and docs to reference the newly namespaced rake task namespace assets rake tasks to gitlab:assets:* correct gzip files if they exist as well automatically correct CSS urls on assets:precompile remove hard-coded assets path for ace editor modules Fixed cancel button in the services form not redirecting back to the integrations settings view Fix search bar search param encoding Fix a transient failure in the `Explore::ProjectsController` spec Fix filtering with multiple words Fix project name label's for reference in project settings Fixed merge request tabs extra margin Don't call `#uniq` on a relation Move Gitlab::Shell and Gitlab::ShellAdapter files to lib/ Move ApplicationSetting DEFAULTS to `.defaults` instead Move a begin/rescue clause to ApplicationSetting.expire Use badge partial as single source of truth instead of having 2 partials doing the same Changes after review ...
Diffstat (limited to 'config')
-rw-r--r--config/initializers/1_settings.rb8
-rw-r--r--config/initializers/5_backend.rb6
-rw-r--r--config/initializers/rspec_profiling.rb14
3 files changed, 15 insertions, 13 deletions
diff --git a/config/initializers/1_settings.rb b/config/initializers/1_settings.rb
index 906ec11f012..4f33aad8693 100644
--- a/config/initializers/1_settings.rb
+++ b/config/initializers/1_settings.rb
@@ -419,10 +419,4 @@ if Rails.env.test?
end
# Force a refresh of application settings at startup
-begin
- ApplicationSetting.expire
- Ci::ApplicationSetting.expire
-rescue
- # Gracefully handle when Redis is not available. For example,
- # omnibus may fail here during assets:precompile.
-end
+ApplicationSetting.expire
diff --git a/config/initializers/5_backend.rb b/config/initializers/5_backend.rb
index ed88c8ee1b8..2bd159ca7f1 100644
--- a/config/initializers/5_backend.rb
+++ b/config/initializers/5_backend.rb
@@ -1,9 +1,3 @@
-# GIT over SSH
-require_dependency Rails.root.join('lib/gitlab/backend/shell')
-
-# GitLab shell adapter
-require_dependency 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)
diff --git a/config/initializers/rspec_profiling.rb b/config/initializers/rspec_profiling.rb
new file mode 100644
index 00000000000..f462e654b2c
--- /dev/null
+++ b/config/initializers/rspec_profiling.rb
@@ -0,0 +1,14 @@
+module RspecProfilingConnection
+ def establish_connection
+ ::RspecProfiling::Collectors::PSQL::Result.establish_connection(ENV['RSPEC_PROFILING_POSTGRES_URL'])
+ end
+end
+
+if Rails.env.test?
+ RspecProfiling.configure do |config|
+ if ENV['RSPEC_PROFILING_POSTGRES_URL']
+ RspecProfiling::Collectors::PSQL.prepend(RspecProfilingConnection)
+ config.collector = RspecProfiling::Collectors::PSQL
+ end
+ end
+end