gitlab-org--gitlab-foss/lib
Rémy Coutable 71672dfa6a
Return an ApplicationSetting in CurrentSettings
This replaces the use of fake_application_settings with
`::ApplicationSetting.build`_from_defaults. The reason is that
`fake_application_settings` doesn't have the custom accessors that
`ApplicationSetting` has, e.g. `#commit_email_hostname`, thus this
can lead to unexpected `nil` values which comes from the database
column instead of `.default_commit_email_hostname` returned by
`ApplicationSetting#commit_email_hostname`.

Using `::ApplicationSetting.build_from_defaults` should be safe as it
doesn't try to `INSERT` a DB record, in contrary to
`::ApplicationSetting.create_from_defaults` which we used to use, and
which created issues that the introduction of
`fake_application_settings` tried to resolve (575dced5).

Signed-off-by: Rémy Coutable <remy@rymai.me>
2018-12-19 11:24:53 +01:00
..
api Hide confidential events in ruby 2018-12-17 18:47:53 +01:00
assets
backup Restore Object Pools when restoring an object pool 2018-12-13 09:00:03 +01:00
banzai Remove feature flag for suggest changes feature 2018-12-18 11:18:21 -02:00
bitbucket
bitbucket_server
constraints Pass on arguments passed to the FeatureConstrainer 2018-12-14 14:35:05 +01:00
container_registry
declarative_policy
flowdock
generators/rails/post_deployment_migration
gitaly
gitlab Return an ApplicationSetting in CurrentSettings 2018-12-19 11:24:53 +01:00
google_api
haml_lint
json_web_token
mattermost
microsoft_teams
object_storage
omni_auth/strategies Support RSA and ECDSA algorithms in Omniauth JWT 2018-12-05 18:17:40 +01:00
peek
quality
rouge
rspec_flaky
support
system_check Extract system check rake task logic 2018-12-03 13:51:46 -08:00
tasks Fix gitlab:web_hook tasks 2018-12-06 18:37:05 +00:00
after_commit_queue.rb
backup.rb
banzai.rb
carrier_wave_string_file.rb
declarative_policy.rb Remove rails4 specific code 2018-12-16 10:48:41 +01:00
event_filter.rb
expand_variables.rb
extracts_path.rb Remove options assignment from ExtractsPath 2018-11-27 12:07:02 -06:00
feature.rb
file_size_validator.rb
forever.rb
gitlab.rb
gt_one_coercion.rb
milestone_array.rb
mysql_zero_date.rb Remove rails4 specific code 2018-12-16 10:48:41 +01:00
static_model.rb
system_check.rb
unfold_form.rb
uploaded_file.rb
version_check.rb Use class methods for VersionCheck 2018-12-14 13:56:03 -06:00