diff options
311 files changed, 1117 insertions, 258 deletions
@@ -345,14 +345,14 @@ group :development, :test do # Generate Fake data gem 'ffaker', '~> 2.10' - gem 'capybara', '~> 2.16.1' - gem 'capybara-screenshot', '~> 1.0.18' - gem 'selenium-webdriver', '~> 3.12' + gem 'capybara', '~> 2.18.0' + gem 'capybara-screenshot', '~> 1.0.22' + gem 'selenium-webdriver', '~> 3.141' gem 'spring', '~> 2.0.0' gem 'spring-commands-rspec', '~> 1.0.4' - gem 'gitlab-styles', '~> 2.4', require: false + gem 'gitlab-styles', '~> 2.5', require: false # Pin these dependencies, otherwise a new rule could break the CI pipelines gem 'rubocop', '~> 0.54.0' gem 'rubocop-rspec', '~> 1.22.1' diff --git a/Gemfile.lock b/Gemfile.lock index 3314a769949..c1d1a50799f 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -100,13 +100,13 @@ GEM bundler (~> 1.2) thor (~> 0.18) byebug (9.1.0) - capybara (2.16.1) + capybara (2.18.0) addressable mini_mime (>= 0.1.3) nokogiri (>= 1.3.3) rack (>= 1.0.0) rack-test (>= 0.5.4) - xpath (~> 2.0) + xpath (>= 2.0, < 4.0) capybara-screenshot (1.0.22) capybara (>= 1.0, < 4) launchy @@ -289,7 +289,7 @@ GEM gitlab-markup (1.7.0) gitlab-sidekiq-fetcher (0.4.0) sidekiq (~> 5) - gitlab-styles (2.5.1) + gitlab-styles (2.5.2) rubocop (~> 0.54.0) rubocop-gitlab-security (~> 0.1.0) rubocop-rspec (~> 1.19) @@ -488,7 +488,7 @@ GEM net-ssh (5.0.1) netrc (0.11.0) nio4r (2.3.1) - nokogiri (1.10.1) + nokogiri (1.10.2) mini_portile2 (~> 2.4.0) nokogumbo (1.5.0) nokogiri @@ -706,7 +706,7 @@ GEM redis-store (>= 1.2, < 2) redis-store (1.6.0) redis (>= 2.2, < 5) - regexp_parser (1.3.0) + regexp_parser (1.4.0) regexp_property_values (0.3.4) representable (3.0.4) declarative (< 0.1.0) @@ -815,9 +815,9 @@ GEM seed-fu (2.3.7) activerecord (>= 3.1) activesupport (>= 3.1) - selenium-webdriver (3.12.0) + selenium-webdriver (3.141.0) childprocess (~> 0.5) - rubyzip (~> 1.2) + rubyzip (~> 1.2, >= 1.2.2) sentry-raven (2.9.0) faraday (>= 0.7.6, < 1.0) settingslogic (2.0.9) @@ -943,8 +943,8 @@ GEM rinku with_env (1.1.0) xml-simple (1.1.5) - xpath (2.1.0) - nokogiri (~> 1.3) + xpath (3.2.0) + nokogiri (~> 1.8) PLATFORMS ruby @@ -974,8 +974,8 @@ DEPENDENCIES browser (~> 2.5) bullet (~> 5.5.0) bundler-audit (~> 0.5.0) - capybara (~> 2.16.1) - capybara-screenshot (~> 1.0.18) + capybara (~> 2.18.0) + capybara-screenshot (~> 1.0.22) carrierwave (~> 1.3) charlock_holmes (~> 0.7.5) chronic (~> 0.10.2) @@ -1025,7 +1025,7 @@ DEPENDENCIES gitlab-default_value_for (~> 3.1.1) gitlab-markup (~> 1.7.0) gitlab-sidekiq-fetcher (~> 0.4.0) - gitlab-styles (~> 2.4) + gitlab-styles (~> 2.5) gitlab_omniauth-ldap (~> 2.1.1) gon (~> 6.2) google-api-client (~> 0.23) @@ -1146,7 +1146,7 @@ DEPENDENCIES sass-rails (~> 5.0.6) scss_lint (~> 0.56.0) seed-fu (~> 2.3.7) - selenium-webdriver (~> 3.12) + selenium-webdriver (~> 3.141) sentry-raven (~> 2.7) settingslogic (~> 2.0.9) sham_rack (~> 1.3.6) diff --git a/app/assets/javascripts/breakpoints.js b/app/assets/javascripts/breakpoints.js index 4d5d6bb864b..93aacba0e8e 100644 --- a/app/assets/javascripts/breakpoints.js +++ b/app/assets/javascripts/breakpoints.js @@ -15,7 +15,7 @@ const BreakpointInstance = { return breakpoint; }, isDesktop() { - return ['lg', 'md'].includes(this.getBreakpointSize); + return ['lg', 'md'].includes(this.getBreakpointSize()); }, }; diff --git a/app/assets/javascripts/diffs/components/app.vue b/app/assets/javascripts/diffs/components/app.vue index 5e74998579b..0ed4dcdcd81 100644 --- a/app/assets/javascripts/diffs/components/app.vue +++ b/app/assets/javascripts/diffs/components/app.vue @@ -64,6 +64,11 @@ export default { required: false, default: '', }, + isFluidLayout: { + type: Boolean, + required: false, + default: false, + }, }, data() { const treeWidth = @@ -116,7 +121,7 @@ export default { return this.treeWidth <= TREE_HIDE_STATS_WIDTH; }, isLimitedContainer() { - return !this.showTreeList && !this.isParallelView; + return !this.showTreeList && !this.isParallelView && !this.isFluidLayout; }, }, watch: { diff --git a/app/assets/javascripts/diffs/components/inline_diff_comment_row.vue b/app/assets/javascripts/diffs/components/inline_diff_comment_row.vue index 69146f1f6fd..1faa0493e79 100644 --- a/app/assets/javascripts/diffs/components/inline_diff_comment_row.vue +++ b/app/assets/javascripts/diffs/components/inline_diff_comment_row.vue @@ -41,7 +41,7 @@ export default { <template> <tr v-if="shouldRender" :class="className" class="notes_holder"> - <td class="notes_content" colspan="3"> + <td class="notes-content" colspan="3"> <div class="content"> <diff-discussions v-if="line.discussions.length" diff --git a/app/assets/javascripts/diffs/components/parallel_diff_comment_row.vue b/app/assets/javascripts/diffs/components/parallel_diff_comment_row.vue index 370cb6e339a..d2e54edca85 100644 --- a/app/assets/javascripts/diffs/components/parallel_diff_comment_row.vue +++ b/app/assets/javascripts/diffs/components/parallel_diff_comment_row.vue @@ -87,7 +87,7 @@ export default { <template> <tr v-if="shouldRender" :class="className" class="notes_holder"> - <td class="notes_content parallel old" colspan="2"> + <td class="notes-content parallel old" colspan="2"> <div v-if="shouldRenderDiscussionsOnLeft" class="content"> <diff-discussions v-if="line.left.discussions.length" @@ -105,7 +105,7 @@ export default { line-position="left" /> </td> - <td class="notes_content parallel new" colspan="2"> + <td class="notes-content parallel new" colspan="2"> <div v-if="shouldRenderDiscussionsOnRight" class="content"> <diff-discussions v-if="line.right.discussions.length" diff --git a/app/assets/javascripts/diffs/index.js b/app/assets/javascripts/diffs/index.js index 63954d9d412..1d897bca1dd 100644 --- a/app/assets/javascripts/diffs/index.js +++ b/app/assets/javascripts/diffs/index.js @@ -71,6 +71,7 @@ export default function initDiffsApp(store) { helpPagePath: dataset.helpPagePath, currentUser: JSON.parse(dataset.currentUserData) || {}, changesEmptyStateIllustration: dataset.changesEmptyStateIllustration, + isFluidLayout: parseBoolean(dataset.isFluidLayout), }; }, computed: { @@ -97,6 +98,7 @@ export default function initDiffsApp(store) { helpPagePath: this.helpPagePath, shouldShow: this.activeTab === 'diffs', changesEmptyStateIllustration: this.changesEmptyStateIllustration, + isFluidLayout: this.isFluidLayout, }, }); }, diff --git a/app/assets/javascripts/event_tracking/notes.js b/app/assets/javascripts/event_tracking/notes.js new file mode 100644 index 00000000000..2d1ec238274 --- /dev/null +++ b/app/assets/javascripts/event_tracking/notes.js @@ -0,0 +1 @@ +export default () => {}; diff --git a/app/assets/javascripts/lib/utils/text_utility.js b/app/assets/javascripts/lib/utils/text_utility.js index 1b7f8732c65..cc1d85fd97d 100644 --- a/app/assets/javascripts/lib/utils/text_utility.js +++ b/app/assets/javascripts/lib/utils/text_utility.js @@ -44,18 +44,18 @@ export const pluralize = (str, count) => str + (count > 1 || count === 0 ? 's' : export const dasherize = str => str.replace(/[_\s]+/g, '-'); /** - * Removes accents and converts to lower case + * Replaces whitespaces with hyphens and converts to lower case * @param {String} str * @returns {String} */ -export const slugify = str => str.trim().toLowerCase(); +export const slugifyWithHyphens = str => str.toLowerCase().replace(/\s+/g, '-'); /** - * Replaces whitespaces with hyphens and converts to lower case + * Replaces whitespaces with underscore and converts to lower case * @param {String} str * @returns {String} */ -export const slugifyWithHyphens = str => str.toLowerCase().replace(/\s+/g, '-'); +export const slugifyWithUnderscore = str => str.toLowerCase().replace(/\s+/g, '_'); /** * Truncates given text diff --git a/app/assets/javascripts/merge_request_tabs.js b/app/assets/javascripts/merge_request_tabs.js index 2f15da42271..509f19e6f00 100644 --- a/app/assets/javascripts/merge_request_tabs.js +++ b/app/assets/javascripts/merge_request_tabs.js @@ -398,7 +398,7 @@ export default class MergeRequestTabs { const hash = getLocationHash(); const anchor = hash && $container.find(`.note[id="${hash}"]`); if (anchor && anchor.length > 0) { - const notesContent = anchor.closest('.notes_content'); + const notesContent = anchor.closest('.notes-content'); const lineType = notesContent.hasClass('new') ? 'new' : 'old'; Notes.instance.toggleDiffNote({ target: anchor, diff --git a/app/assets/javascripts/mr_popover/index.js b/app/assets/javascripts/mr_popover/index.js index cc686b401d2..9a97e98f9db 100644 --- a/app/assets/javascripts/mr_popover/index.js +++ b/app/assets/javascripts/mr_popover/index.js @@ -54,9 +54,13 @@ export default elements => { const apolloProvider = new VueApollo({ defaultClient: createDefaultClient(), }); + const listenerAddedAttr = 'data-mr-listener-added'; mrLinks.forEach(el => { - el.addEventListener('mouseenter', handleMRPopoverMount(apolloProvider)); + if (!el.getAttribute(listenerAddedAttr)) { + el.addEventListener('mouseenter', handleMRPopoverMount(apolloProvider)); + el.setAttribute(listenerAddedAttr, true); + } }); } }; diff --git a/app/assets/javascripts/notes.js b/app/assets/javascripts/notes.js index 94d2e2b53e9..36725e22365 100644 --- a/app/assets/javascripts/notes.js +++ b/app/assets/javascripts/notes.js @@ -506,7 +506,7 @@ export default class Notes { var contentContainerClass = '.' + $notes - .closest('.notes_content') + .closest('.notes-content') .attr('class') .split(' ') .join('.'); @@ -1069,14 +1069,14 @@ export default class Notes { addForm = false; let lineTypeSelector = ''; rowCssToAdd = - '<tr class="notes_holder js-temp-notes-holder"><td class="notes_content" colspan="3"><div class="content"></div></td></tr>'; + '<tr class="notes_holder js-temp-notes-holder"><td class="notes-content" colspan="3"><div class="content"></div></td></tr>'; // In parallel view, look inside the correct left/right pane if (this.isParallelView()) { lineTypeSelector = `.${lineType}`; rowCssToAdd = - '<tr class="notes_holder js-temp-notes-holder"><td class="notes_line old"></td><td class="notes_content parallel old"><div class="content"></div></td><td class="notes_line new"></td><td class="notes_content parallel new"><div class="content"></div></td></tr>'; + '<tr class="notes_holder js-temp-notes-holder"><td class="notes_line old"></td><td class="notes-content parallel old"><div class="content"></div></td><td class="notes_line new"></td><td class="notes-content parallel new"><div class="content"></div></td></tr>'; } - const notesContentSelector = `.notes_content${lineTypeSelector} .content`; + const notesContentSelector = `.notes-content${lineTypeSelector} .content`; let notesContent = targetRow.find(notesContentSelector); if (hasNotes && showReplyInput) { diff --git a/app/assets/javascripts/notes/components/comment_form.vue b/app/assets/javascripts/notes/components/comment_form.vue index b30d7fa9b73..caf22f71bf9 100644 --- a/app/assets/javascripts/notes/components/comment_form.vue +++ b/app/assets/javascripts/notes/components/comment_form.vue @@ -11,6 +11,7 @@ import { capitalizeFirstCharacter, convertToCamelCase, splitCamelCase, + slugifyWithUnderscore, } from '../../lib/utils/text_utility'; import * as constants from '../constants'; import eventHub from '../event_hub'; @@ -129,6 +130,9 @@ export default { ? 'merge request' : 'issue'; }, + trackingLabel() { + return slugifyWithUnderscore(`${this.commentButtonTitle} button`); + }, }, watch: { note(newNote) { @@ -370,6 +374,8 @@ append-right-10 comment-type-dropdown js-comment-type-dropdown droplab-dropdown" class="btn btn-success js-comment-button js-comment-submit-button qa-comment-button" type="submit" + :data-track-label="trackingLabel" + data-track-event="click_button" @click.prevent="handleSave()" > {{ __(commentButtonTitle) }} diff --git a/app/assets/javascripts/notes/components/diff_with_note.vue b/app/assets/javascripts/notes/components/diff_with_note.vue index ab758a9e922..b95835ed10a 100644 --- a/app/assets/javascripts/notes/components/diff_with_note.vue +++ b/app/assets/javascripts/notes/components/diff_with_note.vue @@ -105,7 +105,7 @@ export default { </td> </tr> <tr class="notes_holder"> - <td class="notes_content" colspan="3"><slot></slot></td> + <td class="notes-content" colspan="3"><slot></slot></td> </tr> </table> </div> diff --git a/app/assets/javascripts/notes/index.js b/app/assets/javascripts/notes/index.js index 30372103590..57dd1c5cab2 100644 --- a/app/assets/javascripts/notes/index.js +++ b/app/assets/javascripts/notes/index.js @@ -1,4 +1,6 @@ import Vue from 'vue'; +import { isEE } from '~/lib/utils/common_utils'; +import initNoteStats from 'ee_else_ce/event_tracking/notes'; import notesApp from './components/notes_app.vue'; import initDiscussionFilters from './discussion_filters'; import createStore from './stores'; @@ -38,6 +40,11 @@ document.addEventListener('DOMContentLoaded', () => { notesData: JSON.parse(notesDataset.notesData), }; }, + mounted() { + if (isEE) { + initNoteStats(); + } + }, render(createElement) { return createElement('notes-app', { props: { diff --git a/app/assets/stylesheets/framework/common.scss b/app/assets/stylesheets/framework/common.scss index c3031c3375e..be0073559b6 100644 --- a/app/assets/stylesheets/framework/common.scss +++ b/app/assets/stylesheets/framework/common.scss @@ -188,11 +188,6 @@ li.note { background-color: inherit; } -.show-suppressed-diff, -.show-all-commits { - cursor: pointer; -} - .error-message { padding: 10px; background: $red-400; diff --git a/app/assets/stylesheets/framework/notes.scss b/app/assets/stylesheets/framework/notes.scss index d349e3fad9c..85ddf11d6fe 100644 --- a/app/assets/stylesheets/framework/notes.scss +++ b/app/assets/stylesheets/framework/notes.scss @@ -4,7 +4,7 @@ } // Diff is side by side - .notes_content.parallel & { + .notes-content.parallel & { // We hide at double what we normally hide at because // there are two columns of notes @media (#{$condition}-width: (2 * $breakpoint-width)) { diff --git a/app/assets/stylesheets/pages/notes.scss b/app/assets/stylesheets/pages/notes.scss index fd07415a52f..09f75cd827f 100644 --- a/app/assets/stylesheets/pages/notes.scss +++ b/app/assets/stylesheets/pages/notes.scss @@ -68,7 +68,7 @@ $note-form-margin-left: 72px; } } - .notes_content { + .notes-content { border: 0; border-top: 1px solid $border-color; } @@ -453,7 +453,7 @@ $note-form-margin-left: 72px; // Merge request notes in diffs // Diff is inline - .notes_content .note-header .note-headline-light { + .notes-content .note-header .note-headline-light { display: inline-block; position: relative; } @@ -465,7 +465,7 @@ $note-form-margin-left: 72px; border: 1px solid $border-color; border-left: 0; - &.notes_content { + &.notes-content { border-width: 1px 0; padding: 0; vertical-align: top; @@ -512,7 +512,7 @@ $note-form-margin-left: 72px; } .commit-diff { - .notes_content { + .notes-content { background-color: $white-light; } } diff --git a/app/assets/stylesheets/pages/pipeline_schedules.scss b/app/assets/stylesheets/pages/pipeline_schedules.scss index 617b3db2fae..85c4902eee2 100644 --- a/app/assets/stylesheets/pages/pipeline_schedules.scss +++ b/app/assets/stylesheets/pages/pipeline_schedules.scss @@ -1,9 +1,4 @@ -.js-pipeline-schedule-form { - .dropdown-select, - .dropdown-menu-toggle { - width: 100% !important; - } - +.pipeline-schedule-form { .gl-field-error { margin: 10px 0 0; } diff --git a/app/assets/stylesheets/pages/reports.scss b/app/assets/stylesheets/pages/reports.scss index f7619ccbd20..94da72622af 100644 --- a/app/assets/stylesheets/pages/reports.scss +++ b/app/assets/stylesheets/pages/reports.scss @@ -52,11 +52,6 @@ .report-block-list-icon .loading-container { position: relative; left: -2px; - // needed to make the next element align with the - // elements below that have a svg with 16px width - .fa-spinner { - width: 16px; - } } } diff --git a/app/models/application_setting.rb b/app/models/application_setting.rb index eb6ddaac871..2f9b4c4eaa2 100644 --- a/app/models/application_setting.rb +++ b/app/models/application_setting.rb @@ -198,7 +198,7 @@ class ApplicationSetting < ApplicationRecord validates_each :restricted_visibility_levels do |record, attr, value| value&.each do |level| unless Gitlab::VisibilityLevel.options.value?(level) - record.errors.add(attr, "'#{level}' is not a valid visibility level") + record.errors.add(attr, _("'%{level}' is not a valid visibility level") % { level: level }) end end end @@ -206,7 +206,7 @@ class ApplicationSetting < ApplicationRecord validates_each :import_sources do |record, attr, value| value&.each do |source| unless Gitlab::ImportSources.options.value?(source) - record.errors.add(attr, "'#{source}' is not a import source") + record.errors.add(attr, _("'%{source}' is not a import source") % { source: source }) end end end diff --git a/app/models/concerns/group_descendant.rb b/app/models/concerns/group_descendant.rb index 05cd4265133..cfffd845e43 100644 --- a/app/models/concerns/group_descendant.rb +++ b/app/models/concerns/group_descendant.rb @@ -22,7 +22,7 @@ module GroupDescendant return [] if descendants.empty? unless descendants.all? { |hierarchy| hierarchy.is_a?(GroupDescendant) } - raise ArgumentError.new('element is not a hierarchy') + raise ArgumentError.new(_('element is not a hierarchy')) end all_hierarchies = descendants.map do |descendant| @@ -56,7 +56,7 @@ module GroupDescendant end if parent.nil? && hierarchy_top.present? - raise ArgumentError.new('specified top is not part of the tree') + raise ArgumentError.new(_('specified top is not part of the tree')) end if parent && parent != hierarchy_top diff --git a/app/models/concerns/token_authenticatable_strategies/base.rb b/app/models/concerns/token_authenticatable_strategies/base.rb index df14e6e4754..aafd0b538a3 100644 --- a/app/models/concerns/token_authenticatable_strategies/base.rb +++ b/app/models/concerns/token_authenticatable_strategies/base.rb @@ -41,7 +41,7 @@ module TokenAuthenticatableStrategies def self.fabricate(model, field, options) if options[:digest] && options[:encrypted] - raise ArgumentError, 'Incompatible options set!' + raise ArgumentError, _('Incompatible options set!') end if options[:digest] diff --git a/app/models/concerns/token_authenticatable_strategies/encrypted.rb b/app/models/concerns/token_authenticatable_strategies/encrypted.rb index 2c7fa2c5b3c..4728cb658dc 100644 --- a/app/models/concerns/token_authenticatable_strategies/encrypted.rb +++ b/app/models/concerns/token_authenticatable_strategies/encrypted.rb @@ -13,7 +13,7 @@ module TokenAuthenticatableStrategies elsif migrating? find_by_plaintext_token(token, unscoped) else - raise ArgumentError, "Unknown encryption strategy: #{encrypted_strategy}!" + raise ArgumentError, _("Unknown encryption strategy: %{encrypted_strategy}!") % { encrypted_strategy: encrypted_strategy } end end @@ -32,7 +32,7 @@ module TokenAuthenticatableStrategies return super if instance.has_attribute?(encrypted_field) if required? - raise ArgumentError, 'Using required encryption strategy when encrypted field is missing!' + raise ArgumentError, _('Using required encryption strategy when encrypted field is missing!') else insecure_strategy.ensure_token(instance) end @@ -74,7 +74,7 @@ module TokenAuthenticatableStrategies value = value.call if value.is_a?(Proc) unless value.in?([:required, :optional, :migrating]) - raise ArgumentError, 'encrypted: needs to be a :required, :optional or :migrating!' + raise ArgumentError, _('encrypted: needs to be a :required, :optional or :migrating!') end value diff --git a/app/models/milestone.rb b/app/models/milestone.rb index b4aad9e512e..787600569fa 100644 --- a/app/models/milestone.rb +++ b/app/models/milestone.rb @@ -291,22 +291,22 @@ class Milestone < ApplicationRecord end title_exists = relation.find_by_title(title) - errors.add(:title, "already being used for another group or project milestone.") if title_exists + errors.add(:title, _("already being used for another group or project milestone.")) if title_exists end # Milestone should be either a project milestone or a group milestone def milestone_type_check if group_id && project_id field = project_id_changed? ? :project_id : :group_id - errors.add(field, "milestone should belong either to a project or a group.") + errors.add(field, _("milestone should belong either to a project or a group.")) end end def milestone_format_reference(format = :iid) - raise ArgumentError, 'Unknown format' unless [:iid, :name].include?(format) + raise ArgumentError, _('Unknown format') unless [:iid, :name].include?(format) if group_milestone? && format == :iid - raise ArgumentError, 'Cannot refer to a group milestone by an internal id!' + raise ArgumentError, _('Cannot refer to a group milestone by an internal id!') end if format == :name && !name.include?('"') @@ -322,7 +322,7 @@ class Milestone < ApplicationRecord def start_date_should_be_less_than_due_date if due_date <= start_date - errors.add(:due_date, "must be greater than start date") + errors.add(:due_date, _("must be greater than start date")) end end diff --git a/app/models/project.rb b/app/models/project.rb index c838df03c0d..2fb6f5cb6a7 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -313,7 +313,7 @@ class Project < ApplicationRecord validates :description, length: { maximum: 2000 }, allow_blank: true validates :ci_config_path, format: { without: %r{(\.{2}|\A/)}, - message: 'cannot include leading slash or directory traversal.' }, + message: _('cannot include leading slash or directory traversal.') }, length: { maximum: 255 }, allow_blank: true validates :name, @@ -420,13 +420,13 @@ class Project < ApplicationRecord enum auto_cancel_pending_pipelines: { disabled: 0, enabled: 1 } chronic_duration_attr :build_timeout_human_readable, :build_timeout, - default: 3600, error_message: 'Maximum job timeout has a value which could not be accepted' + default: 3600, error_message: _('Maximum job timeout has a value which could not be accepted') validates :build_timeout, allow_nil: true, numericality: { greater_than_or_equal_to: 10.minutes, less_than: 1.month, only_integer: true, - message: 'needs to be beetween 10 minutes and 1 month' } + message: _('needs to be beetween 10 minutes and 1 month') } # Used by Projects::CleanupService to hold a map of rewritten object IDs mount_uploader :bfg_object_map, AttachmentUploader @@ -850,7 +850,7 @@ class Project < ApplicationRecord def mark_stuck_remote_mirrors_as_failed! remote_mirrors.stuck.update_all( update_status: :failed, - last_error: 'The remote mirror took to long to complete.', + last_error: _('The remote mirror took to long to complete.'), last_update_at: Time.now ) end @@ -887,14 +887,14 @@ class Project < ApplicationRecord level_name = Gitlab::VisibilityLevel.level_name(self.visibility_level).downcase group_level_name = Gitlab::VisibilityLevel.level_name(self.group.visibility_level).downcase - self.errors.add(:visibility_level, "#{level_name} is not allowed in a #{group_level_name} group.") + self.errors.add(:visibility_level, _("%{level_name} is not allowed in a %{group_level_name} group.") % { level_name: level_name, group_level_name: group_level_name }) end def visibility_level_allowed_as_fork return if visibility_level_allowed_as_fork? level_name = Gitlab::VisibilityLevel.level_name(self.visibility_level).downcase - self.errors.add(:visibility_level, "#{level_name} is not allowed since the fork source project has lower visibility.") + self.errors.add(:visibility_level, _("%{level_name} is not allowed since the fork source project has lower visibility.") % { level_name: level_name }) end def check_wiki_path_conflict @@ -903,7 +903,7 @@ class Project < ApplicationRecord path_to_check = path.ends_with?('.wiki') ? path.chomp('.wiki') : "#{path}.wiki" if Project.where(namespace_id: namespace_id, path: path_to_check).exists? - errors.add(:name, 'has already been taken') + errors.add(:name, _('has already been taken')) end end @@ -923,7 +923,7 @@ class Project < ApplicationRecord return unless pages_https_only? unless pages_domains.all?(&:https?) - errors.add(:pages_https_only, "cannot be enabled unless all domains have TLS certificates") + errors.add(:pages_https_only, _("cannot be enabled unless all domains have TLS certificates")) end end @@ -1203,7 +1203,7 @@ class Project < ApplicationRecord def valid_repo? repository.exists? rescue - errors.add(:path, 'Invalid repository path') + errors.add(:path, _('Invalid repository path')) false end @@ -1294,7 +1294,7 @@ class Project < ApplicationRecord # Check if repository with same path already exists on disk we can # skip this for the hashed storage because the path does not change if legacy_storage? && repository_with_same_path_already_exists? - errors.add(:base, 'There is already a repository with that name on disk') + errors.add(:base, _('There is already a repository with that name on disk')) return false end @@ -1316,7 +1316,7 @@ class Project < ApplicationRecord repository.after_create true else - errors.add(:base, 'Failed to create repository via gitlab-shell') + errors.add(:base, _('Failed to create repository via gitlab-shell')) false end end @@ -1392,7 +1392,7 @@ class Project < ApplicationRecord ProjectCacheWorker.perform_async(self.id, [], [:commit_count]) reload_default_branch else - errors.add(:base, "Could not change HEAD: branch '#{branch}' does not exist") + errors.add(:base, _("Could not change HEAD: branch '%{branch}' does not exist") % { branch: branch }) false end end @@ -1444,7 +1444,7 @@ class Project < ApplicationRecord ProjectWiki.new(self, self.owner).wiki true rescue ProjectWiki::CouldNotCreateWikiError - errors.add(:base, 'Failed create wiki') + errors.add(:base, _('Failed create wiki')) false end @@ -1933,7 +1933,7 @@ class Project < ApplicationRecord # # @param [Symbol] feature that needs to be rolled out for the project (:repository, :attachments) def hashed_storage?(feature) - raise ArgumentError, "Invalid feature" unless HASHED_STORAGE_FEATURES.include?(feature) + raise ArgumentError, _("Invalid feature") unless HASHED_STORAGE_FEATURES.include?(feature) self.storage_version && self.storage_version >= HASHED_STORAGE_FEATURES[feature] end @@ -2165,7 +2165,7 @@ class Project < ApplicationRecord return if skip_disk_validation if repository_storage.blank? || repository_with_same_path_already_exists? - errors.add(:base, 'There is already a repository with that name on disk') + errors.add(:base, _('There is already a repository with that name on disk')) throw :abort end end @@ -2211,7 +2211,7 @@ class Project < ApplicationRecord errors.delete(error) end - errors.add(:base, "The project is still being deleted. Please try again later.") + errors.add(:base, _("The project is still being deleted. Please try again later.")) end def pending_delete_twin diff --git a/app/models/project_group_link.rb b/app/models/project_group_link.rb index 58b555c3581..feaf172d48d 100644 --- a/app/models/project_group_link.rb +++ b/app/models/project_group_link.rb @@ -14,7 +14,7 @@ class ProjectGroupLink < ApplicationRecord validates :project_id, presence: true validates :group, presence: true - validates :group_id, uniqueness: { scope: [:project_id], message: "already shared with this group" } + validates :group_id, uniqueness: { scope: [:project_id], message: _("already shared with this group") } validates :group_access, presence: true validates :group_access, inclusion: { in: Gitlab::Access.values }, presence: true validate :different_group @@ -44,7 +44,7 @@ class ProjectGroupLink < ApplicationRecord group_ids = project_group.ancestors.map(&:id).push(project_group.id) if group_ids.include?(self.group.id) - errors.add(:base, "Project cannot be shared with the group it is in or one of its ancestors.") + errors.add(:base, _("Project cannot be shared with the group it is in or one of its ancestors.")) end end diff --git a/app/models/project_services/asana_service.rb b/app/models/project_services/asana_service.rb index cc5f1207653..3e28dc23782 100644 --- a/app/models/project_services/asana_service.rb +++ b/app/models/project_services/asana_service.rb @@ -11,7 +11,7 @@ class AsanaService < Service end def description - 'Asana - Teamwork without email' + s_('AsanaService|Asana - Teamwork without email') end def help @@ -36,13 +36,13 @@ http://app.asana.com/-/account_api' { type: 'text', name: 'api_key', - placeholder: 'User Personal Access Token. User must have access to task, all comments will be attributed to this user.', + placeholder: s_('AsanaService|User Personal Access Token. User must have access to task, all comments will be attributed to this user.'), required: true }, { type: 'text', name: 'restrict_to_branch', - placeholder: 'Comma-separated list of branches which will be automatically inspected. Leave blank to include all branches.' + placeholder: s_('AsanaService|Comma-separated list of branches which will be automatically inspected. Leave blank to include all branches.') } ] end @@ -73,7 +73,7 @@ http://app.asana.com/-/account_api' project_name = project.full_name data[:commits].each do |commit| - push_msg = "#{user} pushed to branch #{branch} of #{project_name} ( #{commit[:url]} ):" + push_msg = s_("AsanaService|%{user} pushed to branch %{branch} of %{project_name} ( %{commit_url} ):") % { user: user, branch: branch, project_name: project_name, commit_url: commit[:url] } check_commit(commit[:message], push_msg) end end diff --git a/app/models/project_services/bamboo_service.rb b/app/models/project_services/bamboo_service.rb index 71f5607dbdb..dfeb21680a9 100644 --- a/app/models/project_services/bamboo_service.rb +++ b/app/models/project_services/bamboo_service.rb @@ -31,15 +31,15 @@ class BambooService < CiService end def title - 'Atlassian Bamboo CI' + s_('BambooService|Atlassian Bamboo CI') end def description - 'A continuous integration and build server' + s_('BambooService|A continuous integration and build server') end def help - 'You must set up automatic revision labeling and a repository trigger in Bamboo.' + s_('BambooService|You must set up automatic revision labeling and a repository trigger in Bamboo.') end def self.to_param @@ -49,11 +49,11 @@ class BambooService < CiService def fields [ { type: 'text', name: 'bamboo_url', - placeholder: 'Bamboo root URL like https://bamboo.example.com', required: true }, + placeholder: s_('BambooService|Bamboo root URL like https://bamboo.example.com'), required: true }, { type: 'text', name: 'build_key', - placeholder: 'Bamboo build plan key like KEY', required: true }, + placeholder: s_('BambooService|Bamboo build plan key like KEY'), required: true }, { type: 'text', name: 'username', - placeholder: 'A user with API access, if applicable' }, + placeholder: s_('BambooService|A user with API access, if applicable') }, { type: 'password', name: 'password' } ] end diff --git a/app/models/project_services/discord_service.rb b/app/models/project_services/discord_service.rb index 21afd14dbff..405676792de 100644 --- a/app/models/project_services/discord_service.rb +++ b/app/models/project_services/discord_service.rb @@ -4,11 +4,11 @@ require "discordrb/webhooks" class DiscordService < ChatNotificationService def title - "Discord Notifications" + s_("DiscordService|Discord Notifications") end def description - "Receive event notifications in Discord" + s_("DiscordService|Receive event notifications in Discord") end def self.to_param diff --git a/app/models/project_services/emails_on_push_service.rb b/app/models/project_services/emails_on_push_service.rb index fb73d430fb1..45de64a9990 100644 --- a/app/models/project_services/emails_on_push_service.rb +++ b/app/models/project_services/emails_on_push_service.rb @@ -7,11 +7,11 @@ class EmailsOnPushService < Service validates :recipients, presence: true, if: :valid_recipients? def title - 'Emails on push' + s_('EmailsOnPushService|Emails on push') end def description - 'Email the commits and diff of each push to a list of recipients.' + s_('EmailsOnPushService|Email the commits and diff of each push to a list of recipients.') end def self.to_param @@ -45,11 +45,11 @@ class EmailsOnPushService < Service def fields domains = Notify.allowed_email_domains.map { |domain| "user@#{domain}" }.join(", ") [ - { type: 'checkbox', name: 'send_from_committer_email', title: "Send from committer", - help: "Send notifications from the committer's email address if the domain is part of the domain GitLab is running on (e.g. #{domains})." }, - { type: 'checkbox', name: 'disable_diffs', title: "Disable code diffs", - help: "Don't include possibly sensitive code diffs in notification body." }, - { type: 'textarea', name: 'recipients', placeholder: 'Emails separated by whitespace' } + { type: 'checkbox', name: 'send_from_committer_email', title: s_("EmailsOnPushService|Send from committer"), + help: s_("EmailsOnPushService|Send notifications from the committer's email address if the domain is part of the domain GitLab is running on (e.g. %{domains}).") % { domains: domains } }, + { type: 'checkbox', name: 'disable_diffs', title: s_("EmailsOnPushService|Disable code diffs"), + help: s_("EmailsOnPushService|Don't include possibly sensitive code diffs in notification body.") }, + { type: 'textarea', name: 'recipients', placeholder: s_('EmailsOnPushService|Emails separated by whitespace') } ] end end diff --git a/app/models/project_services/external_wiki_service.rb b/app/models/project_services/external_wiki_service.rb index d2835c6ac82..593ce69b0fd 100644 --- a/app/models/project_services/external_wiki_service.rb +++ b/app/models/project_services/external_wiki_service.rb @@ -6,11 +6,11 @@ class ExternalWikiService < Service validates :external_wiki_url, presence: true, public_url: true, if: :activated? def title - 'External Wiki' + s_('ExternalWikiService|External Wiki') end def description - 'Replaces the link to the internal wiki with a link to an external wiki.' + s_('ExternalWikiService|Replaces the link to the internal wiki with a link to an external wiki.') end def self.to_param @@ -19,7 +19,7 @@ class ExternalWikiService < Service def fields [ - { type: 'text', name: 'external_wiki_url', placeholder: 'The URL of the external Wiki', required: true } + { type: 'text', name: 'external_wiki_url', placeholder: s_('ExternalWikiService|The URL of the external Wiki'), required: true } ] end diff --git a/app/models/project_services/flowdock_service.rb b/app/models/project_services/flowdock_service.rb index 76624263aab..094488cb431 100644 --- a/app/models/project_services/flowdock_service.rb +++ b/app/models/project_services/flowdock_service.rb @@ -9,7 +9,7 @@ class FlowdockService < Service end def description - 'Flowdock is a collaboration web app for technical teams.' + s_('FlowdockService|Flowdock is a collaboration web app for technical teams.') end def self.to_param @@ -18,7 +18,7 @@ class FlowdockService < Service def fields [ - { type: 'text', name: 'token', placeholder: 'Flowdock Git source token', required: true } + { type: 'text', name: 'token', placeholder: s_('FlowdockService|Flowdock Git source token'), required: true } ] end diff --git a/app/models/project_services/jira_service.rb b/app/models/project_services/jira_service.rb index 81302c516c2..ebf28dc842c 100644 --- a/app/models/project_services/jira_service.rb +++ b/app/models/project_services/jira_service.rb @@ -11,7 +11,7 @@ class JiraService < IssueTrackerService validates :password, presence: true, if: :activated? validates :jira_issue_transition_id, - format: { with: Gitlab::Regex.jira_transition_id_regex, message: "transition ids can have only numbers which can be split with , or ;" }, + format: { with: Gitlab::Regex.jira_transition_id_regex, message: s_("JiraService|transition ids can have only numbers which can be split with , or ;") }, allow_blank: true # JIRA cloud version is deprecating authentication via username and password. @@ -86,7 +86,7 @@ class JiraService < IssueTrackerService if self.properties && self.properties['description'].present? self.properties['description'] else - 'Jira issue tracker' + s_('JiraService|Jira issue tracker') end end @@ -96,11 +96,11 @@ class JiraService < IssueTrackerService def fields [ - { type: 'text', name: 'url', title: 'Web URL', placeholder: 'https://jira.example.com', required: true }, - { type: 'text', name: 'api_url', title: 'JIRA API URL', placeholder: 'If different from Web URL' }, - { type: 'text', name: 'username', title: 'Username or Email', placeholder: 'Use a username for server version and an email for cloud version', required: true }, - { type: 'password', name: 'password', title: 'Password or API token', placeholder: 'Use a password for server version and an API token for cloud version', required: true }, - { type: 'text', name: 'jira_issue_transition_id', title: 'Transition ID(s)', placeholder: 'Use , or ; to separate multiple transition IDs' } + { type: 'text', name: 'url', title: s_('JiraService|Web URL'), placeholder: 'https://jira.example.com', required: true }, + { type: 'text', name: 'api_url', title: s_('JiraService|JIRA API URL'), placeholder: s_('JiraService|If different from Web URL') }, + { type: 'text', name: 'username', title: s_('JiraService|Username or Email'), placeholder: s_('JiraService|Use a username for server version and an email for cloud version'), required: true }, + { type: 'password', name: 'password', title: s_('JiraService|Password or API token'), placeholder: s_('JiraService|Use a password for server version and an API token for cloud version'), required: true }, + { type: 'text', name: 'jira_issue_transition_id', title: s_('JiraService|Transition ID(s)'), placeholder: s_('JiraService|Use , or ; to separate multiple transition IDs') } ] end @@ -139,7 +139,7 @@ class JiraService < IssueTrackerService def create_cross_reference_note(mentioned, noteable, author) unless can_cross_reference?(noteable) - return "Events for #{noteable.model_name.plural.humanize(capitalize: false)} are disabled." + return s_("JiraService|Events for %{noteable_model_name} are disabled.") % { noteable_model_name: noteable.model_name.plural.humanize(capitalize: false) } end jira_issue = jira_request { client.Issue.find(mentioned.id) } @@ -338,9 +338,9 @@ class JiraService < IssueTrackerService def self.event_description(event) case event when "merge_request", "merge_request_events" - "JIRA comments will be created when an issue gets referenced in a merge request." + s_("JiraService|JIRA comments will be created when an issue gets referenced in a merge request.") when "commit", "commit_events" - "JIRA comments will be created when an issue gets referenced in a commit." + s_("JiraService|JIRA comments will be created when an issue gets referenced in a commit.") end end end diff --git a/app/models/project_services/pipelines_email_service.rb b/app/models/project_services/pipelines_email_service.rb index d60a6a7efa3..7ba69370f14 100644 --- a/app/models/project_services/pipelines_email_service.rb +++ b/app/models/project_services/pipelines_email_service.rb @@ -10,11 +10,11 @@ class PipelinesEmailService < Service end def title - 'Pipelines emails' + _('Pipelines emails') end def description - 'Email the pipelines status to a list of recipients.' + _('Email the pipelines status to a list of recipients.') end def self.to_param @@ -51,7 +51,7 @@ class PipelinesEmailService < Service [ { type: 'textarea', name: 'recipients', - placeholder: 'Emails separated by comma', + placeholder: _('Emails separated by comma'), required: true }, { type: 'checkbox', name: 'notify_only_broken_pipelines' } diff --git a/app/models/project_services/pivotaltracker_service.rb b/app/models/project_services/pivotaltracker_service.rb index 617e502b639..c15993bdc06 100644 --- a/app/models/project_services/pivotaltracker_service.rb +++ b/app/models/project_services/pivotaltracker_service.rb @@ -11,7 +11,7 @@ class PivotaltrackerService < Service end def description - 'Project Management Software (Source Commits Endpoint)' + s_('PivotalTrackerService|Project Management Software (Source Commits Endpoint)') end def self.to_param @@ -23,14 +23,14 @@ class PivotaltrackerService < Service { type: 'text', name: 'token', - placeholder: 'Pivotal Tracker API token.', + placeholder: s_('PivotalTrackerService|Pivotal Tracker API token.'), required: true }, { type: 'text', name: 'restrict_to_branch', - placeholder: 'Comma-separated list of branches which will be ' \ - 'automatically inspected. Leave blank to include all branches.' + placeholder: s_('PivotalTrackerService|Comma-separated list of branches which will be ' \ + 'automatically inspected. Leave blank to include all branches.') } ] end diff --git a/app/models/project_services/pushover_service.rb b/app/models/project_services/pushover_service.rb index 4e48c348b45..0d35bab7f80 100644 --- a/app/models/project_services/pushover_service.rb +++ b/app/models/project_services/pushover_service.rb @@ -11,7 +11,7 @@ class PushoverService < Service end def description - 'Pushover makes it easy to get real-time notifications on your Android device, iPhone, iPad, and Desktop.' + s_('PushoverService|Pushover makes it easy to get real-time notifications on your Android device, iPhone, iPad, and Desktop.') end def self.to_param @@ -20,15 +20,15 @@ class PushoverService < Service def fields [ - { type: 'text', name: 'api_key', placeholder: 'Your application key', required: true }, - { type: 'text', name: 'user_key', placeholder: 'Your user key', required: true }, - { type: 'text', name: 'device', placeholder: 'Leave blank for all active devices' }, + { type: 'text', name: 'api_key', placeholder: s_('PushoverService|Your application key'), required: true }, + { type: 'text', name: 'user_key', placeholder: s_('PushoverService|Your user key'), required: true }, + { type: 'text', name: 'device', placeholder: s_('PushoverService|Leave blank for all active devices') }, { type: 'select', name: 'priority', required: true, choices: [ - ['Lowest Priority', -2], - ['Low Priority', -1], - ['Normal Priority', 0], - ['High Priority', 1] + [s_('PushoverService|Lowest Priority'), -2], + [s_('PushoverService|Low Priority'), -1], + [s_('PushoverService|Normal Priority'), 0], + [s_('PushoverService|High Priority'), 1] ], default_choice: 0 }, { type: 'select', name: 'sound', choices: @@ -73,15 +73,15 @@ class PushoverService < Service message = if Gitlab::Git.blank_ref?(before) - "#{data[:user_name]} pushed new branch \"#{ref}\"." + s_("PushoverService|%{user_name} pushed new branch \"%{ref}\".") % { user_name: data[:user_name], ref: ref } elsif Gitlab::Git.blank_ref?(after) - "#{data[:user_name]} deleted branch \"#{ref}\"." + s_("PushoverService|%{user_name} deleted branch \"%{ref}\".") % { user_name: data[:user_name], ref: ref } else - "#{data[:user_name]} push to branch \"#{ref}\"." + s_("PushoverService|%{user_name} push to branch \"%{ref}\".") % { user_name: data[:user_name], ref: ref } end if data[:total_commits_count] > 0 - message = [message, "Total commits count: #{data[:total_commits_count]}"].join("\n") + message = [message, s_("PushoverService|Total commits count: %{total_commits_count}") % { total_commits_count: data[:total_commits_count] }].join("\n") end pushover_data = { @@ -92,7 +92,7 @@ class PushoverService < Service title: "#{project.full_name}", message: message, url: data[:project][:web_url], - url_title: "See project #{project.full_name}" + url_title: s_("PushoverService|See project %{project_full_name}") % { project_full_name: project.full_name } } # Sound parameter MUST NOT be sent to API if not selected diff --git a/app/models/u2f_registration.rb b/app/models/u2f_registration.rb index b4645462314..81415eb383b 100644 --- a/app/models/u2f_registration.rb +++ b/app/models/u2f_registration.rb @@ -19,7 +19,7 @@ class U2fRegistration < ApplicationRecord user: user, name: params[:name]) rescue JSON::ParserError, NoMethodError, ArgumentError - registration.errors.add(:base, 'Your U2F device did not send a valid JSON response.') + registration.errors.add(:base, _('Your U2F device did not send a valid JSON response.')) rescue U2F::Error => e registration.errors.add(:base, e.message) end diff --git a/app/models/upload.rb b/app/models/upload.rb index 9bffdcdb2e7..ca74f16b3b8 100644 --- a/app/models/upload.rb +++ b/app/models/upload.rb @@ -45,7 +45,7 @@ class Upload < ApplicationRecord end def absolute_path - raise ObjectStorage::RemoteStoreError, "Remote object has no absolute path." unless local? + raise ObjectStorage::RemoteStoreError, _("Remote object has no absolute path.") unless local? return path unless relative_path? uploader_class.absolute_path(self) @@ -71,10 +71,10 @@ class Upload < ApplicationRecord # Help sysadmins find missing upload files if persisted? && !exist if Gitlab::Sentry.enabled? - Raven.capture_message("Upload file does not exist", extra: self.attributes) + Raven.capture_message(_("Upload file does not exist"), extra: self.attributes) end - Gitlab::Metrics.counter(:upload_file_does_not_exist_total, 'The number of times an upload record could not find its file').increment + Gitlab::Metrics.counter(:upload_file_does_not_exist_total, _('The number of times an upload record could not find its file')).increment end exist diff --git a/app/models/user.rb b/app/models/user.rb index d3524bfd6ae..551eb58a4de 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -517,7 +517,7 @@ class User < ApplicationRecord def ghost email = 'ghost%s@example.com' unique_internal(where(ghost: true), 'ghost', email) do |u| - u.bio = 'This is a "Ghost User", created to hold all issues authored by users that have since been deleted. This user cannot be removed.' + u.bio = _('This is a "Ghost User", created to hold all issues authored by users that have since been deleted. This user cannot be removed.') u.name = 'Ghost User' end end @@ -537,20 +537,16 @@ class User < ApplicationRecord username end - def self.internal_attributes - [:ghost] - end - def internal? - self.class.internal_attributes.any? { |a| self[a] } + ghost? end def self.internal - where(Hash[internal_attributes.zip([true] * internal_attributes.size)]) + where(ghost: true) end def self.non_internal - where(internal_attributes.map { |attr| "#{attr} IS NOT TRUE" }.join(" AND ")) + where('ghost IS NOT TRUE') end # @@ -626,32 +622,32 @@ class User < ApplicationRecord def namespace_move_dir_allowed if namespace&.any_project_has_container_registry_tags? - errors.add(:username, 'cannot be changed if a personal project has container registry tags.') + errors.add(:username, _('cannot be changed if a personal project has container registry tags.')) end end def unique_email if !emails.exists?(email: email) && Email.exists?(email: email) - errors.add(:email, 'has already been taken') + errors.add(:email, _('has already been taken')) end end def owns_notification_email return if temp_oauth_email? - errors.add(:notification_email, "is not an email you own") unless all_emails.include?(notification_email) + errors.add(:notification_email, _("is not an email you own")) unless all_emails.include?(notification_email) end def owns_public_email return if public_email.blank? - errors.add(:public_email, "is not an email you own") unless all_emails.include?(public_email) + errors.add(:public_email, _("is not an email you own")) unless all_emails.include?(public_email) end def owns_commit_email return if read_attribute(:commit_email).blank? - errors.add(:commit_email, "is not an email you own") unless verified_emails.include?(commit_email) + errors.add(:commit_email, _("is not an email you own")) unless verified_emails.include?(commit_email) end # Define commit_email-related attribute methods explicitly instead of relying diff --git a/app/models/wiki_page.rb b/app/models/wiki_page.rb index 909da4316d0..cd4c7895587 100644 --- a/app/models/wiki_page.rb +++ b/app/models/wiki_page.rb @@ -31,7 +31,9 @@ class WikiPage pages.each_with_object([]) do |page, grouped_pages| next grouped_pages << page unless page.directory.present? - directory = grouped_pages.find { |dir| dir.slug == page.directory } + directory = grouped_pages.find do |obj| + obj.is_a?(WikiDirectory) && obj.slug == page.directory + end next directory.pages << page if directory diff --git a/app/services/clusters/applications/install_service.rb b/app/services/clusters/applications/install_service.rb index 1f62b3eb4de..b37ac510ff4 100644 --- a/app/services/clusters/applications/install_service.rb +++ b/app/services/clusters/applications/install_service.rb @@ -7,6 +7,13 @@ module Clusters return unless app.scheduled? app.make_installing! + + install + end + + private + + def install log_event(:begin_install) helm_api.install(install_command) @@ -18,7 +25,7 @@ module Clusters app.make_errored!("Kubernetes error: #{e.error_code}") rescue StandardError => e log_error(e) - app.make_errored!("Can't start installation process.") + app.make_errored!('Failed to install.') end end end diff --git a/app/services/clusters/applications/patch_service.rb b/app/services/clusters/applications/patch_service.rb index c3d317e226b..977a5e91041 100644 --- a/app/services/clusters/applications/patch_service.rb +++ b/app/services/clusters/applications/patch_service.rb @@ -8,6 +8,12 @@ module Clusters app.make_updating! + patch + end + + private + + def patch log_event(:begin_patch) helm_api.update(update_command) @@ -16,10 +22,10 @@ module Clusters ClusterWaitForAppInstallationWorker::INTERVAL, app.name, app.id) rescue Kubeclient::HttpError => e log_error(e) - app.make_update_errored!("Kubernetes error: #{e.error_code}") + app.make_errored!("Kubernetes error: #{e.error_code}") rescue StandardError => e log_error(e) - app.make_update_errored!("Can't start update process.") + app.make_errored!('Failed to update.') end end end diff --git a/app/services/clusters/applications/upgrade_service.rb b/app/services/clusters/applications/upgrade_service.rb index c34391bc8ad..813a9c4d071 100644 --- a/app/services/clusters/applications/upgrade_service.rb +++ b/app/services/clusters/applications/upgrade_service.rb @@ -6,24 +6,28 @@ module Clusters def execute return unless app.scheduled? - begin - app.make_updating! + app.make_updating! - log_event(:begin_upgrade) - # install_command works with upgrades too - # as it basically does `helm upgrade --install` - helm_api.update(install_command) + upgrade + end + + private + + def upgrade + # install_command works with upgrades too + # as it basically does `helm upgrade --install` + log_event(:begin_upgrade) + helm_api.update(install_command) - log_event(:schedule_wait_for_upgrade) - ClusterWaitForAppInstallationWorker.perform_in( - ClusterWaitForAppInstallationWorker::INTERVAL, app.name, app.id) - rescue Kubeclient::HttpError => e - log_error(e) - app.make_update_errored!("Kubernetes error: #{e.error_code}") - rescue StandardError => e - log_error(e) - app.make_update_errored!("Can't start upgrade process.") - end + log_event(:schedule_wait_for_upgrade) + ClusterWaitForAppInstallationWorker.perform_in( + ClusterWaitForAppInstallationWorker::INTERVAL, app.name, app.id) + rescue Kubeclient::HttpError => e + log_error(e) + app.make_errored!("Kubernetes error: #{e.error_code}") + rescue StandardError => e + log_error(e) + app.make_errored!('Failed to upgrade.') end end end diff --git a/app/services/update_deployment_service.rb b/app/services/update_deployment_service.rb index aa7fcca1e2a..49a7d0178f4 100644 --- a/app/services/update_deployment_service.rb +++ b/app/services/update_deployment_service.rb @@ -27,6 +27,8 @@ class UpdateDeploymentService deployment.tap(&:update_merge_request_metrics!) end + + deployment end private diff --git a/app/services/users/activity_service.rb b/app/services/users/activity_service.rb index e50840a9158..33444c2a7dc 100644 --- a/app/services/users/activity_service.rb +++ b/app/services/users/activity_service.rb @@ -30,7 +30,7 @@ module Users return if @user.last_activity_on == today - lease = Gitlab::ExclusiveLease.new("acitvity_service:#{@user.id}", + lease = Gitlab::ExclusiveLease.new("activity_service:#{@user.id}", timeout: LEASE_TIMEOUT) return unless lease.try_obtain diff --git a/app/views/discussions/_diff_discussion.html.haml b/app/views/discussions/_diff_discussion.html.haml index 6b8dd156874..5a47040874f 100644 --- a/app/views/discussions/_diff_discussion.html.haml +++ b/app/views/discussions/_diff_discussion.html.haml @@ -4,6 +4,6 @@ -# Text diff discussions - expanded = local_assigns.fetch(:expanded, true) %tr.notes_holder{ class: ('hide' unless expanded) } - %td.notes_content{ colspan: 3 } + %td.notes-content{ colspan: 3 } .content{ class: ('hide' unless expanded) } = render partial: "discussions/notes", collection: discussions, as: :discussion, locals: { disable_collapse_class: true } diff --git a/app/views/discussions/_parallel_diff_discussion.html.haml b/app/views/discussions/_parallel_diff_discussion.html.haml index 2e621c4082d..03b428714b9 100644 --- a/app/views/discussions/_parallel_diff_discussion.html.haml +++ b/app/views/discussions/_parallel_diff_discussion.html.haml @@ -1,17 +1,17 @@ - expanded = [*discussions_left, *discussions_right].any?(&:expanded?) %tr.notes_holder{ class: ('hide' unless expanded) } - if discussions_left - %td.notes_content.parallel.old{ colspan: 2 } + %td.notes-content.parallel.old{ colspan: 2 } .content{ class: ('hide' unless discussions_left.any?(&:expanded?)) } = render partial: "discussions/notes", collection: discussions_left, as: :discussion, line_type: 'old', locals: { disable_collapse_class: true } - else - %td.notes_content.parallel.old{ colspan: 2 } + %td.notes-content.parallel.old{ colspan: 2 } .content - if discussions_right - %td.notes_content.parallel.new{ colspan: 2 } + %td.notes-content.parallel.new{ colspan: 2 } .content{ class: ('hide' unless discussions_right.any?(&:expanded?)) } = render partial: "discussions/notes", collection: discussions_right, as: :discussion, line_type: 'new', locals: { disable_collapse_class: true } - else - %td.notes_content.parallel.new{ colspan: 2 } + %td.notes-content.parallel.new{ colspan: 2 } .content diff --git a/app/views/projects/deployments/_actions.haml b/app/views/projects/deployments/_actions.haml index e45c5be76de..c84c376d57b 100644 --- a/app/views/projects/deployments/_actions.haml +++ b/app/views/projects/deployments/_actions.haml @@ -10,5 +10,5 @@ - actions.each do |action| - next unless can?(current_user, :update_build, action) %li - = link_to [:play, @project.namespace.becomes(Namespace), @project, action], method: :post, rel: 'nofollow', class: 'btn' do + = link_to [:play, @project.namespace.becomes(Namespace), @project, action], method: :post, rel: 'nofollow' do %span= action.name diff --git a/app/views/projects/diffs/_text_file.html.haml b/app/views/projects/diffs/_text_file.html.haml index 56427a74d56..018c5b38536 100644 --- a/app/views/projects/diffs/_text_file.html.haml +++ b/app/views/projects/diffs/_text_file.html.haml @@ -1,7 +1,7 @@ - too_big = diff_file.diff_lines.count > Commit::DIFF_SAFE_LINES - if too_big .suppressed-container - %a.show-suppressed-diff.js-show-suppressed-diff= _("Changes suppressed. Click to show.") + %a.show-suppressed-diff.cursor-pointer.js-show-suppressed-diff= _("Changes suppressed. Click to show.") %table.text-file.diff-wrap-lines.code.js-syntax-highlight.commit-diff{ data: diff_view_data, class: too_big ? 'hide' : '' } = render partial: "projects/diffs/line", diff --git a/app/views/projects/environments/_form.html.haml b/app/views/projects/environments/_form.html.haml index cbd5c54cecc..1fbe34cfff3 100644 --- a/app/views/projects/environments/_form.html.haml +++ b/app/views/projects/environments/_form.html.haml @@ -17,5 +17,5 @@ = f.url_field :external_url, class: 'form-control' .form-actions - = f.submit _('Save'), class: 'btn btn-save' + = f.submit _('Save'), class: 'btn btn-success' = link_to _('Cancel'), project_environments_path(@project), class: 'btn btn-cancel' diff --git a/app/views/projects/merge_requests/show.html.haml b/app/views/projects/merge_requests/show.html.haml index 5111c9fab8d..79c586eef73 100644 --- a/app/views/projects/merge_requests/show.html.haml +++ b/app/views/projects/merge_requests/show.html.haml @@ -82,7 +82,8 @@ help_page_path: suggest_changes_help_path, current_user_data: UserSerializer.new(project: @project).represent(current_user, {}, MergeRequestUserEntity).to_json, project_path: project_path(@merge_request.project), - changes_empty_state_illustration: image_path('illustrations/merge_request_changes_empty.svg') } } + changes_empty_state_illustration: image_path('illustrations/merge_request_changes_empty.svg'), + is_fluid_layout: fluid_layout.to_s } } .mr-loading-status = spinner diff --git a/app/views/projects/pipeline_schedules/_form.html.haml b/app/views/projects/pipeline_schedules/_form.html.haml index 1121cf06b5c..396e5da87bc 100644 --- a/app/views/projects/pipeline_schedules/_form.html.haml +++ b/app/views/projects/pipeline_schedules/_form.html.haml @@ -1,4 +1,4 @@ -= form_for [@project.namespace.becomes(Namespace), @project, @schedule], as: :schedule, html: { id: "new-pipeline-schedule-form", class: "js-pipeline-schedule-form" } do |f| += form_for [@project.namespace.becomes(Namespace), @project, @schedule], as: :schedule, html: { id: "new-pipeline-schedule-form", class: "js-pipeline-schedule-form pipeline-schedule-form" } do |f| = form_errors(@schedule) .form-group.row .col-md-9 @@ -11,12 +11,12 @@ .form-group.row .col-md-9 = f.label :cron_timezone, _('Cron Timezone'), class: 'label-bold' - = dropdown_tag(_("Select a timezone"), options: { toggle_class: 'btn js-timezone-dropdown', title: _("Select a timezone"), filter: true, placeholder: s_("OfSearchInADropdown|Filter"), data: { data: timezone_data } } ) + = dropdown_tag(_("Select a timezone"), options: { toggle_class: 'btn js-timezone-dropdown w-100', dropdown_class: 'w-100', title: _("Select a timezone"), filter: true, placeholder: s_("OfSearchInADropdown|Filter"), data: { data: timezone_data } } ) = f.text_field :cron_timezone, value: @schedule.cron_timezone, id: 'schedule_cron_timezone', class: 'hidden', name: 'schedule[cron_timezone]', required: true .form-group.row .col-md-9 = f.label :ref, _('Target Branch'), class: 'label-bold' - = dropdown_tag(_("Select target branch"), options: { toggle_class: 'btn js-target-branch-dropdown', dropdown_class: 'git-revision-dropdown', title: _("Select target branch"), filter: true, placeholder: s_("OfSearchInADropdown|Filter"), data: { data: @project.repository.branch_names, default_branch: @project.default_branch } } ) + = dropdown_tag(_("Select target branch"), options: { toggle_class: 'btn js-target-branch-dropdown w-100', dropdown_class: 'git-revision-dropdown w-100', title: _("Select target branch"), filter: true, placeholder: s_("OfSearchInADropdown|Filter"), data: { data: @project.repository.branch_names, default_branch: @project.default_branch } } ) = f.text_field :ref, value: @schedule.ref, id: 'schedule_ref', class: 'hidden', name: 'schedule[ref]', required: true .form-group.row.js-ci-variable-list-section .col-md-9 diff --git a/app/views/projects/protected_branches/shared/_protected_branch.html.haml b/app/views/projects/protected_branches/shared/_protected_branch.html.haml index bb7998f739d..81dcab1d1ab 100644 --- a/app/views/projects/protected_branches/shared/_protected_branch.html.haml +++ b/app/views/projects/protected_branches/shared/_protected_branch.html.haml @@ -1,6 +1,6 @@ - can_admin_project = can?(current_user, :admin_project, @project) -%tr.js-protected-branch-edit-form{ data: { url: namespace_project_protected_branch_path(@project.namespace, @project, protected_branch) } } +%tr.qa-protected-branch.js-protected-branch-edit-form{ data: { url: namespace_project_protected_branch_path(@project.namespace, @project, protected_branch) } } %td %span.ref-name= protected_branch.name diff --git a/changelogs/unreleased/11124-update-deployment-service-fails-if-project-is-nil.yml b/changelogs/unreleased/11124-update-deployment-service-fails-if-project-is-nil.yml new file mode 100644 index 00000000000..355743f4cb0 --- /dev/null +++ b/changelogs/unreleased/11124-update-deployment-service-fails-if-project-is-nil.yml @@ -0,0 +1,5 @@ +--- +title: Always return the deployment in the UpdateDeploymentService#execute method +merge_request: 27322 +author: +type: fixed diff --git a/changelogs/unreleased/59921-pipeline-schedule.yml b/changelogs/unreleased/59921-pipeline-schedule.yml new file mode 100644 index 00000000000..4227a047913 --- /dev/null +++ b/changelogs/unreleased/59921-pipeline-schedule.yml @@ -0,0 +1,5 @@ +--- +title: Replaces CSS with BS4 utility class for pipeline schedules +merge_request: +author: +type: other diff --git a/changelogs/unreleased/60224-btn-env.yml b/changelogs/unreleased/60224-btn-env.yml new file mode 100644 index 00000000000..5053ddb31fa --- /dev/null +++ b/changelogs/unreleased/60224-btn-env.yml @@ -0,0 +1,5 @@ +--- +title: Fixes actions dropdowns in environments page +merge_request: 27160 +author: +type: fixed diff --git a/changelogs/unreleased/60241-merge-request-popover-doesn-t-go-away-on-mouse-leave.yml b/changelogs/unreleased/60241-merge-request-popover-doesn-t-go-away-on-mouse-leave.yml new file mode 100644 index 00000000000..ce942777dca --- /dev/null +++ b/changelogs/unreleased/60241-merge-request-popover-doesn-t-go-away-on-mouse-leave.yml @@ -0,0 +1,5 @@ +--- +title: Fix bug where MR popover doesn't go away on mouse leave +merge_request: +author: +type: fixed diff --git a/changelogs/unreleased/60261-save-btn-env.yml b/changelogs/unreleased/60261-save-btn-env.yml new file mode 100644 index 00000000000..b0936198d2e --- /dev/null +++ b/changelogs/unreleased/60261-save-btn-env.yml @@ -0,0 +1,5 @@ +--- +title: Fixes create button background for Environments form +merge_request: 27161 +author: +type: fixed diff --git a/doc/administration/pages/index.md b/doc/administration/pages/index.md index 17d72b96a51..1373bd56fe3 100644 --- a/doc/administration/pages/index.md +++ b/doc/administration/pages/index.md @@ -174,6 +174,10 @@ behavior: 1. [Reconfigure GitLab][reconfigure]. +NOTE: **Note:** +`inplace_chroot` option might not work with the other features, such as [Pages Access Control](#access-control). +The [GitLab Pages README](https://gitlab.com/gitlab-org/gitlab-pages#caveats) has more information about caveats and workarounds. + ## Advanced configuration In addition to the wildcard domains, you can also have the option to configure diff --git a/doc/development/migration_style_guide.md b/doc/development/migration_style_guide.md index bb40c0d32b4..0c326eeb851 100644 --- a/doc/development/migration_style_guide.md +++ b/doc/development/migration_style_guide.md @@ -423,3 +423,9 @@ _namespaces_ that have a `project_id`. The `path` column for these rows will be renamed to their previous value followed by an integer. For example: `users` would turn into `users0` + +### Moving migrations from EE to CE + +When migrations need to be moved from GitLab Enterprise Edition to GitLab Community Edition, +a migration file should be moved from `ee/db/{post_,}migrate` directory in the `gitlab-ee` project to `db/{post_,}migrate` directory in the `gitlab-ce` project. This way +the schema number remains intact, there is no need to modify old migrations, and proper columns, tables or data are added in the Community Edition. diff --git a/locale/gitlab.pot b/locale/gitlab.pot index cfd630ae8e2..4f401acccf9 100644 --- a/locale/gitlab.pot +++ b/locale/gitlab.pot @@ -132,6 +132,12 @@ msgstr "" msgid "%{label_for_message} unavailable" msgstr "" +msgid "%{level_name} is not allowed in a %{group_level_name} group." +msgstr "" + +msgid "%{level_name} is not allowed since the fork source project has lower visibility." +msgstr "" + msgid "%{level_name} visibility has been restricted by the administrator." msgstr "" @@ -203,6 +209,12 @@ msgstr "" msgid "%{user_name} profile page" msgstr "" +msgid "'%{level}' is not a valid visibility level" +msgstr "" + +msgid "'%{source}' is not a import source" +msgstr "" + msgid "(external source)" msgstr "" @@ -978,6 +990,18 @@ msgstr "" msgid "Artifacts" msgstr "" +msgid "AsanaService|%{user} pushed to branch %{branch} of %{project_name} ( %{commit_url} ):" +msgstr "" + +msgid "AsanaService|Asana - Teamwork without email" +msgstr "" + +msgid "AsanaService|Comma-separated list of branches which will be automatically inspected. Leave blank to include all branches." +msgstr "" + +msgid "AsanaService|User Personal Access Token. User must have access to task, all comments will be attributed to this user." +msgstr "" + msgid "Ask your group maintainer to set up a group Runner." msgstr "" @@ -1221,6 +1245,24 @@ msgstr "" msgid "Badges|e.g. %{exampleUrl}" msgstr "" +msgid "BambooService|A continuous integration and build server" +msgstr "" + +msgid "BambooService|A user with API access, if applicable" +msgstr "" + +msgid "BambooService|Atlassian Bamboo CI" +msgstr "" + +msgid "BambooService|Bamboo build plan key like KEY" +msgstr "" + +msgid "BambooService|Bamboo root URL like https://bamboo.example.com" +msgstr "" + +msgid "BambooService|You must set up automatic revision labeling and a repository trigger in Bamboo." +msgstr "" + msgid "Be careful. Changing the project's namespace can have unintended side effects." msgstr "" @@ -1515,6 +1557,9 @@ msgstr "" msgid "Cannot modify managed Kubernetes cluster" msgstr "" +msgid "Cannot refer to a group milestone by an internal id!" +msgstr "" + msgid "Cannot render the image. Maximum character count (%{charLimit}) has been exceeded." msgstr "" @@ -2600,6 +2645,9 @@ msgstr "" msgid "Could not authorize chat nickname. Try again!" msgstr "" +msgid "Could not change HEAD: branch '%{branch}' does not exist" +msgstr "" + msgid "Could not connect to FogBugz, check your URL" msgstr "" @@ -3109,6 +3157,12 @@ msgstr "" msgid "Discard draft" msgstr "" +msgid "DiscordService|Discord Notifications" +msgstr "" + +msgid "DiscordService|Receive event notifications in Discord" +msgstr "" + msgid "Discover projects, groups and snippets. Share your projects with others" msgstr "" @@ -3235,6 +3289,9 @@ msgstr "" msgid "Email patch" msgstr "" +msgid "Email the pipelines status to a list of recipients." +msgstr "" + msgid "EmailError|It appears that the email is blank. Make sure your reply is at the top of the email, we can't process inline replies." msgstr "" @@ -3262,6 +3319,30 @@ msgstr "" msgid "Emails" msgstr "" +msgid "Emails separated by comma" +msgstr "" + +msgid "EmailsOnPushService|Disable code diffs" +msgstr "" + +msgid "EmailsOnPushService|Don't include possibly sensitive code diffs in notification body." +msgstr "" + +msgid "EmailsOnPushService|Email the commits and diff of each push to a list of recipients." +msgstr "" + +msgid "EmailsOnPushService|Emails on push" +msgstr "" + +msgid "EmailsOnPushService|Emails separated by whitespace" +msgstr "" + +msgid "EmailsOnPushService|Send from committer" +msgstr "" + +msgid "EmailsOnPushService|Send notifications from the committer's email address if the domain is part of the domain GitLab is running on (e.g. %{domains})." +msgstr "" + msgid "Embed" msgstr "" @@ -3751,6 +3832,15 @@ msgstr "" msgid "ExternalAuthorizationService|When no classification label is set the default label `%{default_label}` will be used." msgstr "" +msgid "ExternalWikiService|External Wiki" +msgstr "" + +msgid "ExternalWikiService|Replaces the link to the internal wiki with a link to an external wiki." +msgstr "" + +msgid "ExternalWikiService|The URL of the external Wiki" +msgstr "" + msgid "Facebook" msgstr "" @@ -3760,12 +3850,18 @@ msgstr "" msgid "Failed Jobs" msgstr "" +msgid "Failed create wiki" +msgstr "" + msgid "Failed to change the owner" msgstr "" msgid "Failed to check related branches." msgstr "" +msgid "Failed to create repository via gitlab-shell" +msgstr "" + msgid "Failed to create resources" msgstr "" @@ -3921,6 +4017,12 @@ msgstr "" msgid "FirstPushedBy|pushed by" msgstr "" +msgid "FlowdockService|Flowdock Git source token" +msgstr "" + +msgid "FlowdockService|Flowdock is a collaboration web app for technical teams." +msgstr "" + msgid "FogBugz Email" msgstr "" @@ -4607,6 +4709,9 @@ msgstr "" msgid "Incompatible Project" msgstr "" +msgid "Incompatible options set!" +msgstr "" + msgid "Indicates whether this runner can pick jobs without tags" msgstr "" @@ -4682,6 +4787,9 @@ msgstr "" msgid "Invalid Login or password" msgstr "" +msgid "Invalid feature" +msgstr "" + msgid "Invalid file." msgstr "" @@ -4691,6 +4799,9 @@ msgstr "" msgid "Invalid pin code" msgstr "" +msgid "Invalid repository path" +msgstr "" + msgid "Invalid two-factor code." msgstr "" @@ -4751,6 +4862,48 @@ msgstr "" msgid "January" msgstr "" +msgid "JiraService|Events for %{noteable_model_name} are disabled." +msgstr "" + +msgid "JiraService|If different from Web URL" +msgstr "" + +msgid "JiraService|JIRA API URL" +msgstr "" + +msgid "JiraService|JIRA comments will be created when an issue gets referenced in a commit." +msgstr "" + +msgid "JiraService|JIRA comments will be created when an issue gets referenced in a merge request." +msgstr "" + +msgid "JiraService|Jira issue tracker" +msgstr "" + +msgid "JiraService|Password or API token" +msgstr "" + +msgid "JiraService|Transition ID(s)" +msgstr "" + +msgid "JiraService|Use , or ; to separate multiple transition IDs" +msgstr "" + +msgid "JiraService|Use a password for server version and an API token for cloud version" +msgstr "" + +msgid "JiraService|Use a username for server version and an email for cloud version" +msgstr "" + +msgid "JiraService|Username or Email" +msgstr "" + +msgid "JiraService|Web URL" +msgstr "" + +msgid "JiraService|transition ids can have only numbers which can be split with , or ;" +msgstr "" + msgid "Job" msgstr "" @@ -5187,6 +5340,9 @@ msgstr "" msgid "Maximum job timeout" msgstr "" +msgid "Maximum job timeout has a value which could not be accepted" +msgstr "" + msgid "Maximum push size (MB)" msgstr "" @@ -6133,6 +6289,9 @@ msgstr "" msgid "Pipelines charts" msgstr "" +msgid "Pipelines emails" +msgstr "" + msgid "Pipelines for last month" msgstr "" @@ -6256,6 +6415,15 @@ msgstr "" msgid "Pipeline|with stages" msgstr "" +msgid "PivotalTrackerService|Comma-separated list of branches which will be automatically inspected. Leave blank to include all branches." +msgstr "" + +msgid "PivotalTrackerService|Pivotal Tracker API token." +msgstr "" + +msgid "PivotalTrackerService|Project Management Software (Source Commits Endpoint)" +msgstr "" + msgid "Plain diff" msgstr "" @@ -6667,6 +6835,9 @@ msgstr "" msgid "Project avatar" msgstr "" +msgid "Project cannot be shared with the group it is in or one of its ancestors." +msgstr "" + msgid "Project configuration, including services" msgstr "" @@ -6928,6 +7099,45 @@ msgstr "" msgid "Push to create a project" msgstr "" +msgid "PushoverService|%{user_name} deleted branch \"%{ref}\"." +msgstr "" + +msgid "PushoverService|%{user_name} push to branch \"%{ref}\"." +msgstr "" + +msgid "PushoverService|%{user_name} pushed new branch \"%{ref}\"." +msgstr "" + +msgid "PushoverService|High Priority" +msgstr "" + +msgid "PushoverService|Leave blank for all active devices" +msgstr "" + +msgid "PushoverService|Low Priority" +msgstr "" + +msgid "PushoverService|Lowest Priority" +msgstr "" + +msgid "PushoverService|Normal Priority" +msgstr "" + +msgid "PushoverService|Pushover makes it easy to get real-time notifications on your Android device, iPhone, iPad, and Desktop." +msgstr "" + +msgid "PushoverService|See project %{project_full_name}" +msgstr "" + +msgid "PushoverService|Total commits count: %{total_commits_count}" +msgstr "" + +msgid "PushoverService|Your application key" +msgstr "" + +msgid "PushoverService|Your user key" +msgstr "" + msgid "Quick actions can be used in the issues description and comment boxes." msgstr "" @@ -7014,6 +7224,9 @@ msgstr "" msgid "Remind later" msgstr "" +msgid "Remote object has no absolute path." +msgstr "" + msgid "Remove" msgstr "" @@ -8427,6 +8640,9 @@ msgstr "" msgid "The name %{entryName} is already taken in this directory." msgstr "" +msgid "The number of times an upload record could not find its file" +msgstr "" + msgid "The passphrase required to decrypt the private key. This is optional and the value is encrypted at rest." msgstr "" @@ -8454,12 +8670,18 @@ msgstr "" msgid "The project can be accessed without any authentication." msgstr "" +msgid "The project is still being deleted. Please try again later." +msgstr "" + msgid "The project was successfully forked." msgstr "" msgid "The project was successfully imported." msgstr "" +msgid "The remote mirror took to long to complete." +msgstr "" + msgid "The remote repository is being updated..." msgstr "" @@ -8559,6 +8781,9 @@ msgstr "" msgid "There are no unstaged changes" msgstr "" +msgid "There is already a repository with that name on disk" +msgstr "" + msgid "There was an error loading users activity calendar." msgstr "" @@ -8655,6 +8880,9 @@ msgstr "" msgid "This group does not provide any group Runners yet." msgstr "" +msgid "This is a \"Ghost User\", created to hold all issues authored by users that have since been deleted. This user cannot be removed." +msgstr "" + msgid "This is a confidential issue." msgstr "" @@ -9196,6 +9424,12 @@ msgstr "" msgid "Unfortunately, your email message to GitLab could not be processed." msgstr "" +msgid "Unknown encryption strategy: %{encrypted_strategy}!" +msgstr "" + +msgid "Unknown format" +msgstr "" + msgid "Unlock" msgstr "" @@ -9292,6 +9526,9 @@ msgstr "" msgid "Upload file" msgstr "" +msgid "Upload file does not exist" +msgstr "" + msgid "Upload object map" msgstr "" @@ -9457,6 +9694,9 @@ msgstr "" msgid "Users were successfully added." msgstr "" +msgid "Using required encryption strategy when encrypted field is missing!" +msgstr "" + msgid "Validate" msgstr "" @@ -10038,6 +10278,9 @@ msgstr "" msgid "Your Todos" msgstr "" +msgid "Your U2F device did not send a valid JSON response." +msgstr "" + msgid "Your U2F device needs to be set up. Plug it in (if not already) and click the button on the left." msgstr "" @@ -10119,6 +10362,12 @@ msgstr "" msgid "allowed to fail" msgstr "" +msgid "already being used for another group or project milestone." +msgstr "" + +msgid "already shared with this group" +msgstr "" + msgid "among other things" msgstr "" @@ -10131,6 +10380,15 @@ msgstr "" msgid "branch name" msgstr "" +msgid "cannot be changed if a personal project has container registry tags." +msgstr "" + +msgid "cannot be enabled unless all domains have TLS certificates" +msgstr "" + +msgid "cannot include leading slash or directory traversal." +msgstr "" + msgid "commented on %{link_to_project}" msgstr "" @@ -10174,9 +10432,15 @@ msgstr[1] "" msgid "done" msgstr "" +msgid "element is not a hierarchy" +msgstr "" + msgid "enabled" msgstr "" +msgid "encrypted: needs to be a :required, :optional or :migrating!" +msgstr "" + msgid "error" msgstr "" @@ -10210,6 +10474,9 @@ msgstr "" msgid "group" msgstr "" +msgid "has already been taken" +msgstr "" + msgid "here" msgstr "" @@ -10237,6 +10504,9 @@ msgstr "" msgid "is not a valid X509 certificate." msgstr "" +msgid "is not an email you own" +msgstr "" + msgid "issue boards" msgstr "" @@ -10269,6 +10539,9 @@ msgid_plural "merge requests" msgstr[0] "" msgstr[1] "" +msgid "milestone should belong either to a project or a group." +msgstr "" + msgid "missing" msgstr "" @@ -10476,9 +10749,15 @@ msgstr "" msgid "mrWidget|to be merged automatically when the pipeline succeeds" msgstr "" +msgid "must be greater than start date" +msgstr "" + msgid "n/a" msgstr "" +msgid "needs to be beetween 10 minutes and 1 month" +msgstr "" + msgid "new merge request" msgstr "" @@ -10566,6 +10845,9 @@ msgstr "" msgid "source diff" msgstr "" +msgid "specified top is not part of the tree" +msgstr "" + msgid "spendCommand|%{slash_command} will update the sum of the time spent." msgstr "" diff --git a/qa/Dockerfile b/qa/Dockerfile index ae3ec2acfdf..ca7f9accb70 100644 --- a/qa/Dockerfile +++ b/qa/Dockerfile @@ -30,7 +30,7 @@ RUN wget -q https://download.docker.com/linux/static/stable/x86_64/docker-17.09. # RUN curl -sS -L https://dl.google.com/linux/linux_signing_key.pub | apt-key add - RUN echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google.list -RUN apt-get update -q && apt-get install -y --allow-unauthenticated google-chrome-stable && apt-get clean +RUN apt-get update -q && apt-get install -y google-chrome-stable && apt-get clean ## # Install chromedriver to make it work with Selenium diff --git a/qa/Gemfile.lock b/qa/Gemfile.lock index c9b0db6a272..9d3d42fb6ae 100644 --- a/qa/Gemfile.lock +++ b/qa/Gemfile.lock @@ -49,7 +49,7 @@ GEM mini_portile2 (2.4.0) minitest (5.11.1) netrc (0.11.0) - nokogiri (1.10.1) + nokogiri (1.10.2) mini_portile2 (~> 2.4.0) pry (0.11.3) coderay (~> 1.1.0) diff --git a/qa/spec/specs/runner_spec.rb b/qa/spec/specs/runner_spec.rb index 741821ddf8c..5c86c102105 100644 --- a/qa/spec/specs/runner_spec.rb +++ b/qa/spec/specs/runner_spec.rb @@ -69,7 +69,7 @@ describe QA::Specs::Runner do subject { described_class.new } - it 'it includes default args and excludes the skip_signup_disabled tag' do + it 'includes default args and excludes the skip_signup_disabled tag' do expect_rspec_runner_arguments(['--tag', '~orchestrated', '--tag', '~skip_signup_disabled', *described_class::DEFAULT_TEST_PATH_ARGS]) subject.perform @@ -83,7 +83,7 @@ describe QA::Specs::Runner do subject { described_class.new } - it 'it includes default args and excludes the requires_git_protocol_v2 tag' do + it 'includes default args and excludes the requires_git_protocol_v2 tag' do expect_rspec_runner_arguments(['--tag', '~orchestrated', '--tag', '~requires_git_protocol_v2', *described_class::DEFAULT_TEST_PATH_ARGS]) subject.perform diff --git a/spec/features/admin/admin_hooks_spec.rb b/spec/features/admin/admin_hooks_spec.rb index 25ed3bdc88e..ce780789f5a 100644 --- a/spec/features/admin/admin_hooks_spec.rb +++ b/spec/features/admin/admin_hooks_spec.rb @@ -73,22 +73,26 @@ describe 'Admin::Hooks' do end describe 'Remove existing hook', :js do + let(:hook_url) { generate(:url) } + before do - create(:system_hook) + create(:system_hook, url: hook_url) end context 'removes existing hook' do it 'from hooks list page' do visit admin_hooks_path - expect { accept_confirm { find(:link, 'Remove').send_keys(:return) } }.to change(SystemHook, :count).by(-1) + accept_confirm { click_link 'Remove' } + expect(page).not_to have_content(hook_url) end it 'from hook edit page' do visit admin_hooks_path click_link 'Edit' - expect { accept_confirm { find(:link, 'Remove').send_keys(:return) } }.to change(SystemHook, :count).by(-1) + accept_confirm { click_link 'Remove' } + expect(page).not_to have_content(hook_url) end end end diff --git a/spec/features/projects/commit/comments/user_adds_comment_spec.rb b/spec/features/projects/commit/comments/user_adds_comment_spec.rb index 29442a58ea4..586e2e33112 100644 --- a/spec/features/projects/commit/comments/user_adds_comment_spec.rb +++ b/spec/features/projects/commit/comments/user_adds_comment_spec.rb @@ -138,7 +138,7 @@ describe "User adds a comment on a commit", :js do click_button("Comment") end - page.within(".diff-file:nth-of-type(1) .notes_content.parallel.old") do + page.within(".diff-file:nth-of-type(1) .notes-content.parallel.old") do expect(page).to have_content(old_comment) end @@ -152,7 +152,7 @@ describe "User adds a comment on a commit", :js do wait_for_requests - expect(all(".diff-file:nth-of-type(1) .notes_content.parallel.new")[1].text).to have_content(new_comment) + expect(all(".diff-file:nth-of-type(1) .notes-content.parallel.new")[1].text).to have_content(new_comment) end end diff --git a/spec/features/projects/members/user_requests_access_spec.rb b/spec/features/projects/members/user_requests_access_spec.rb index 50ba67f0ffc..f26941ab567 100644 --- a/spec/features/projects/members/user_requests_access_spec.rb +++ b/spec/features/projects/members/user_requests_access_spec.rb @@ -62,8 +62,9 @@ describe 'Projects > Members > User requests access', :js do accept_confirm { click_link 'Withdraw Access Request' } - expect(project.requesters.exists?(user_id: user)).to be_falsey expect(page).to have_content 'Your access request to the project has been withdrawn.' + expect(page).not_to have_content 'Withdraw Access Request' + expect(page).to have_content 'Request Access' end def open_project_settings_menu diff --git a/spec/features/u2f_spec.rb b/spec/features/u2f_spec.rb index ae9b65d1a39..ea02f36d9d0 100644 --- a/spec/features/u2f_spec.rb +++ b/spec/features/u2f_spec.rb @@ -246,26 +246,6 @@ describe 'Using U2F (Universal 2nd Factor) Devices for Authentication', :js do end end end - - describe "when two-factor authentication is disabled" do - let(:user) { create(:user) } - - before do - user = gitlab_sign_in(:user) - user.update_attribute(:otp_required_for_login, true) - visit profile_account_path - manage_two_factor_authentication - expect(page).to have_content("Your U2F device needs to be set up.") - register_u2f_device - end - - it "deletes u2f registrations" do - visit profile_two_factor_auth_path - expect do - accept_confirm { click_on "Disable" } - end.to change { U2fRegistration.count }.by(-1) - end - end end describe 'fallback code authentication' do diff --git a/spec/frontend/lib/utils/text_utility_spec.js b/spec/frontend/lib/utils/text_utility_spec.js index 17fdbf606b2..0878c1de095 100644 --- a/spec/frontend/lib/utils/text_utility_spec.js +++ b/spec/frontend/lib/utils/text_utility_spec.js @@ -49,12 +49,6 @@ describe('text_utility', () => { }); }); - describe('slugify', () => { - it('should remove accents and convert to lower case', () => { - expect(textUtils.slugify('João')).toEqual('joão'); - }); - }); - describe('capitalizeFirstCharacter', () => { it('returns string with first letter capitalized', () => { expect(textUtils.capitalizeFirstCharacter('gitlab')).toEqual('Gitlab'); @@ -150,6 +144,12 @@ describe('text_utility', () => { }); }); + describe('slugifyWithUnderscore', () => { + it('should replaces whitespaces with underscore and convert to lower case', () => { + expect(textUtils.slugifyWithUnderscore('My Input String')).toEqual('my_input_string'); + }); + }); + describe('truncateNamespace', () => { it(`should return the root namespace if the namespace only includes one level`, () => { expect(textUtils.truncateNamespace('a / b')).toBe('a'); diff --git a/spec/frontend/mr_popover/index_spec.js b/spec/frontend/mr_popover/index_spec.js new file mode 100644 index 00000000000..8c33e52a04b --- /dev/null +++ b/spec/frontend/mr_popover/index_spec.js @@ -0,0 +1,30 @@ +import * as createDefaultClient from '~/lib/graphql'; +import { setHTMLFixture } from '../helpers/fixtures'; +import initMRPopovers from '~/mr_popover/index'; + +createDefaultClient.default = jest.fn(); + +describe('initMRPopovers', () => { + let mr1; + let mr2; + + beforeEach(() => { + setHTMLFixture(` + <div id="one" class="gfm-merge_request">MR1</div> + <div id="two" class="gfm-merge_request">MR2</div> + `); + + mr1 = document.querySelector('#one'); + mr2 = document.querySelector('#two'); + + mr1.addEventListener = jest.fn(); + mr2.addEventListener = jest.fn(); + }); + + it('does not add the same event listener twice', () => { + initMRPopovers([mr1, mr1, mr2]); + + expect(mr1.addEventListener).toHaveBeenCalledTimes(1); + expect(mr2.addEventListener).toHaveBeenCalledTimes(1); + }); +}); diff --git a/spec/javascripts/breakpoints_spec.js b/spec/javascripts/breakpoints_spec.js index 5ee777fee3f..fc0d9eb907a 100644 --- a/spec/javascripts/breakpoints_spec.js +++ b/spec/javascripts/breakpoints_spec.js @@ -10,4 +10,18 @@ describe('breakpoints', () => { expect(bp.getBreakpointSize()).toBe(key); }); }); + + describe('isDesktop', () => { + it('returns true when screen size is medium', () => { + spyOn(bp, 'windowWidth').and.returnValue(breakpoints.md + 10); + + expect(bp.isDesktop()).toBe(true); + }); + + it('returns false when screen size is small', () => { + spyOn(bp, 'windowWidth').and.returnValue(breakpoints.sm + 10); + + expect(bp.isDesktop()).toBe(false); + }); + }); }); diff --git a/spec/javascripts/diffs/components/app_spec.js b/spec/javascripts/diffs/components/app_spec.js index 3ce69bc3c20..1aabf3c2132 100644 --- a/spec/javascripts/diffs/components/app_spec.js +++ b/spec/javascripts/diffs/components/app_spec.js @@ -75,6 +75,14 @@ describe('diffs/components/app', () => { expect(wrapper.contains('.container-limited.limit-container-width')).toBe(false); }); + it('does not add container-limiting classes when isFluidLayout', () => { + createComponent({ isFluidLayout: true }, ({ state }) => { + state.diffs.isParallelView = false; + }); + + expect(wrapper.contains('.container-limited.limit-container-width')).toBe(false); + }); + it('displays loading icon on loading', () => { createComponent({}, ({ state }) => { state.diffs.isLoading = true; diff --git a/spec/models/wiki_page_spec.rb b/spec/models/wiki_page_spec.rb index cacdb0e0595..d5c85c11195 100644 --- a/spec/models/wiki_page_spec.rb +++ b/spec/models/wiki_page_spec.rb @@ -22,6 +22,7 @@ describe WikiPage do create_page('dir_1/dir_1_1/page_3', 'content') create_page('page_1', 'content') create_page('dir_1/page_2', 'content') + create_page('dir_2', 'page with dir name') create_page('dir_2/page_5', 'content') create_page('page_6', 'content') create_page('dir_2/page_4', 'content') @@ -29,6 +30,7 @@ describe WikiPage do let(:page_1) { wiki.find_page('page_1') } let(:page_6) { wiki.find_page('page_6') } + let(:page_dir_2) { wiki.find_page('dir_2') } let(:dir_1) do WikiDirectory.new('dir_1', [wiki.find_page('dir_1/page_2')]) @@ -44,7 +46,7 @@ describe WikiPage do context 'sort by title' do let(:grouped_entries) { described_class.group_by_directory(wiki.pages) } - let(:expected_grouped_entries) { [dir_1_1, dir_1, dir_2, page_1, page_6] } + let(:expected_grouped_entries) { [dir_1_1, dir_1, page_dir_2, dir_2, page_1, page_6] } it 'returns an array with pages and directories' do grouped_entries.each_with_index do |page_or_dir, i| @@ -59,7 +61,7 @@ describe WikiPage do context 'sort by created_at' do let(:grouped_entries) { described_class.group_by_directory(wiki.pages(sort: 'created_at')) } - let(:expected_grouped_entries) { [dir_1_1, page_1, dir_1, dir_2, page_6] } + let(:expected_grouped_entries) { [dir_1_1, page_1, dir_1, page_dir_2, dir_2, page_6] } it 'returns an array with pages and directories' do grouped_entries.each_with_index do |page_or_dir, i| @@ -73,7 +75,7 @@ describe WikiPage do end it 'returns an array with retained order with directories at the top' do - expected_order = ['dir_1/dir_1_1/page_3', 'dir_1/page_2', 'dir_2/page_4', 'dir_2/page_5', 'page_1', 'page_6'] + expected_order = ['dir_1/dir_1_1/page_3', 'dir_1/page_2', 'dir_2', 'dir_2/page_4', 'dir_2/page_5', 'page_1', 'page_6'] grouped_entries = described_class.group_by_directory(wiki.pages) diff --git a/spec/requests/api/pipelines_spec.rb b/spec/requests/api/pipelines_spec.rb index 0d46463312b..26158231444 100644 --- a/spec/requests/api/pipelines_spec.rb +++ b/spec/requests/api/pipelines_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe API::Pipelines do @@ -493,7 +495,7 @@ describe API::Pipelines do context 'pipeline created is not created by the developer user' do let(:api_user) { create(:user) } - it 'should not return pipeline variables' do + it 'does not return pipeline variables' do subject expect(response).to have_gitlab_http_status(403) @@ -502,7 +504,7 @@ describe API::Pipelines do end context 'user is not a project member' do - it 'should not return pipeline variables' do + it 'does not return pipeline variables' do get api("/projects/#{project.id}/pipelines/#{pipeline.id}/variables", non_member) expect(response).to have_gitlab_http_status(404) diff --git a/spec/services/access_token_validation_service_spec.rb b/spec/services/access_token_validation_service_spec.rb index 38a3f522504..b2a8da6c4c6 100644 --- a/spec/services/access_token_validation_service_spec.rb +++ b/spec/services/access_token_validation_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe AccessTokenValidationService do diff --git a/spec/services/application_settings/update_service_spec.rb b/spec/services/application_settings/update_service_spec.rb index 258e5635113..a641828faa5 100644 --- a/spec/services/application_settings/update_service_spec.rb +++ b/spec/services/application_settings/update_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe ApplicationSettings::UpdateService do diff --git a/spec/services/auth/container_registry_authentication_service_spec.rb b/spec/services/auth/container_registry_authentication_service_spec.rb index c9d85e96750..e24fe60f059 100644 --- a/spec/services/auth/container_registry_authentication_service_spec.rb +++ b/spec/services/auth/container_registry_authentication_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Auth::ContainerRegistryAuthenticationService do diff --git a/spec/services/base_count_service_spec.rb b/spec/services/base_count_service_spec.rb index 090b2dcdd43..275bec9982d 100644 --- a/spec/services/base_count_service_spec.rb +++ b/spec/services/base_count_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe BaseCountService, :use_clean_rails_memory_store_caching do diff --git a/spec/services/boards/create_service_spec.rb b/spec/services/boards/create_service_spec.rb index a715261cd6c..7d4fb04c6c0 100644 --- a/spec/services/boards/create_service_spec.rb +++ b/spec/services/boards/create_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Boards::CreateService do diff --git a/spec/services/boards/issues/create_service_spec.rb b/spec/services/boards/issues/create_service_spec.rb index f0179e35652..33637419f83 100644 --- a/spec/services/boards/issues/create_service_spec.rb +++ b/spec/services/boards/issues/create_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Boards::Issues::CreateService do diff --git a/spec/services/boards/issues/list_service_spec.rb b/spec/services/boards/issues/list_service_spec.rb index aaad29536af..40878e24cb4 100644 --- a/spec/services/boards/issues/list_service_spec.rb +++ b/spec/services/boards/issues/list_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Boards::Issues::ListService do diff --git a/spec/services/boards/issues/move_service_spec.rb b/spec/services/boards/issues/move_service_spec.rb index 6020f0771e5..16e2a2fba6b 100644 --- a/spec/services/boards/issues/move_service_spec.rb +++ b/spec/services/boards/issues/move_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Boards::Issues::MoveService do diff --git a/spec/services/boards/list_service_spec.rb b/spec/services/boards/list_service_spec.rb index 7518e9e9b75..c9d372ea166 100644 --- a/spec/services/boards/list_service_spec.rb +++ b/spec/services/boards/list_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Boards::ListService do diff --git a/spec/services/boards/lists/create_service_spec.rb b/spec/services/boards/lists/create_service_spec.rb index 7d3f5f86deb..295ec2c8156 100644 --- a/spec/services/boards/lists/create_service_spec.rb +++ b/spec/services/boards/lists/create_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Boards::Lists::CreateService do diff --git a/spec/services/boards/lists/destroy_service_spec.rb b/spec/services/boards/lists/destroy_service_spec.rb index 3c4eb6b3fc5..b936ef3837f 100644 --- a/spec/services/boards/lists/destroy_service_spec.rb +++ b/spec/services/boards/lists/destroy_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Boards::Lists::DestroyService do diff --git a/spec/services/boards/lists/generate_service_spec.rb b/spec/services/boards/lists/generate_service_spec.rb index 82dbd1ee744..77b42392470 100644 --- a/spec/services/boards/lists/generate_service_spec.rb +++ b/spec/services/boards/lists/generate_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Boards::Lists::GenerateService do diff --git a/spec/services/boards/lists/list_service_spec.rb b/spec/services/boards/lists/list_service_spec.rb index 24e04eed642..2ebfd295fa2 100644 --- a/spec/services/boards/lists/list_service_spec.rb +++ b/spec/services/boards/lists/list_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Boards::Lists::ListService do diff --git a/spec/services/boards/lists/move_service_spec.rb b/spec/services/boards/lists/move_service_spec.rb index 16dfb2ae6af..f8fc70ef2d6 100644 --- a/spec/services/boards/lists/move_service_spec.rb +++ b/spec/services/boards/lists/move_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Boards::Lists::MoveService do diff --git a/spec/services/chat_names/authorize_user_service_spec.rb b/spec/services/chat_names/authorize_user_service_spec.rb index d88b2504133..41cbac4e8e9 100644 --- a/spec/services/chat_names/authorize_user_service_spec.rb +++ b/spec/services/chat_names/authorize_user_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe ChatNames::AuthorizeUserService do diff --git a/spec/services/chat_names/find_user_service_spec.rb b/spec/services/chat_names/find_user_service_spec.rb index 5734b10109a..9d26f98cd56 100644 --- a/spec/services/chat_names/find_user_service_spec.rb +++ b/spec/services/chat_names/find_user_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe ChatNames::FindUserService, :clean_gitlab_redis_shared_state do diff --git a/spec/services/ci/archive_trace_service_spec.rb b/spec/services/ci/archive_trace_service_spec.rb index 8e9cb65f3bc..44a77c29086 100644 --- a/spec/services/ci/archive_trace_service_spec.rb +++ b/spec/services/ci/archive_trace_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Ci::ArchiveTraceService, '#execute' do diff --git a/spec/services/ci/compare_test_reports_service_spec.rb b/spec/services/ci/compare_test_reports_service_spec.rb index a26c970a8f0..f5edd3a552d 100644 --- a/spec/services/ci/compare_test_reports_service_spec.rb +++ b/spec/services/ci/compare_test_reports_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Ci::CompareTestReportsService do diff --git a/spec/services/ci/create_pipeline_service_spec.rb b/spec/services/ci/create_pipeline_service_spec.rb index 101b91e9cd8..6f8a76e9d56 100644 --- a/spec/services/ci/create_pipeline_service_spec.rb +++ b/spec/services/ci/create_pipeline_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Ci::CreatePipelineService do diff --git a/spec/services/ci/destroy_expired_job_artifacts_service_spec.rb b/spec/services/ci/destroy_expired_job_artifacts_service_spec.rb index 80d82ba3ac9..fc5450ab33d 100644 --- a/spec/services/ci/destroy_expired_job_artifacts_service_spec.rb +++ b/spec/services/ci/destroy_expired_job_artifacts_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Ci::DestroyExpiredJobArtifactsService, :clean_gitlab_redis_shared_state do diff --git a/spec/services/ci/ensure_stage_service_spec.rb b/spec/services/ci/ensure_stage_service_spec.rb index d17e30763d7..43bbd2130a4 100644 --- a/spec/services/ci/ensure_stage_service_spec.rb +++ b/spec/services/ci/ensure_stage_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Ci::EnsureStageService, '#execute' do diff --git a/spec/services/ci/extract_sections_from_build_trace_service_spec.rb b/spec/services/ci/extract_sections_from_build_trace_service_spec.rb index 28f2fa7903a..03c67c611fe 100644 --- a/spec/services/ci/extract_sections_from_build_trace_service_spec.rb +++ b/spec/services/ci/extract_sections_from_build_trace_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Ci::ExtractSectionsFromBuildTraceService, '#execute' do diff --git a/spec/services/ci/pipeline_trigger_service_spec.rb b/spec/services/ci/pipeline_trigger_service_spec.rb index f4ff818c479..76251b5b557 100644 --- a/spec/services/ci/pipeline_trigger_service_spec.rb +++ b/spec/services/ci/pipeline_trigger_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Ci::PipelineTriggerService do diff --git a/spec/services/ci/play_build_service_spec.rb b/spec/services/ci/play_build_service_spec.rb index 330ec81e87d..634f865e2d8 100644 --- a/spec/services/ci/play_build_service_spec.rb +++ b/spec/services/ci/play_build_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Ci::PlayBuildService, '#execute' do diff --git a/spec/services/ci/process_pipeline_service_spec.rb b/spec/services/ci/process_pipeline_service_spec.rb index 6674d89518e..cadb519ccee 100644 --- a/spec/services/ci/process_pipeline_service_spec.rb +++ b/spec/services/ci/process_pipeline_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Ci::ProcessPipelineService, '#execute' do diff --git a/spec/services/ci/register_job_service_spec.rb b/spec/services/ci/register_job_service_spec.rb index 20181387612..874945c8585 100644 --- a/spec/services/ci/register_job_service_spec.rb +++ b/spec/services/ci/register_job_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' module Ci diff --git a/spec/services/ci/retry_build_service_spec.rb b/spec/services/ci/retry_build_service_spec.rb index 17e2b17a499..fc630b7098a 100644 --- a/spec/services/ci/retry_build_service_spec.rb +++ b/spec/services/ci/retry_build_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Ci::RetryBuildService do diff --git a/spec/services/ci/retry_pipeline_service_spec.rb b/spec/services/ci/retry_pipeline_service_spec.rb index 75042b29bea..e42de3cd48f 100644 --- a/spec/services/ci/retry_pipeline_service_spec.rb +++ b/spec/services/ci/retry_pipeline_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Ci::RetryPipelineService, '#execute' do diff --git a/spec/services/ci/run_scheduled_build_service_spec.rb b/spec/services/ci/run_scheduled_build_service_spec.rb index be2aad33ef4..ab8d9f4ba2e 100644 --- a/spec/services/ci/run_scheduled_build_service_spec.rb +++ b/spec/services/ci/run_scheduled_build_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Ci::RunScheduledBuildService do diff --git a/spec/services/ci/stop_environments_service_spec.rb b/spec/services/ci/stop_environments_service_spec.rb index cdd3d851f61..31b8d540356 100644 --- a/spec/services/ci/stop_environments_service_spec.rb +++ b/spec/services/ci/stop_environments_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Ci::StopEnvironmentsService do diff --git a/spec/services/ci/update_build_queue_service_spec.rb b/spec/services/ci/update_build_queue_service_spec.rb index ca0c6be5da6..4b869385128 100644 --- a/spec/services/ci/update_build_queue_service_spec.rb +++ b/spec/services/ci/update_build_queue_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Ci::UpdateBuildQueueService do diff --git a/spec/services/ci/update_runner_service_spec.rb b/spec/services/ci/update_runner_service_spec.rb index 7cc04c92d27..2b07dad7248 100644 --- a/spec/services/ci/update_runner_service_spec.rb +++ b/spec/services/ci/update_runner_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Ci::UpdateRunnerService do diff --git a/spec/services/clusters/applications/check_ingress_ip_address_service_spec.rb b/spec/services/clusters/applications/check_ingress_ip_address_service_spec.rb index 80fc48d1b07..84bca76e69b 100644 --- a/spec/services/clusters/applications/check_ingress_ip_address_service_spec.rb +++ b/spec/services/clusters/applications/check_ingress_ip_address_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Clusters::Applications::CheckIngressIpAddressService do diff --git a/spec/services/clusters/applications/check_installation_progress_service_spec.rb b/spec/services/clusters/applications/check_installation_progress_service_spec.rb index 1cca89d31d7..8ad90aaf720 100644 --- a/spec/services/clusters/applications/check_installation_progress_service_spec.rb +++ b/spec/services/clusters/applications/check_installation_progress_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Clusters::Applications::CheckInstallationProgressService, '#execute' do diff --git a/spec/services/clusters/applications/install_service_spec.rb b/spec/services/clusters/applications/install_service_spec.rb index db0c33a95b2..9e1ae5e8742 100644 --- a/spec/services/clusters/applications/install_service_spec.rb +++ b/spec/services/clusters/applications/install_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Clusters::Applications::InstallService do @@ -58,7 +60,7 @@ describe Clusters::Applications::InstallService do let(:error) { StandardError.new('something bad happened') } before do - expect(application).to receive(:make_installing!).once.and_raise(error) + expect(helm_client).to receive(:install).with(install_command).and_raise(error) end include_examples 'logs kubernetes errors' do @@ -68,12 +70,10 @@ describe Clusters::Applications::InstallService do end it 'make the application errored' do - expect(helm_client).not_to receive(:install) - service.execute expect(application).to be_errored - expect(application.status_reason).to eq("Can't start installation process.") + expect(application.status_reason).to eq('Failed to install.') end end end diff --git a/spec/services/clusters/applications/patch_service_spec.rb b/spec/services/clusters/applications/patch_service_spec.rb index 10b1379a127..3ebe0540837 100644 --- a/spec/services/clusters/applications/patch_service_spec.rb +++ b/spec/services/clusters/applications/patch_service_spec.rb @@ -66,16 +66,14 @@ describe Clusters::Applications::PatchService do end before do - expect(application).to receive(:make_updating!).once.and_raise(error) + expect(helm_client).to receive(:update).with(update_command).and_raise(error) end it 'make the application errored' do - expect(helm_client).not_to receive(:update) - service.execute expect(application).to be_update_errored - expect(application.status_reason).to eq("Can't start update process.") + expect(application.status_reason).to eq('Failed to update.') end end end diff --git a/spec/services/clusters/applications/upgrade_service_spec.rb b/spec/services/clusters/applications/upgrade_service_spec.rb index dd2e6e94e4f..a80b1d9127c 100644 --- a/spec/services/clusters/applications/upgrade_service_spec.rb +++ b/spec/services/clusters/applications/upgrade_service_spec.rb @@ -60,7 +60,7 @@ describe Clusters::Applications::UpgradeService do let(:error) { StandardError.new('something bad happened') } before do - expect(application).to receive(:make_updating!).once.and_raise(error) + expect(helm_client).to receive(:update).with(install_command).and_raise(error) end include_examples 'logs kubernetes errors' do @@ -70,12 +70,10 @@ describe Clusters::Applications::UpgradeService do end it 'make the application errored' do - expect(helm_client).not_to receive(:update) - service.execute expect(application).to be_update_errored - expect(application.status_reason).to eq("Can't start upgrade process.") + expect(application.status_reason).to eq('Failed to upgrade.') end end end diff --git a/spec/services/clusters/create_service_spec.rb b/spec/services/clusters/create_service_spec.rb index 274880f2c49..ecf0a9c9dce 100644 --- a/spec/services/clusters/create_service_spec.rb +++ b/spec/services/clusters/create_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Clusters::CreateService do diff --git a/spec/services/clusters/gcp/fetch_operation_service_spec.rb b/spec/services/clusters/gcp/fetch_operation_service_spec.rb index 55f123ee786..23da8004a7d 100644 --- a/spec/services/clusters/gcp/fetch_operation_service_spec.rb +++ b/spec/services/clusters/gcp/fetch_operation_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Clusters::Gcp::FetchOperationService do diff --git a/spec/services/clusters/gcp/provision_service_spec.rb b/spec/services/clusters/gcp/provision_service_spec.rb index c0bdac40938..dfd15690a1f 100644 --- a/spec/services/clusters/gcp/provision_service_spec.rb +++ b/spec/services/clusters/gcp/provision_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Clusters::Gcp::ProvisionService do diff --git a/spec/services/clusters/gcp/verify_provision_status_service_spec.rb b/spec/services/clusters/gcp/verify_provision_status_service_spec.rb index 2ee2fa51f63..9611b2080ba 100644 --- a/spec/services/clusters/gcp/verify_provision_status_service_spec.rb +++ b/spec/services/clusters/gcp/verify_provision_status_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Clusters::Gcp::VerifyProvisionStatusService do diff --git a/spec/services/clusters/update_service_spec.rb b/spec/services/clusters/update_service_spec.rb index b2e6ebecd4a..21b37f88fd8 100644 --- a/spec/services/clusters/update_service_spec.rb +++ b/spec/services/clusters/update_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Clusters::UpdateService do diff --git a/spec/services/cohorts_service_spec.rb b/spec/services/cohorts_service_spec.rb index 77595d7ba2d..2c012f080dd 100644 --- a/spec/services/cohorts_service_spec.rb +++ b/spec/services/cohorts_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe CohortsService do diff --git a/spec/services/compare_service_spec.rb b/spec/services/compare_service_spec.rb index 9e15eae8c13..0e4ef69ec19 100644 --- a/spec/services/compare_service_spec.rb +++ b/spec/services/compare_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe CompareService do diff --git a/spec/services/create_branch_service_spec.rb b/spec/services/create_branch_service_spec.rb index 38096a080a7..0d34c7f9a82 100644 --- a/spec/services/create_branch_service_spec.rb +++ b/spec/services/create_branch_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe CreateBranchService do diff --git a/spec/services/create_snippet_service_spec.rb b/spec/services/create_snippet_service_spec.rb index b6ab6b8271c..f6b6989b955 100644 --- a/spec/services/create_snippet_service_spec.rb +++ b/spec/services/create_snippet_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe CreateSnippetService do diff --git a/spec/services/delete_branch_service_spec.rb b/spec/services/delete_branch_service_spec.rb index 9c9fba030e7..43a70d33d2d 100644 --- a/spec/services/delete_branch_service_spec.rb +++ b/spec/services/delete_branch_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe DeleteBranchService do diff --git a/spec/services/delete_merged_branches_service_spec.rb b/spec/services/delete_merged_branches_service_spec.rb index 0de02576203..dffc2bd93ee 100644 --- a/spec/services/delete_merged_branches_service_spec.rb +++ b/spec/services/delete_merged_branches_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe DeleteMergedBranchesService do diff --git a/spec/services/deploy_keys/create_service_spec.rb b/spec/services/deploy_keys/create_service_spec.rb index 7a604c0cadd..a55f1561194 100644 --- a/spec/services/deploy_keys/create_service_spec.rb +++ b/spec/services/deploy_keys/create_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe DeployKeys::CreateService do diff --git a/spec/services/deploy_tokens/create_service_spec.rb b/spec/services/deploy_tokens/create_service_spec.rb index 1bd0356a73b..886ffd4593d 100644 --- a/spec/services/deploy_tokens/create_service_spec.rb +++ b/spec/services/deploy_tokens/create_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe DeployTokens::CreateService do diff --git a/spec/services/discussions/resolve_service_spec.rb b/spec/services/discussions/resolve_service_spec.rb index 4e0d4749239..5b99430cb75 100644 --- a/spec/services/discussions/resolve_service_spec.rb +++ b/spec/services/discussions/resolve_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Discussions::ResolveService do diff --git a/spec/services/discussions/update_diff_position_service_spec.rb b/spec/services/discussions/update_diff_position_service_spec.rb index 2b84206318f..60ec83e9062 100644 --- a/spec/services/discussions/update_diff_position_service_spec.rb +++ b/spec/services/discussions/update_diff_position_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Discussions::UpdateDiffPositionService do diff --git a/spec/services/emails/confirm_service_spec.rb b/spec/services/emails/confirm_service_spec.rb index 2b2c31e2521..6a274ca9dfe 100644 --- a/spec/services/emails/confirm_service_spec.rb +++ b/spec/services/emails/confirm_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Emails::ConfirmService do diff --git a/spec/services/event_create_service_spec.rb b/spec/services/event_create_service_spec.rb index 443665c9959..9f2c3fec62c 100644 --- a/spec/services/event_create_service_spec.rb +++ b/spec/services/event_create_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe EventCreateService do diff --git a/spec/services/events/render_service_spec.rb b/spec/services/events/render_service_spec.rb index 075cb45e46c..a623a05a56d 100644 --- a/spec/services/events/render_service_spec.rb +++ b/spec/services/events/render_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Events::RenderService do diff --git a/spec/services/files/create_service_spec.rb b/spec/services/files/create_service_spec.rb index 751b7160276..195f56a2909 100644 --- a/spec/services/files/create_service_spec.rb +++ b/spec/services/files/create_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "spec_helper" describe Files::CreateService do diff --git a/spec/services/files/delete_service_spec.rb b/spec/services/files/delete_service_spec.rb index 309802ce733..b849def06fc 100644 --- a/spec/services/files/delete_service_spec.rb +++ b/spec/services/files/delete_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "spec_helper" describe Files::DeleteService do diff --git a/spec/services/files/multi_service_spec.rb b/spec/services/files/multi_service_spec.rb index 6842fa9f435..0f51c72019e 100644 --- a/spec/services/files/multi_service_spec.rb +++ b/spec/services/files/multi_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "spec_helper" describe Files::MultiService do diff --git a/spec/services/files/update_service_spec.rb b/spec/services/files/update_service_spec.rb index 23db35c2418..37869b176ef 100644 --- a/spec/services/files/update_service_spec.rb +++ b/spec/services/files/update_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "spec_helper" describe Files::UpdateService do diff --git a/spec/services/git/branch_hooks_service_spec.rb b/spec/services/git/branch_hooks_service_spec.rb index bb87267db7d..4895e762602 100644 --- a/spec/services/git/branch_hooks_service_spec.rb +++ b/spec/services/git/branch_hooks_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Git::BranchHooksService do diff --git a/spec/services/git/branch_push_service_spec.rb b/spec/services/git/branch_push_service_spec.rb index 322e40a8112..ad21f710833 100644 --- a/spec/services/git/branch_push_service_spec.rb +++ b/spec/services/git/branch_push_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Git::BranchPushService, services: true do diff --git a/spec/services/git/tag_hooks_service_spec.rb b/spec/services/git/tag_hooks_service_spec.rb index 8f91ce3b4c5..f4c02932f98 100644 --- a/spec/services/git/tag_hooks_service_spec.rb +++ b/spec/services/git/tag_hooks_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Git::TagHooksService, :service do diff --git a/spec/services/git/tag_push_service_spec.rb b/spec/services/git/tag_push_service_spec.rb index 5e89a912060..418952b52da 100644 --- a/spec/services/git/tag_push_service_spec.rb +++ b/spec/services/git/tag_push_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Git::TagPushService do diff --git a/spec/services/gpg_keys/create_service_spec.rb b/spec/services/gpg_keys/create_service_spec.rb index 1cd2625531e..8dfc9f19439 100644 --- a/spec/services/gpg_keys/create_service_spec.rb +++ b/spec/services/gpg_keys/create_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe GpgKeys::CreateService do diff --git a/spec/services/gravatar_service_spec.rb b/spec/services/gravatar_service_spec.rb index d2cc53fe0ee..9ce1df0f76f 100644 --- a/spec/services/gravatar_service_spec.rb +++ b/spec/services/gravatar_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe GravatarService do diff --git a/spec/services/groups/create_service_spec.rb b/spec/services/groups/create_service_spec.rb index cd061afbfd5..c5ff6cdbacd 100644 --- a/spec/services/groups/create_service_spec.rb +++ b/spec/services/groups/create_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Groups::CreateService, '#execute' do diff --git a/spec/services/groups/destroy_service_spec.rb b/spec/services/groups/destroy_service_spec.rb index 98114ea4919..1ab2e994b7e 100644 --- a/spec/services/groups/destroy_service_spec.rb +++ b/spec/services/groups/destroy_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Groups::DestroyService do diff --git a/spec/services/groups/nested_create_service_spec.rb b/spec/services/groups/nested_create_service_spec.rb index 75d6ddb0a2c..13acf9e055b 100644 --- a/spec/services/groups/nested_create_service_spec.rb +++ b/spec/services/groups/nested_create_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Groups::NestedCreateService do diff --git a/spec/services/groups/transfer_service_spec.rb b/spec/services/groups/transfer_service_spec.rb index 0bc67dbb4a1..b5708ebba76 100644 --- a/spec/services/groups/transfer_service_spec.rb +++ b/spec/services/groups/transfer_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'rails_helper' describe Groups::TransferService, :postgresql do diff --git a/spec/services/groups/update_service_spec.rb b/spec/services/groups/update_service_spec.rb index d87a7dd234d..d081c20f669 100644 --- a/spec/services/groups/update_service_spec.rb +++ b/spec/services/groups/update_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Groups::UpdateService do diff --git a/spec/services/import_export_clean_up_service_spec.rb b/spec/services/import_export_clean_up_service_spec.rb index d5fcef1246f..51720e786dc 100644 --- a/spec/services/import_export_clean_up_service_spec.rb +++ b/spec/services/import_export_clean_up_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe ImportExportCleanUpService do diff --git a/spec/services/issuable/bulk_update_service_spec.rb b/spec/services/issuable/bulk_update_service_spec.rb index 363b7266940..aebc5ba2874 100644 --- a/spec/services/issuable/bulk_update_service_spec.rb +++ b/spec/services/issuable/bulk_update_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Issuable::BulkUpdateService do diff --git a/spec/services/issuable/common_system_notes_service_spec.rb b/spec/services/issuable/common_system_notes_service_spec.rb index 0edc9016c96..7e40ac9ff4d 100644 --- a/spec/services/issuable/common_system_notes_service_spec.rb +++ b/spec/services/issuable/common_system_notes_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Issuable::CommonSystemNotesService do diff --git a/spec/services/issuable/destroy_service_spec.rb b/spec/services/issuable/destroy_service_spec.rb index 15d1bb73ca3..dd6a966c145 100644 --- a/spec/services/issuable/destroy_service_spec.rb +++ b/spec/services/issuable/destroy_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Issuable::DestroyService do diff --git a/spec/services/issues/build_service_spec.rb b/spec/services/issues/build_service_spec.rb index 74f1e83b362..140b78f9b7a 100644 --- a/spec/services/issues/build_service_spec.rb +++ b/spec/services/issues/build_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper.rb' describe Issues::BuildService do diff --git a/spec/services/issues/close_service_spec.rb b/spec/services/issues/close_service_spec.rb index 5e38d0aeb6a..fce9eed8b08 100644 --- a/spec/services/issues/close_service_spec.rb +++ b/spec/services/issues/close_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Issues::CloseService do diff --git a/spec/services/issues/create_service_spec.rb b/spec/services/issues/create_service_spec.rb index d50412b6d2c..b7bedc2f97e 100644 --- a/spec/services/issues/create_service_spec.rb +++ b/spec/services/issues/create_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Issues::CreateService do diff --git a/spec/services/issues/duplicate_service_spec.rb b/spec/services/issues/duplicate_service_spec.rb index 089e77cc88b..2c9581b993c 100644 --- a/spec/services/issues/duplicate_service_spec.rb +++ b/spec/services/issues/duplicate_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Issues::DuplicateService do diff --git a/spec/services/issues/move_service_spec.rb b/spec/services/issues/move_service_spec.rb index 1e088bc7d9b..7483688d631 100644 --- a/spec/services/issues/move_service_spec.rb +++ b/spec/services/issues/move_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Issues::MoveService do diff --git a/spec/services/issues/related_branches_service_spec.rb b/spec/services/issues/related_branches_service_spec.rb index c2e1eba6a63..eae35f12560 100644 --- a/spec/services/issues/related_branches_service_spec.rb +++ b/spec/services/issues/related_branches_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Issues::RelatedBranchesService do diff --git a/spec/services/issues/reopen_service_spec.rb b/spec/services/issues/reopen_service_spec.rb index 2a56075419b..f04029e64aa 100644 --- a/spec/services/issues/reopen_service_spec.rb +++ b/spec/services/issues/reopen_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Issues::ReopenService do diff --git a/spec/services/issues/resolve_discussions_spec.rb b/spec/services/issues/resolve_discussions_spec.rb index b6cfc09da65..f12a3820b8d 100644 --- a/spec/services/issues/resolve_discussions_spec.rb +++ b/spec/services/issues/resolve_discussions_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper.rb' describe Issues::ResolveDiscussions do diff --git a/spec/services/issues/update_service_spec.rb b/spec/services/issues/update_service_spec.rb index 1c8a4b608d5..22f5607cb9c 100644 --- a/spec/services/issues/update_service_spec.rb +++ b/spec/services/issues/update_service_spec.rb @@ -1,4 +1,6 @@ # coding: utf-8 +# frozen_string_literal: true + require 'spec_helper' describe Issues::UpdateService, :mailer do diff --git a/spec/services/keys/create_service_spec.rb b/spec/services/keys/create_service_spec.rb index bcb436c1e46..1f8b402cf08 100644 --- a/spec/services/keys/create_service_spec.rb +++ b/spec/services/keys/create_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Keys::CreateService do diff --git a/spec/services/keys/destroy_service_spec.rb b/spec/services/keys/destroy_service_spec.rb index 28ac72ddd42..ca4bbd50c03 100644 --- a/spec/services/keys/destroy_service_spec.rb +++ b/spec/services/keys/destroy_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Keys::DestroyService do diff --git a/spec/services/keys/last_used_service_spec.rb b/spec/services/keys/last_used_service_spec.rb index 8e553c2f1fa..c675df39f4d 100644 --- a/spec/services/keys/last_used_service_spec.rb +++ b/spec/services/keys/last_used_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Keys::LastUsedService do diff --git a/spec/services/labels/create_service_spec.rb b/spec/services/labels/create_service_spec.rb index 438e6dbc628..f057c4401e7 100644 --- a/spec/services/labels/create_service_spec.rb +++ b/spec/services/labels/create_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Labels::CreateService do diff --git a/spec/services/labels/find_or_create_service_spec.rb b/spec/services/labels/find_or_create_service_spec.rb index 7af514a5bea..438d895392b 100644 --- a/spec/services/labels/find_or_create_service_spec.rb +++ b/spec/services/labels/find_or_create_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Labels::FindOrCreateService do diff --git a/spec/services/labels/promote_service_spec.rb b/spec/services/labels/promote_service_spec.rb index c4c7f33e36a..d86281b751c 100644 --- a/spec/services/labels/promote_service_spec.rb +++ b/spec/services/labels/promote_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Labels::PromoteService do diff --git a/spec/services/labels/transfer_service_spec.rb b/spec/services/labels/transfer_service_spec.rb index 80bac590a11..e29c6aeef5b 100644 --- a/spec/services/labels/transfer_service_spec.rb +++ b/spec/services/labels/transfer_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Labels::TransferService do diff --git a/spec/services/labels/update_service_spec.rb b/spec/services/labels/update_service_spec.rb index c3fe33045fa..045e8af1135 100644 --- a/spec/services/labels/update_service_spec.rb +++ b/spec/services/labels/update_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Labels::UpdateService do diff --git a/spec/services/lfs/file_transformer_spec.rb b/spec/services/lfs/file_transformer_spec.rb index e8938338cb7..2c6e86069f3 100644 --- a/spec/services/lfs/file_transformer_spec.rb +++ b/spec/services/lfs/file_transformer_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "spec_helper" describe Lfs::FileTransformer do diff --git a/spec/services/lfs/lock_file_service_spec.rb b/spec/services/lfs/lock_file_service_spec.rb index 3e58eea2501..15dbc3231a3 100644 --- a/spec/services/lfs/lock_file_service_spec.rb +++ b/spec/services/lfs/lock_file_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Lfs::LockFileService do diff --git a/spec/services/lfs/locks_finder_service_spec.rb b/spec/services/lfs/locks_finder_service_spec.rb index e409b77babf..0fc2c593d94 100644 --- a/spec/services/lfs/locks_finder_service_spec.rb +++ b/spec/services/lfs/locks_finder_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Lfs::LocksFinderService do diff --git a/spec/services/lfs/unlock_file_service_spec.rb b/spec/services/lfs/unlock_file_service_spec.rb index fe42ca41633..8e36617c0d6 100644 --- a/spec/services/lfs/unlock_file_service_spec.rb +++ b/spec/services/lfs/unlock_file_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Lfs::UnlockFileService do diff --git a/spec/services/members/approve_access_request_service_spec.rb b/spec/services/members/approve_access_request_service_spec.rb index 5c30f5b6a61..f56c31e51f6 100644 --- a/spec/services/members/approve_access_request_service_spec.rb +++ b/spec/services/members/approve_access_request_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Members::ApproveAccessRequestService do diff --git a/spec/services/members/create_service_spec.rb b/spec/services/members/create_service_spec.rb index 3bc05182932..2c4fb131ed9 100644 --- a/spec/services/members/create_service_spec.rb +++ b/spec/services/members/create_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Members::CreateService do diff --git a/spec/services/members/destroy_service_spec.rb b/spec/services/members/destroy_service_spec.rb index 91bf4dccd77..52f9a305d8f 100644 --- a/spec/services/members/destroy_service_spec.rb +++ b/spec/services/members/destroy_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Members::DestroyService do diff --git a/spec/services/members/request_access_service_spec.rb b/spec/services/members/request_access_service_spec.rb index e93ba5a85c0..2e5275eb3f2 100644 --- a/spec/services/members/request_access_service_spec.rb +++ b/spec/services/members/request_access_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Members::RequestAccessService do diff --git a/spec/services/members/update_service_spec.rb b/spec/services/members/update_service_spec.rb index 599ed39ca37..a8b28127df2 100644 --- a/spec/services/members/update_service_spec.rb +++ b/spec/services/members/update_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Members::UpdateService do diff --git a/spec/services/merge_requests/add_todo_when_build_fails_service_spec.rb b/spec/services/merge_requests/add_todo_when_build_fails_service_spec.rb index 39a2ef579dd..f26b67f902d 100644 --- a/spec/services/merge_requests/add_todo_when_build_fails_service_spec.rb +++ b/spec/services/merge_requests/add_todo_when_build_fails_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe MergeRequests::AddTodoWhenBuildFailsService do diff --git a/spec/services/merge_requests/assign_issues_service_spec.rb b/spec/services/merge_requests/assign_issues_service_spec.rb index bda6383a346..c0b57b9092d 100644 --- a/spec/services/merge_requests/assign_issues_service_spec.rb +++ b/spec/services/merge_requests/assign_issues_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe MergeRequests::AssignIssuesService do diff --git a/spec/services/merge_requests/build_service_spec.rb b/spec/services/merge_requests/build_service_spec.rb index 057e8137a4e..5c3b209086c 100644 --- a/spec/services/merge_requests/build_service_spec.rb +++ b/spec/services/merge_requests/build_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe MergeRequests::BuildService do diff --git a/spec/services/merge_requests/close_service_spec.rb b/spec/services/merge_requests/close_service_spec.rb index 706bcea8199..aa7dfda4950 100644 --- a/spec/services/merge_requests/close_service_spec.rb +++ b/spec/services/merge_requests/close_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe MergeRequests::CloseService do diff --git a/spec/services/merge_requests/conflicts/list_service_spec.rb b/spec/services/merge_requests/conflicts/list_service_spec.rb index c81fa95e4b7..68a9c0a8b86 100644 --- a/spec/services/merge_requests/conflicts/list_service_spec.rb +++ b/spec/services/merge_requests/conflicts/list_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe MergeRequests::Conflicts::ListService do diff --git a/spec/services/merge_requests/conflicts/resolve_service_spec.rb b/spec/services/merge_requests/conflicts/resolve_service_spec.rb index 7edf8a96c94..74f20094081 100644 --- a/spec/services/merge_requests/conflicts/resolve_service_spec.rb +++ b/spec/services/merge_requests/conflicts/resolve_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe MergeRequests::Conflicts::ResolveService do diff --git a/spec/services/merge_requests/create_from_issue_service_spec.rb b/spec/services/merge_requests/create_from_issue_service_spec.rb index 20bf1cbb8b6..a0ac7dba89d 100644 --- a/spec/services/merge_requests/create_from_issue_service_spec.rb +++ b/spec/services/merge_requests/create_from_issue_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe MergeRequests::CreateFromIssueService do diff --git a/spec/services/merge_requests/create_service_spec.rb b/spec/services/merge_requests/create_service_spec.rb index 30271e04c8e..c795176a1e4 100644 --- a/spec/services/merge_requests/create_service_spec.rb +++ b/spec/services/merge_requests/create_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe MergeRequests::CreateService do diff --git a/spec/services/merge_requests/delete_non_latest_diffs_service_spec.rb b/spec/services/merge_requests/delete_non_latest_diffs_service_spec.rb index 6268c149fc6..a1c86467f34 100644 --- a/spec/services/merge_requests/delete_non_latest_diffs_service_spec.rb +++ b/spec/services/merge_requests/delete_non_latest_diffs_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe MergeRequests::DeleteNonLatestDiffsService, :clean_gitlab_redis_shared_state do diff --git a/spec/services/merge_requests/ff_merge_service_spec.rb b/spec/services/merge_requests/ff_merge_service_spec.rb index a87d8b8752c..3b1096c51cb 100644 --- a/spec/services/merge_requests/ff_merge_service_spec.rb +++ b/spec/services/merge_requests/ff_merge_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe MergeRequests::FfMergeService do diff --git a/spec/services/merge_requests/get_urls_service_spec.rb b/spec/services/merge_requests/get_urls_service_spec.rb index 274624aa8bb..0933c6d4336 100644 --- a/spec/services/merge_requests/get_urls_service_spec.rb +++ b/spec/services/merge_requests/get_urls_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "spec_helper" describe MergeRequests::GetUrlsService do diff --git a/spec/services/merge_requests/merge_service_spec.rb b/spec/services/merge_requests/merge_service_spec.rb index b0b3273e3dc..2fbe5468b21 100644 --- a/spec/services/merge_requests/merge_service_spec.rb +++ b/spec/services/merge_requests/merge_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe MergeRequests::MergeService do diff --git a/spec/services/merge_requests/merge_when_pipeline_succeeds_service_spec.rb b/spec/services/merge_requests/merge_when_pipeline_succeeds_service_spec.rb index 8b7db1b2f1f..96f61f3f103 100644 --- a/spec/services/merge_requests/merge_when_pipeline_succeeds_service_spec.rb +++ b/spec/services/merge_requests/merge_when_pipeline_succeeds_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe MergeRequests::MergeWhenPipelineSucceedsService do diff --git a/spec/services/merge_requests/post_merge_service_spec.rb b/spec/services/merge_requests/post_merge_service_spec.rb index 2cebefee5d6..7b87913ab8b 100644 --- a/spec/services/merge_requests/post_merge_service_spec.rb +++ b/spec/services/merge_requests/post_merge_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe MergeRequests::PostMergeService do diff --git a/spec/services/merge_requests/rebase_service_spec.rb b/spec/services/merge_requests/rebase_service_spec.rb index 427a2d63a88..0d9523a4c2c 100644 --- a/spec/services/merge_requests/rebase_service_spec.rb +++ b/spec/services/merge_requests/rebase_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe MergeRequests::RebaseService do diff --git a/spec/services/merge_requests/refresh_service_spec.rb b/spec/services/merge_requests/refresh_service_spec.rb index 7063ca9ac14..d20b2d81763 100644 --- a/spec/services/merge_requests/refresh_service_spec.rb +++ b/spec/services/merge_requests/refresh_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe MergeRequests::RefreshService do diff --git a/spec/services/merge_requests/reload_diffs_service_spec.rb b/spec/services/merge_requests/reload_diffs_service_spec.rb index 5acd01828cb..cc21348ab11 100644 --- a/spec/services/merge_requests/reload_diffs_service_spec.rb +++ b/spec/services/merge_requests/reload_diffs_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe MergeRequests::ReloadDiffsService, :use_clean_rails_memory_store_caching do diff --git a/spec/services/merge_requests/reopen_service_spec.rb b/spec/services/merge_requests/reopen_service_spec.rb index 8b6db1ce33e..7a98437f724 100644 --- a/spec/services/merge_requests/reopen_service_spec.rb +++ b/spec/services/merge_requests/reopen_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe MergeRequests::ReopenService do diff --git a/spec/services/merge_requests/resolved_discussion_notification_service_spec.rb b/spec/services/merge_requests/resolved_discussion_notification_service_spec.rb index e3fd906fe7b..0a10a9ee13b 100644 --- a/spec/services/merge_requests/resolved_discussion_notification_service_spec.rb +++ b/spec/services/merge_requests/resolved_discussion_notification_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe MergeRequests::ResolvedDiscussionNotificationService do diff --git a/spec/services/merge_requests/squash_service_spec.rb b/spec/services/merge_requests/squash_service_spec.rb index 2713652873e..cb278eec692 100644 --- a/spec/services/merge_requests/squash_service_spec.rb +++ b/spec/services/merge_requests/squash_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe MergeRequests::SquashService do diff --git a/spec/services/merge_requests/update_service_spec.rb b/spec/services/merge_requests/update_service_spec.rb index 15aea97ff29..ba4c9ce60f3 100644 --- a/spec/services/merge_requests/update_service_spec.rb +++ b/spec/services/merge_requests/update_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe MergeRequests::UpdateService, :mailer do diff --git a/spec/services/milestones/close_service_spec.rb b/spec/services/milestones/close_service_spec.rb index 3f7a544ea0a..55e705063b2 100644 --- a/spec/services/milestones/close_service_spec.rb +++ b/spec/services/milestones/close_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Milestones::CloseService do diff --git a/spec/services/milestones/create_service_spec.rb b/spec/services/milestones/create_service_spec.rb index 0c91112026f..97f6e947539 100644 --- a/spec/services/milestones/create_service_spec.rb +++ b/spec/services/milestones/create_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Milestones::CreateService do diff --git a/spec/services/milestones/destroy_service_spec.rb b/spec/services/milestones/destroy_service_spec.rb index 9d2be30c636..3a22e4d4f92 100644 --- a/spec/services/milestones/destroy_service_spec.rb +++ b/spec/services/milestones/destroy_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Milestones::DestroyService do diff --git a/spec/services/milestones/promote_service_spec.rb b/spec/services/milestones/promote_service_spec.rb index df212d912e9..22c7e9dde30 100644 --- a/spec/services/milestones/promote_service_spec.rb +++ b/spec/services/milestones/promote_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Milestones::PromoteService do diff --git a/spec/services/note_summary_spec.rb b/spec/services/note_summary_spec.rb index f6ee15f750c..e59731207a5 100644 --- a/spec/services/note_summary_spec.rb +++ b/spec/services/note_summary_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe NoteSummary do diff --git a/spec/services/notes/build_service_spec.rb b/spec/services/notes/build_service_spec.rb index 96fff20f7fb..984658cbd19 100644 --- a/spec/services/notes/build_service_spec.rb +++ b/spec/services/notes/build_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Notes::BuildService do diff --git a/spec/services/notes/create_service_spec.rb b/spec/services/notes/create_service_spec.rb index bcbb8950910..494ca95f66d 100644 --- a/spec/services/notes/create_service_spec.rb +++ b/spec/services/notes/create_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Notes::CreateService do diff --git a/spec/services/notes/destroy_service_spec.rb b/spec/services/notes/destroy_service_spec.rb index b1f4e87e8ea..9faf1299ef2 100644 --- a/spec/services/notes/destroy_service_spec.rb +++ b/spec/services/notes/destroy_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Notes::DestroyService do diff --git a/spec/services/notes/post_process_service_spec.rb b/spec/services/notes/post_process_service_spec.rb index 5aae0d711c3..99db7897664 100644 --- a/spec/services/notes/post_process_service_spec.rb +++ b/spec/services/notes/post_process_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Notes::PostProcessService do diff --git a/spec/services/notes/quick_actions_service_spec.rb b/spec/services/notes/quick_actions_service_spec.rb index 9efdf96bc64..7cb0bd41f13 100644 --- a/spec/services/notes/quick_actions_service_spec.rb +++ b/spec/services/notes/quick_actions_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Notes::QuickActionsService do diff --git a/spec/services/notes/render_service_spec.rb b/spec/services/notes/render_service_spec.rb index f771620bc0d..ad69721d876 100644 --- a/spec/services/notes/render_service_spec.rb +++ b/spec/services/notes/render_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Notes::RenderService do diff --git a/spec/services/notes/resolve_service_spec.rb b/spec/services/notes/resolve_service_spec.rb index b54d40a7a5c..3f82e1dbdc0 100644 --- a/spec/services/notes/resolve_service_spec.rb +++ b/spec/services/notes/resolve_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Notes::ResolveService do diff --git a/spec/services/notes/update_service_spec.rb b/spec/services/notes/update_service_spec.rb index fd9bff46a06..717eb97fa5a 100644 --- a/spec/services/notes/update_service_spec.rb +++ b/spec/services/notes/update_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Notes::UpdateService do diff --git a/spec/services/notification_recipient_service_spec.rb b/spec/services/notification_recipient_service_spec.rb index cea5ea125b9..9c2283f555b 100644 --- a/spec/services/notification_recipient_service_spec.rb +++ b/spec/services/notification_recipient_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe NotificationRecipientService do diff --git a/spec/services/notification_service_spec.rb b/spec/services/notification_service_spec.rb index ac4aabf3fbd..8e34406133a 100644 --- a/spec/services/notification_service_spec.rb +++ b/spec/services/notification_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe NotificationService, :mailer do diff --git a/spec/services/preview_markdown_service_spec.rb b/spec/services/preview_markdown_service_spec.rb index a1d31464e07..f7261cd7125 100644 --- a/spec/services/preview_markdown_service_spec.rb +++ b/spec/services/preview_markdown_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe PreviewMarkdownService do diff --git a/spec/services/projects/after_import_service_spec.rb b/spec/services/projects/after_import_service_spec.rb index 765b4ffae8f..95c11f71c5e 100644 --- a/spec/services/projects/after_import_service_spec.rb +++ b/spec/services/projects/after_import_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Projects::AfterImportService do diff --git a/spec/services/projects/autocomplete_service_spec.rb b/spec/services/projects/autocomplete_service_spec.rb index 373fe7cb7dd..2f70c8ea94d 100644 --- a/spec/services/projects/autocomplete_service_spec.rb +++ b/spec/services/projects/autocomplete_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Projects::AutocompleteService do diff --git a/spec/services/projects/batch_open_issues_count_service_spec.rb b/spec/services/projects/batch_open_issues_count_service_spec.rb index 599aaf62080..e978334d68b 100644 --- a/spec/services/projects/batch_open_issues_count_service_spec.rb +++ b/spec/services/projects/batch_open_issues_count_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Projects::BatchOpenIssuesCountService do diff --git a/spec/services/projects/cleanup_service_spec.rb b/spec/services/projects/cleanup_service_spec.rb index 3d4587ce2a1..29eabc86327 100644 --- a/spec/services/projects/cleanup_service_spec.rb +++ b/spec/services/projects/cleanup_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Projects::CleanupService do diff --git a/spec/services/projects/count_service_spec.rb b/spec/services/projects/count_service_spec.rb index 183f6128c7b..e345b508f53 100644 --- a/spec/services/projects/count_service_spec.rb +++ b/spec/services/projects/count_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Projects::CountService do diff --git a/spec/services/projects/create_from_template_service_spec.rb b/spec/services/projects/create_from_template_service_spec.rb index da078dd36c6..6c244d23877 100644 --- a/spec/services/projects/create_from_template_service_spec.rb +++ b/spec/services/projects/create_from_template_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Projects::CreateFromTemplateService do diff --git a/spec/services/projects/create_service_spec.rb b/spec/services/projects/create_service_spec.rb index e1ec932918e..bd7a0c68766 100644 --- a/spec/services/projects/create_service_spec.rb +++ b/spec/services/projects/create_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Projects::CreateService, '#execute' do diff --git a/spec/services/projects/destroy_service_spec.rb b/spec/services/projects/destroy_service_spec.rb index d3a8ee46f85..3af7ee3ad50 100644 --- a/spec/services/projects/destroy_service_spec.rb +++ b/spec/services/projects/destroy_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Projects::DestroyService do diff --git a/spec/services/projects/detect_repository_languages_service_spec.rb b/spec/services/projects/detect_repository_languages_service_spec.rb index b38bd62c9f0..e3e561c971c 100644 --- a/spec/services/projects/detect_repository_languages_service_spec.rb +++ b/spec/services/projects/detect_repository_languages_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Projects::DetectRepositoryLanguagesService, :clean_gitlab_redis_shared_state do diff --git a/spec/services/projects/download_service_spec.rb b/spec/services/projects/download_service_spec.rb index da236052ebf..f25233ceeb1 100644 --- a/spec/services/projects/download_service_spec.rb +++ b/spec/services/projects/download_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Projects::DownloadService do diff --git a/spec/services/projects/enable_deploy_key_service_spec.rb b/spec/services/projects/enable_deploy_key_service_spec.rb index 835dae68fcd..64de373d7f6 100644 --- a/spec/services/projects/enable_deploy_key_service_spec.rb +++ b/spec/services/projects/enable_deploy_key_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Projects::EnableDeployKeyService do diff --git a/spec/services/projects/fork_service_spec.rb b/spec/services/projects/fork_service_spec.rb index 23ec29cce7b..ec3f1782e8f 100644 --- a/spec/services/projects/fork_service_spec.rb +++ b/spec/services/projects/fork_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Projects::ForkService do diff --git a/spec/services/projects/forks_count_service_spec.rb b/spec/services/projects/forks_count_service_spec.rb index 9f8e7ee18a8..7e35648e9ff 100644 --- a/spec/services/projects/forks_count_service_spec.rb +++ b/spec/services/projects/forks_count_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Projects::ForksCountService do diff --git a/spec/services/projects/gitlab_projects_import_service_spec.rb b/spec/services/projects/gitlab_projects_import_service_spec.rb index b5f2c826c97..78580bfa604 100644 --- a/spec/services/projects/gitlab_projects_import_service_spec.rb +++ b/spec/services/projects/gitlab_projects_import_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Projects::GitlabProjectsImportService do diff --git a/spec/services/projects/group_links/create_service_spec.rb b/spec/services/projects/group_links/create_service_spec.rb index 68fd82b4cbe..6ded57f961c 100644 --- a/spec/services/projects/group_links/create_service_spec.rb +++ b/spec/services/projects/group_links/create_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Projects::GroupLinks::CreateService, '#execute' do diff --git a/spec/services/projects/group_links/destroy_service_spec.rb b/spec/services/projects/group_links/destroy_service_spec.rb index 336ee01ae50..d78ab78c3d8 100644 --- a/spec/services/projects/group_links/destroy_service_spec.rb +++ b/spec/services/projects/group_links/destroy_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Projects::GroupLinks::DestroyService, '#execute' do diff --git a/spec/services/projects/hashed_storage/migrate_attachments_service_spec.rb b/spec/services/projects/hashed_storage/migrate_attachments_service_spec.rb index efe15139717..32ebec318f2 100644 --- a/spec/services/projects/hashed_storage/migrate_attachments_service_spec.rb +++ b/spec/services/projects/hashed_storage/migrate_attachments_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Projects::HashedStorage::MigrateAttachmentsService do diff --git a/spec/services/projects/hashed_storage/migrate_repository_service_spec.rb b/spec/services/projects/hashed_storage/migrate_repository_service_spec.rb index 42b0d256cbf..5b778f16b5a 100644 --- a/spec/services/projects/hashed_storage/migrate_repository_service_spec.rb +++ b/spec/services/projects/hashed_storage/migrate_repository_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Projects::HashedStorage::MigrateRepositoryService do diff --git a/spec/services/projects/hashed_storage/migration_service_spec.rb b/spec/services/projects/hashed_storage/migration_service_spec.rb index b4647586363..e3191cd7ebc 100644 --- a/spec/services/projects/hashed_storage/migration_service_spec.rb +++ b/spec/services/projects/hashed_storage/migration_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Projects::HashedStorage::MigrationService do diff --git a/spec/services/projects/housekeeping_service_spec.rb b/spec/services/projects/housekeeping_service_spec.rb index 12ae9105627..368cf123c3e 100644 --- a/spec/services/projects/housekeeping_service_spec.rb +++ b/spec/services/projects/housekeeping_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Projects::HousekeepingService do diff --git a/spec/services/projects/import_export/export_service_spec.rb b/spec/services/projects/import_export/export_service_spec.rb index f9e5530bc9d..404bb55629a 100644 --- a/spec/services/projects/import_export/export_service_spec.rb +++ b/spec/services/projects/import_export/export_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Projects::ImportExport::ExportService do diff --git a/spec/services/projects/import_service_spec.rb b/spec/services/projects/import_service_spec.rb index 7faf0fc2868..7f233a52f50 100644 --- a/spec/services/projects/import_service_spec.rb +++ b/spec/services/projects/import_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Projects::ImportService do diff --git a/spec/services/projects/lfs_pointers/lfs_download_link_list_service_spec.rb b/spec/services/projects/lfs_pointers/lfs_download_link_list_service_spec.rb index f222c52199f..f1c0f5b9576 100644 --- a/spec/services/projects/lfs_pointers/lfs_download_link_list_service_spec.rb +++ b/spec/services/projects/lfs_pointers/lfs_download_link_list_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Projects::LfsPointers::LfsDownloadLinkListService do diff --git a/spec/services/projects/lfs_pointers/lfs_download_service_spec.rb b/spec/services/projects/lfs_pointers/lfs_download_service_spec.rb index 876beb39801..cde3f2d6155 100644 --- a/spec/services/projects/lfs_pointers/lfs_download_service_spec.rb +++ b/spec/services/projects/lfs_pointers/lfs_download_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Projects::LfsPointers::LfsDownloadService do diff --git a/spec/services/projects/lfs_pointers/lfs_import_service_spec.rb b/spec/services/projects/lfs_pointers/lfs_import_service_spec.rb index 5a75fb38dec..5c9ca99df7c 100644 --- a/spec/services/projects/lfs_pointers/lfs_import_service_spec.rb +++ b/spec/services/projects/lfs_pointers/lfs_import_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Projects::LfsPointers::LfsImportService do diff --git a/spec/services/projects/lfs_pointers/lfs_link_service_spec.rb b/spec/services/projects/lfs_pointers/lfs_link_service_spec.rb index b7b153655db..5caa9de732e 100644 --- a/spec/services/projects/lfs_pointers/lfs_link_service_spec.rb +++ b/spec/services/projects/lfs_pointers/lfs_link_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Projects::LfsPointers::LfsLinkService do diff --git a/spec/services/projects/move_access_service_spec.rb b/spec/services/projects/move_access_service_spec.rb index 88d9d93c33b..efa34c84522 100644 --- a/spec/services/projects/move_access_service_spec.rb +++ b/spec/services/projects/move_access_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Projects::MoveAccessService do diff --git a/spec/services/projects/move_deploy_keys_projects_service_spec.rb b/spec/services/projects/move_deploy_keys_projects_service_spec.rb index c548edf39a8..a5d28fb0fbf 100644 --- a/spec/services/projects/move_deploy_keys_projects_service_spec.rb +++ b/spec/services/projects/move_deploy_keys_projects_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Projects::MoveDeployKeysProjectsService do diff --git a/spec/services/projects/move_forks_service_spec.rb b/spec/services/projects/move_forks_service_spec.rb index f4a5a7f9fc2..8f9f048d5ff 100644 --- a/spec/services/projects/move_forks_service_spec.rb +++ b/spec/services/projects/move_forks_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Projects::MoveForksService do diff --git a/spec/services/projects/move_lfs_objects_projects_service_spec.rb b/spec/services/projects/move_lfs_objects_projects_service_spec.rb index 517a24a982a..114509229c5 100644 --- a/spec/services/projects/move_lfs_objects_projects_service_spec.rb +++ b/spec/services/projects/move_lfs_objects_projects_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Projects::MoveLfsObjectsProjectsService do diff --git a/spec/services/projects/move_notification_settings_service_spec.rb b/spec/services/projects/move_notification_settings_service_spec.rb index 24d69eef86a..54d85404bf6 100644 --- a/spec/services/projects/move_notification_settings_service_spec.rb +++ b/spec/services/projects/move_notification_settings_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Projects::MoveNotificationSettingsService do diff --git a/spec/services/projects/move_project_authorizations_service_spec.rb b/spec/services/projects/move_project_authorizations_service_spec.rb index b4408393624..fe3ba31c881 100644 --- a/spec/services/projects/move_project_authorizations_service_spec.rb +++ b/spec/services/projects/move_project_authorizations_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Projects::MoveProjectAuthorizationsService do diff --git a/spec/services/projects/move_project_group_links_service_spec.rb b/spec/services/projects/move_project_group_links_service_spec.rb index 7ca8cf304fe..6140d679929 100644 --- a/spec/services/projects/move_project_group_links_service_spec.rb +++ b/spec/services/projects/move_project_group_links_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Projects::MoveProjectGroupLinksService do diff --git a/spec/services/projects/move_project_members_service_spec.rb b/spec/services/projects/move_project_members_service_spec.rb index c8c0eac1f13..bdd5cd6a87a 100644 --- a/spec/services/projects/move_project_members_service_spec.rb +++ b/spec/services/projects/move_project_members_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Projects::MoveProjectMembersService do diff --git a/spec/services/projects/move_users_star_projects_service_spec.rb b/spec/services/projects/move_users_star_projects_service_spec.rb index e0545c5a21b..cde188f9f5f 100644 --- a/spec/services/projects/move_users_star_projects_service_spec.rb +++ b/spec/services/projects/move_users_star_projects_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Projects::MoveUsersStarProjectsService do diff --git a/spec/services/projects/open_issues_count_service_spec.rb b/spec/services/projects/open_issues_count_service_spec.rb index 562c14a8df8..8efa34765d0 100644 --- a/spec/services/projects/open_issues_count_service_spec.rb +++ b/spec/services/projects/open_issues_count_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Projects::OpenIssuesCountService do diff --git a/spec/services/projects/open_merge_requests_count_service_spec.rb b/spec/services/projects/open_merge_requests_count_service_spec.rb index 9f49b9ec6a2..0d8227f7db5 100644 --- a/spec/services/projects/open_merge_requests_count_service_spec.rb +++ b/spec/services/projects/open_merge_requests_count_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Projects::OpenMergeRequestsCountService do diff --git a/spec/services/projects/overwrite_project_service_spec.rb b/spec/services/projects/overwrite_project_service_spec.rb index c7900629f5f..def39ad3789 100644 --- a/spec/services/projects/overwrite_project_service_spec.rb +++ b/spec/services/projects/overwrite_project_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Projects::OverwriteProjectService do diff --git a/spec/services/projects/participants_service_spec.rb b/spec/services/projects/participants_service_spec.rb index 8455b9bc3cf..4def83513a4 100644 --- a/spec/services/projects/participants_service_spec.rb +++ b/spec/services/projects/participants_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Projects::ParticipantsService do diff --git a/spec/services/projects/propagate_service_template_spec.rb b/spec/services/projects/propagate_service_template_spec.rb index f4c59735c43..f93e5aae82a 100644 --- a/spec/services/projects/propagate_service_template_spec.rb +++ b/spec/services/projects/propagate_service_template_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Projects::PropagateServiceTemplate do diff --git a/spec/services/projects/repository_languages_service_spec.rb b/spec/services/projects/repository_languages_service_spec.rb index 61c1b8c5ec1..09c61363ad2 100644 --- a/spec/services/projects/repository_languages_service_spec.rb +++ b/spec/services/projects/repository_languages_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Projects::RepositoryLanguagesService do diff --git a/spec/services/projects/transfer_service_spec.rb b/spec/services/projects/transfer_service_spec.rb index 4efd360cb30..9acc3657fa9 100644 --- a/spec/services/projects/transfer_service_spec.rb +++ b/spec/services/projects/transfer_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Projects::TransferService do diff --git a/spec/services/projects/unlink_fork_service_spec.rb b/spec/services/projects/unlink_fork_service_spec.rb index 014aab44281..a1175bf7123 100644 --- a/spec/services/projects/unlink_fork_service_spec.rb +++ b/spec/services/projects/unlink_fork_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Projects::UnlinkForkService do diff --git a/spec/services/projects/update_pages_configuration_service_spec.rb b/spec/services/projects/update_pages_configuration_service_spec.rb index 7f5ef3129d7..363d3df0f84 100644 --- a/spec/services/projects/update_pages_configuration_service_spec.rb +++ b/spec/services/projects/update_pages_configuration_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Projects::UpdatePagesConfigurationService do diff --git a/spec/services/projects/update_pages_service_spec.rb b/spec/services/projects/update_pages_service_spec.rb index 8b70845befe..7c91f0bbe6e 100644 --- a/spec/services/projects/update_pages_service_spec.rb +++ b/spec/services/projects/update_pages_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "spec_helper" describe Projects::UpdatePagesService do diff --git a/spec/services/projects/update_remote_mirror_service_spec.rb b/spec/services/projects/update_remote_mirror_service_spec.rb index c1e5f788146..be2811ab1e7 100644 --- a/spec/services/projects/update_remote_mirror_service_spec.rb +++ b/spec/services/projects/update_remote_mirror_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Projects::UpdateRemoteMirrorService do diff --git a/spec/services/projects/update_service_spec.rb b/spec/services/projects/update_service_spec.rb index 95eb17b5e3a..c37147e7d3b 100644 --- a/spec/services/projects/update_service_spec.rb +++ b/spec/services/projects/update_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Projects::UpdateService do diff --git a/spec/services/projects/update_statistics_service_spec.rb b/spec/services/projects/update_statistics_service_spec.rb index 7e351c9ce54..5000ea58e5f 100644 --- a/spec/services/projects/update_statistics_service_spec.rb +++ b/spec/services/projects/update_statistics_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Projects::UpdateStatisticsService do diff --git a/spec/services/prometheus/adapter_service_spec.rb b/spec/services/prometheus/adapter_service_spec.rb index 505e2935e93..5e972a966eb 100644 --- a/spec/services/prometheus/adapter_service_spec.rb +++ b/spec/services/prometheus/adapter_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Prometheus::AdapterService do diff --git a/spec/services/protected_branches/create_service_spec.rb b/spec/services/protected_branches/create_service_spec.rb index 79b744142c6..82d24ec43f6 100644 --- a/spec/services/protected_branches/create_service_spec.rb +++ b/spec/services/protected_branches/create_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe ProtectedBranches::CreateService do diff --git a/spec/services/protected_branches/destroy_service_spec.rb b/spec/services/protected_branches/destroy_service_spec.rb index 4a391b6c25c..3287eb9a59b 100644 --- a/spec/services/protected_branches/destroy_service_spec.rb +++ b/spec/services/protected_branches/destroy_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe ProtectedBranches::DestroyService do diff --git a/spec/services/protected_branches/update_service_spec.rb b/spec/services/protected_branches/update_service_spec.rb index 3f6f8e09565..7967ff81075 100644 --- a/spec/services/protected_branches/update_service_spec.rb +++ b/spec/services/protected_branches/update_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe ProtectedBranches::UpdateService do diff --git a/spec/services/protected_tags/create_service_spec.rb b/spec/services/protected_tags/create_service_spec.rb index b16acf1d36c..e58a539eb6f 100644 --- a/spec/services/protected_tags/create_service_spec.rb +++ b/spec/services/protected_tags/create_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe ProtectedTags::CreateService do diff --git a/spec/services/protected_tags/destroy_service_spec.rb b/spec/services/protected_tags/destroy_service_spec.rb index e12f53a2221..52d1d1caa34 100644 --- a/spec/services/protected_tags/destroy_service_spec.rb +++ b/spec/services/protected_tags/destroy_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe ProtectedTags::DestroyService do diff --git a/spec/services/protected_tags/update_service_spec.rb b/spec/services/protected_tags/update_service_spec.rb index 2ece4e3b07b..ca5109aca9c 100644 --- a/spec/services/protected_tags/update_service_spec.rb +++ b/spec/services/protected_tags/update_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe ProtectedTags::UpdateService do diff --git a/spec/services/push_event_payload_service_spec.rb b/spec/services/push_event_payload_service_spec.rb index 81956200bff..855b10c0259 100644 --- a/spec/services/push_event_payload_service_spec.rb +++ b/spec/services/push_event_payload_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe PushEventPayloadService do diff --git a/spec/services/releases/create_service_spec.rb b/spec/services/releases/create_service_spec.rb index 0efe37f1167..e26676cdd55 100644 --- a/spec/services/releases/create_service_spec.rb +++ b/spec/services/releases/create_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Releases::CreateService do diff --git a/spec/services/releases/destroy_service_spec.rb b/spec/services/releases/destroy_service_spec.rb index 28663ca8853..f4c901e6585 100644 --- a/spec/services/releases/destroy_service_spec.rb +++ b/spec/services/releases/destroy_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Releases::DestroyService do diff --git a/spec/services/releases/update_service_spec.rb b/spec/services/releases/update_service_spec.rb index 6c68f364739..14e6a5f13c8 100644 --- a/spec/services/releases/update_service_spec.rb +++ b/spec/services/releases/update_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Releases::UpdateService do diff --git a/spec/services/repair_ldap_blocked_user_service_spec.rb b/spec/services/repair_ldap_blocked_user_service_spec.rb index bf79cfe74b7..9918bb8e054 100644 --- a/spec/services/repair_ldap_blocked_user_service_spec.rb +++ b/spec/services/repair_ldap_blocked_user_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe RepairLdapBlockedUserService do diff --git a/spec/services/repository_archive_clean_up_service_spec.rb b/spec/services/repository_archive_clean_up_service_spec.rb index ab1c638fc39..60a14d7a107 100644 --- a/spec/services/repository_archive_clean_up_service_spec.rb +++ b/spec/services/repository_archive_clean_up_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe RepositoryArchiveCleanUpService do diff --git a/spec/services/reset_project_cache_service_spec.rb b/spec/services/reset_project_cache_service_spec.rb index 1490ad5fe3b..a4db4481c36 100644 --- a/spec/services/reset_project_cache_service_spec.rb +++ b/spec/services/reset_project_cache_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe ResetProjectCacheService do diff --git a/spec/services/search/global_service_spec.rb b/spec/services/search/global_service_spec.rb index 980545b8083..62a70ccd3da 100644 --- a/spec/services/search/global_service_spec.rb +++ b/spec/services/search/global_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Search::GlobalService do diff --git a/spec/services/search/group_service_spec.rb b/spec/services/search/group_service_spec.rb index cbc553a60cf..aac2f3fe4cb 100644 --- a/spec/services/search/group_service_spec.rb +++ b/spec/services/search/group_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Search::GroupService do diff --git a/spec/services/search/snippet_service_spec.rb b/spec/services/search/snippet_service_spec.rb index 8ad162ad66e..430c71880a3 100644 --- a/spec/services/search/snippet_service_spec.rb +++ b/spec/services/search/snippet_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Search::SnippetService do diff --git a/spec/services/search_service_spec.rb b/spec/services/search_service_spec.rb index e5e036c7d44..48065bf596a 100644 --- a/spec/services/search_service_spec.rb +++ b/spec/services/search_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe SearchService do diff --git a/spec/services/spam_service_spec.rb b/spec/services/spam_service_spec.rb index 61312d55b84..b9e5e844c1f 100644 --- a/spec/services/spam_service_spec.rb +++ b/spec/services/spam_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe SpamService do diff --git a/spec/services/submit_usage_ping_service_spec.rb b/spec/services/submit_usage_ping_service_spec.rb index c8a6fc1a99b..78df9bf96bf 100644 --- a/spec/services/submit_usage_ping_service_spec.rb +++ b/spec/services/submit_usage_ping_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe SubmitUsagePingService do diff --git a/spec/services/system_hooks_service_spec.rb b/spec/services/system_hooks_service_spec.rb index 81b2c17fdb5..5dc7394b84f 100644 --- a/spec/services/system_hooks_service_spec.rb +++ b/spec/services/system_hooks_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe SystemHooksService do diff --git a/spec/services/tags/create_service_spec.rb b/spec/services/tags/create_service_spec.rb index e112cdc8881..ee558f90d6f 100644 --- a/spec/services/tags/create_service_spec.rb +++ b/spec/services/tags/create_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Tags::CreateService do diff --git a/spec/services/tags/destroy_service_spec.rb b/spec/services/tags/destroy_service_spec.rb index a541d300595..b46bd77eafe 100644 --- a/spec/services/tags/destroy_service_spec.rb +++ b/spec/services/tags/destroy_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Tags::DestroyService do diff --git a/spec/services/test_hooks/project_service_spec.rb b/spec/services/test_hooks/project_service_spec.rb index 19e1c5ff3b2..8d30f5018dd 100644 --- a/spec/services/test_hooks/project_service_spec.rb +++ b/spec/services/test_hooks/project_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe TestHooks::ProjectService do diff --git a/spec/services/test_hooks/system_service_spec.rb b/spec/services/test_hooks/system_service_spec.rb index 74d7715e50f..799b57eb04e 100644 --- a/spec/services/test_hooks/system_service_spec.rb +++ b/spec/services/test_hooks/system_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe TestHooks::SystemService do diff --git a/spec/services/todo_service_spec.rb b/spec/services/todo_service_spec.rb index 89411b2e908..9ee23f3eb48 100644 --- a/spec/services/todo_service_spec.rb +++ b/spec/services/todo_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe TodoService do diff --git a/spec/services/todos/destroy/confidential_issue_service_spec.rb b/spec/services/todos/destroy/confidential_issue_service_spec.rb index 3294f7509aa..78b6744b426 100644 --- a/spec/services/todos/destroy/confidential_issue_service_spec.rb +++ b/spec/services/todos/destroy/confidential_issue_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Todos::Destroy::ConfidentialIssueService do diff --git a/spec/services/todos/destroy/entity_leave_service_spec.rb b/spec/services/todos/destroy/entity_leave_service_spec.rb index 4b238280848..1447b9d4126 100644 --- a/spec/services/todos/destroy/entity_leave_service_spec.rb +++ b/spec/services/todos/destroy/entity_leave_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Todos::Destroy::EntityLeaveService do diff --git a/spec/services/todos/destroy/group_private_service_spec.rb b/spec/services/todos/destroy/group_private_service_spec.rb index 5cefbdd35ab..a1798686d7c 100644 --- a/spec/services/todos/destroy/group_private_service_spec.rb +++ b/spec/services/todos/destroy/group_private_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Todos::Destroy::GroupPrivateService do diff --git a/spec/services/todos/destroy/private_features_service_spec.rb b/spec/services/todos/destroy/private_features_service_spec.rb index be8b5bb3979..7831e3a47e0 100644 --- a/spec/services/todos/destroy/private_features_service_spec.rb +++ b/spec/services/todos/destroy/private_features_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Todos::Destroy::PrivateFeaturesService do diff --git a/spec/services/todos/destroy/project_private_service_spec.rb b/spec/services/todos/destroy/project_private_service_spec.rb index 128d3487514..7c0c76b6c29 100644 --- a/spec/services/todos/destroy/project_private_service_spec.rb +++ b/spec/services/todos/destroy/project_private_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Todos::Destroy::ProjectPrivateService do diff --git a/spec/services/update_deployment_service_spec.rb b/spec/services/update_deployment_service_spec.rb index 3c55dd9659a..c664bac39fc 100644 --- a/spec/services/update_deployment_service_spec.rb +++ b/spec/services/update_deployment_service_spec.rb @@ -1,7 +1,10 @@ +# frozen_string_literal: true + require 'spec_helper' describe UpdateDeploymentService do let(:user) { create(:user) } + let(:project) { create(:project, :repository) } let(:options) { { name: 'production' } } let(:job) do @@ -13,24 +16,22 @@ describe UpdateDeploymentService do project: project) end - let(:project) { create(:project, :repository) } - let(:environment) { deployment.environment } let(:deployment) { job.deployment } - let(:service) { described_class.new(deployment) } + let(:environment) { deployment.environment } + + subject(:service) { described_class.new(deployment) } before do job.success! # Create/Succeed deployment end describe '#execute' do - subject { service.execute } - let(:store) { Gitlab::EtagCaching::Store.new } it 'invalidates the environment etag cache' do old_value = store.get(environment.etag_cache_key) - subject + service.execute expect(store.get(environment.etag_cache_key)).not_to eq(old_value) end @@ -40,14 +41,30 @@ describe UpdateDeploymentService do .to receive(:create_ref) .with(deployment.ref, deployment.send(:ref_path)) - subject + service.execute end it 'updates merge request metrics' do expect_any_instance_of(Deployment) .to receive(:update_merge_request_metrics!) - subject + service.execute + end + + it 'returns the deployment' do + expect(subject.execute).to eq(deployment) + end + + it 'returns the deployment when could not save the environment' do + allow(environment).to receive(:save).and_return(false) + + expect(subject.execute).to eq(deployment) + end + + it 'returns the deployment when environment is stopped' do + allow(environment).to receive(:stopped?).and_return(true) + + expect(subject.execute).to eq(deployment) end context 'when start action is defined' do @@ -59,7 +76,7 @@ describe UpdateDeploymentService do end it 'makes environment available' do - subject + service.execute expect(environment.reload).to be_available end @@ -78,11 +95,11 @@ describe UpdateDeploymentService do end it 'does not create a new environment' do - expect { subject }.not_to change { Environment.count } + expect { subject.execute }.not_to change { Environment.count } end it 'updates external url' do - subject + subject.execute expect(subject.environment.name).to eq('review-apps/master') expect(subject.environment.external_url).to eq('http://master.review-apps.gitlab.com') diff --git a/spec/services/update_merge_request_metrics_service_spec.rb b/spec/services/update_merge_request_metrics_service_spec.rb index 812dd42934d..12a2b287c72 100644 --- a/spec/services/update_merge_request_metrics_service_spec.rb +++ b/spec/services/update_merge_request_metrics_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'rails_helper' describe MergeRequestMetricsService do diff --git a/spec/services/update_snippet_service_spec.rb b/spec/services/update_snippet_service_spec.rb index ef535c5cf1f..23ea4e003f8 100644 --- a/spec/services/update_snippet_service_spec.rb +++ b/spec/services/update_snippet_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe UpdateSnippetService do diff --git a/spec/services/upload_service_spec.rb b/spec/services/upload_service_spec.rb index 4a809d5bf18..504e61f9903 100644 --- a/spec/services/upload_service_spec.rb +++ b/spec/services/upload_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe UploadService do diff --git a/spec/services/user_project_access_changed_service_spec.rb b/spec/services/user_project_access_changed_service_spec.rb index 87a90378e2b..902ed723e09 100644 --- a/spec/services/user_project_access_changed_service_spec.rb +++ b/spec/services/user_project_access_changed_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe UserProjectAccessChangedService do diff --git a/spec/services/users/activity_service_spec.rb b/spec/services/users/activity_service_spec.rb index 3c0a4ac8e18..d8d2be87fd3 100644 --- a/spec/services/users/activity_service_spec.rb +++ b/spec/services/users/activity_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Users::ActivityService do @@ -76,7 +78,7 @@ describe Users::ActivityService do let(:last_activity_on) { nil } it 'does not update last_activity_on' do - stub_exclusive_lease_taken("acitvity_service:#{user.id}", timeout: 1.minute.to_i) + stub_exclusive_lease_taken("activity_service:#{user.id}", timeout: 1.minute.to_i) expect { subject.execute }.not_to change(user, :last_activity_on) end diff --git a/spec/services/users/build_service_spec.rb b/spec/services/users/build_service_spec.rb index b7b9817efdb..aed5d2598ef 100644 --- a/spec/services/users/build_service_spec.rb +++ b/spec/services/users/build_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Users::BuildService do diff --git a/spec/services/users/create_service_spec.rb b/spec/services/users/create_service_spec.rb index 24dac569678..a139dc01314 100644 --- a/spec/services/users/create_service_spec.rb +++ b/spec/services/users/create_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Users::CreateService do diff --git a/spec/services/users/destroy_service_spec.rb b/spec/services/users/destroy_service_spec.rb index 450e76d5f58..1c79af34538 100644 --- a/spec/services/users/destroy_service_spec.rb +++ b/spec/services/users/destroy_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Users::DestroyService do diff --git a/spec/services/users/last_push_event_service_spec.rb b/spec/services/users/last_push_event_service_spec.rb index 2b6c0267a0f..424e9e2f8ef 100644 --- a/spec/services/users/last_push_event_service_spec.rb +++ b/spec/services/users/last_push_event_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Users::LastPushEventService do diff --git a/spec/services/users/migrate_to_ghost_user_service_spec.rb b/spec/services/users/migrate_to_ghost_user_service_spec.rb index 68b0f79c6d1..b808fa6d91a 100644 --- a/spec/services/users/migrate_to_ghost_user_service_spec.rb +++ b/spec/services/users/migrate_to_ghost_user_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Users::MigrateToGhostUserService do diff --git a/spec/services/users/refresh_authorized_projects_service_spec.rb b/spec/services/users/refresh_authorized_projects_service_spec.rb index 122b96ef216..0287a24808d 100644 --- a/spec/services/users/refresh_authorized_projects_service_spec.rb +++ b/spec/services/users/refresh_authorized_projects_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Users::RefreshAuthorizedProjectsService do diff --git a/spec/services/users/respond_to_terms_service_spec.rb b/spec/services/users/respond_to_terms_service_spec.rb index fb08dd10b87..d840706e8a5 100644 --- a/spec/services/users/respond_to_terms_service_spec.rb +++ b/spec/services/users/respond_to_terms_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Users::RespondToTermsService do diff --git a/spec/services/users/update_service_spec.rb b/spec/services/users/update_service_spec.rb index 529c8485202..e04c05418b0 100644 --- a/spec/services/users/update_service_spec.rb +++ b/spec/services/users/update_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe Users::UpdateService do diff --git a/spec/services/verify_pages_domain_service_spec.rb b/spec/services/verify_pages_domain_service_spec.rb index b60b13bb3fc..e5c7b5bb9a7 100644 --- a/spec/services/verify_pages_domain_service_spec.rb +++ b/spec/services/verify_pages_domain_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe VerifyPagesDomainService do diff --git a/spec/services/web_hook_service_spec.rb b/spec/services/web_hook_service_spec.rb index 747e04fb18c..75ba2479b63 100644 --- a/spec/services/web_hook_service_spec.rb +++ b/spec/services/web_hook_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe WebHookService do diff --git a/spec/services/wiki_pages/create_service_spec.rb b/spec/services/wiki_pages/create_service_spec.rb index 259f445247e..84510dcf700 100644 --- a/spec/services/wiki_pages/create_service_spec.rb +++ b/spec/services/wiki_pages/create_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe WikiPages::CreateService do diff --git a/spec/services/wiki_pages/destroy_service_spec.rb b/spec/services/wiki_pages/destroy_service_spec.rb index 2938126914b..c74eac4dad6 100644 --- a/spec/services/wiki_pages/destroy_service_spec.rb +++ b/spec/services/wiki_pages/destroy_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe WikiPages::DestroyService do diff --git a/spec/services/wiki_pages/update_service_spec.rb b/spec/services/wiki_pages/update_service_spec.rb index 2399db7d3d4..19866bd3bfc 100644 --- a/spec/services/wiki_pages/update_service_spec.rb +++ b/spec/services/wiki_pages/update_service_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe WikiPages::UpdateService do diff --git a/spec/support/shared_examples/features/master_manages_access_requests_shared_example.rb b/spec/support/shared_examples/features/master_manages_access_requests_shared_example.rb index 75ad948e42c..d87e5fcaa88 100644 --- a/spec/support/shared_examples/features/master_manages_access_requests_shared_example.rb +++ b/spec/support/shared_examples/features/master_manages_access_requests_shared_example.rb @@ -19,7 +19,7 @@ RSpec.shared_examples 'Maintainer manages access requests' do expect_visible_access_request(entity, user) - accept_confirm { click_on 'Grant access' } + click_on 'Grant access' expect_no_visible_access_request(entity, user) @@ -40,13 +40,11 @@ RSpec.shared_examples 'Maintainer manages access requests' do end def expect_visible_access_request(entity, user) - expect(entity.requesters.exists?(user_id: user)).to be_truthy expect(page).to have_content "Users requesting access to #{entity.name} 1" expect(page).to have_content user.name end def expect_no_visible_access_request(entity, user) - expect(entity.requesters.exists?(user_id: user)).to be_falsy expect(page).not_to have_content "Users requesting access to #{entity.name}" end end |