Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-02-02use Gitlab::UserSettings directly as a singleton instead of ↵Mario de la Ossa
including/extending it
2017-11-22Move ModuleWithInstanceVariables to Gitlab namespaceLin Jen-Shin
And use .rubocop.yml to exclude paths we don't care, rather than using the cop itself to exclude.
2017-11-17Use StrongMemoize and enable/disable cops properlyLin Jen-Shin
2017-09-18Add cop to make sure we don't use ivar in a moduleLin Jen-Shin
2017-08-31`current_application_settings` belongs on `Gitlab::CurrentSettings`Sean McGivern
The initializers including this were doing so at the top level, so every object loaded after them had a `current_application_settings` method. However, if someone had rack-attack enabled (which was loaded before these initializers), it would try to load the API, and fail, because `Gitlab::CurrentSettings` didn't have that method. To fix this: 1. Don't include `Gitlab::CurrentSettings` at the top level. We do not need `Object.new.current_application_settings` to work. 2. Make `Gitlab::CurrentSettings` explicitly `extend self`, as we already use it like that in several places. 3. Change the initializers to use that new form.
2017-07-11Repair Regression caused by - !11573Paul Charlton
some changes introduced by 4daa6da5407d235cbe4f7a787eaa29304446a870, 26b6e299e1c97b956306572c5c9f6c02f428bfd7, 17898ce021fc365c620d4600df68c3e7d2151619 were regressed during today's merge conflict resolution of !11573. This commit serves to reapply those changes. /cc: @rspeicher @stanhu @mikegreiling
2017-07-11Support multiple Redis instances based on queue typePaul Charlton
2017-07-11Merge branch 'master' into 'catch-redis-address-error'DJ Mountney
# Conflicts: # lib/gitlab/current_settings.rb
2017-07-10Prevent bad data being added to application settings when Redis is unavailableNick Thomas
2017-06-28Add additional error caching for redis when using a tcp address toDJ Mountney
connect instead of a socket This helps with compiling gitlab assets without a redis server (used during omnibus build)
2017-06-21Change references from ApplicationSetting to ::ApplicationSetting to make ↵Stan Hu
autoload happier Closes #34047
2017-06-19If migrations are pending, make CurrentSettings use existing values and ↵Stan Hu
populate missing columns with defaults master was failing because `ApplicationSetting.create_from_defaults` attempted to write to a column that did not exist in the database. This occurred in a `rake db:migrate` task, which was unable to perform the migration that would have added the missing column in the first place. In 9.3 RC2, we also had a bug where password sign-ins were disabled because there were many pending migrations. The problem occurred because `fake_application_settings` was being returned with an OpenStruct that did not include the predicate method `signup_enabled?`. As a result, the value would erroneously return `nil` instead of `true`. This commit uses the values of the defaults to mimic this behavior. This commit also refactors some of the logic to be clearer.
2017-06-19Revert "Merge branch 'rs-revert-11842' into 'master'"Stan Hu
This reverts commit ad521bde1bb556709edd39d8a9aa67ee47605b91, reversing changes made to 3a38e5f1ab914bc4eaeecda6e18caaa7ca9ea5a7.
2017-06-16Partially revert 1e8dbd46Robert Speicher
See https://gitlab.com/gitlab-org/gitlab-ce/issues/33736#note_32561501
2017-06-06redesign caching of application settingsPaul Charlton
2017-06-02Skip loading application settings from the database when migrations are pendingNick Thomas
Various Rails initializers (metrics, sentry, etc) are run before migrations, which can lead to a mismatch between app/models/application_settings.rb and schema.
2017-02-23Enable Rails/DelegateDouwe Maan
2017-01-27Move ApplicationSetting DEFAULTS to `.defaults` insteadRémy Coutable
This will avoid autoloading issues in the long term. Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-01-23Rescue from ActiveRecord::UnknownAttributeError and fallback to fake settingsRémy Coutable
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-01-23Revert "Merge branch 'revert-9cac0317' into 'master' "Grzegorz Bizon
This reverts commit c20934869f7dc8cfbdbafb6ecb7b1305452c9e8a, reversing changes made to 4b7ec44b91e0571d209c790d54947ba1756dac0e.
2017-01-22Revert "Merge branch 'dont-persist-application-settings-in-test-env' into ↵Grzegorz Bizon
'master'" This reverts merge request !8573
2017-01-21Revert "Merge branch 'backport-fix-load-error' into 'master'"Stan Hu
This reverts merge request !8671
2017-01-20Don't define ApplicationSetting defaults in a constantRémy Coutable
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-01-15Don't persist ApplicationSetting in test envRémy Coutable
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-01-15Move default values to ApplicationSetting::DEFAULTS and use it in ↵Rémy Coutable
CurrentSettings Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-01-12Add support for PlantUML diagrams in Asciidoc.Horacio Sanson
This MR enables rendering of PlantUML diagrams in Asciidoc documents. To add a PlantUML diagram all we need is to include a plantuml block like: ``` [plantuml, id="myDiagram", width="100px", height="100px"] -- bob -> alice : ping alice -> bob : pong -- ``` The plantuml block is substituted by an HTML img element with *src* pointing to an external PlantUML server. This MR also add a PlantUML integration section to the Administrator -> Settings page to configure the PlantUML rendering service and to enable/disable it. Closes: #17603
2016-12-19Rename Gogs to Gitea, DRY the controller and improve viewsRémy Coutable
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-12-19Gogs ImporterKim "BKC" Carlbäcker
2016-11-13Only turn on Sidekiq throttling if application settings existsStan Hu
If the database has not been migrated properly, the initializer for Sidekiq will fail to start and cause the whole Rails server to crash. This change checks the existence for the column and allows Rails to start even if the setting has not been added as a database column. Closes #24452
2016-11-10Allow the Sidekiq queues to throttle and the factor by which to throttle ↵Patricio Cano
them to be configurable
2016-11-10Allow certain Sidekiq jobs to be throttledPatricio Cano
2016-09-23Remove use of `USE_DB` environment variable in codeGrzegorz Bizon
2016-09-22Update `CurrentSettings` class that uses ENVGrzegorz Bizon
2016-08-25Remove gitoriousZ.J. van de Weg
2016-08-19Support integration with Koding (online IDE)Gokmen Goksel
Koding: #index: landing page for Koding integration If enabled it will provide a link to open remote Koding instance url for now we are also providing the sneak preview video for how integration works in detail. Repository: check whether .koding.yml file exists on repository Projects: landing page: show Run in IDE (Koding) button if repo has stack file Projects: MR: show Run in IDE Koding button if repo has stack file on active branch ProjectHelpers: add_koding_stack: stack generator for provided project With this helper we will auto-generate the required stack template for a given project. For the feature we can request this base template from the running Koding instance on integration. Currently this will provide users to create a t2.nano instance on aws and it'll automatically configures the instance for basic requirements. Projects: empty state and landing page provide shortcuts to create stack projects_helper: use branch on checkout and provide an entry point This ${var.koding_queryString_branch} will be replaced with the branch provided in query string which will allow us to use same stack template for different branches of the same repository. ref: https://github.com/koding/koding/pull/8597/commits/b8c0e43c4c24bf132670aa8a3cfb0d634acfd09b projects_helper: provide sha info in query string to use existing vms With this change we'll be able to query existing vms on Koding side based on the commit id that they've created. ref: https://github.com/koding/koding/pull/8597/commits/1d630fadf31963fa6ccd3bed92e526761a30a343 Integration: Docs: Koding documentation added Disable /koding route if integration is disabled Use application settings to enable Koding Projects_helper: better indentation with strip_heredoc usage Projects_helper: return koding_url as is if there is no project provided current_settings: set koding_enabled: false by default Koding_Controller: to render not_found once integration is disabled Dashboard_specs: update spec for Koding enabled case Projects_Helper: make repo dynamic ref: https://github.com/koding/koding/pull/8597/commits/4d615242f45aaea4c4986be84ecc612b0bb1514c Updated documentation to have right format
2016-07-19Refactor and rename `restricted_signup_domains` to `domain_whitelist` to ↵Patricio Cano
better conform to its behavior and newly introduced behavior.
2016-07-07Added setting to set new users by default as externalDravere
As requested by the issue #14508 this adds an option in the application settings to set newly registered users by default as external. The default setting is set to false to stay backward compatible.
2016-06-30Handle case when Redis cache returns an empty settingStan Hu
2016-06-30Fix database migrations when Redis is not runningStan Hu
If Redis were not running or USE_DB were set to false, the application settings retrieval would fail completely. This change only attempts to use the cache if the system actually wants to connect to the DB and rescues any failures in talking to Redis. Closes #17557
2016-06-17a few changes based on MR feedbackJames Lopez
2016-06-13Merge branches 'feature/project-export-ui-experimental' and ↵James Lopez
'feature/project-import' of gitlab.com:gitlab-org/gitlab-ce into feature/project-export-ui-experimental # Conflicts: # Gemfile.lock # app/helpers/todos_helper.rb # app/models/todo.rb # app/views/projects/edit.html.haml # lib/gitlab/import_export/import_service.rb
2016-06-08Allow custom text on 'almost there' pageSean McGivern
Add a new application setting, after_sign_up_text. This is text to be rendered as Markdown and shown on the 'almost there' page after a user signs up, but before they've confirmed their account. Tweak the styles for that page so that centered lists look reasonable.
2016-06-01Merge branch 'current-settings-use-request-store-during-request'Douwe Maan
2016-05-31Add Application Setting to configure Container Registry token expire delay ↵Kamil Trzcinski
(default 5min)
2016-05-29Try and use cache for application settings even when the db is not connectedDJ Mountney
2016-05-28Only use RequestStore for current_application_settings during a requestDJ Mountney
This fixes an issue where the RequestStore was being populated with the settings in the unicorn master during the rails initializers. Each forked worker would then start their first request with an uncleaned RequestStore.
2016-04-22gitlab import UI - icon, file selector, etc... Also updated font-awesome and ↵James Lopez
modified import source settings.
2016-04-12Add a 'circuit breaker' for repo checksJacob Vosmaer
2016-04-01Remove "Congratulations!" tweet button on newly-created project.connorshea
I’ve removed everything related to the feature based on this commit: ce08f919f34fd8849834365 Resolves #10857.
2016-02-08Fix CurrentSettings autoload bug in development.Jason Lee
Error: A copy of Gitlab::CurrentSettings has been removed from the module tree but is still active