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

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-07-20 12:55:51 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-07-20 12:55:51 +0300
commite8d2c2579383897a1dd7f9debd359abe8ae8373d (patch)
treec42be41678c2586d49a75cabce89322082698334 /spec/support/helpers/require_migration.rb
parentfc845b37ec3a90aaa719975f607740c22ba6a113 (diff)
Add latest changes from gitlab-org/gitlab@14-1-stable-eev14.1.0-rc42
Diffstat (limited to 'spec/support/helpers/require_migration.rb')
-rw-r--r--spec/support/helpers/require_migration.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/support/helpers/require_migration.rb b/spec/support/helpers/require_migration.rb
index 8de71d3073f..de3a8a81ab5 100644
--- a/spec/support/helpers/require_migration.rb
+++ b/spec/support/helpers/require_migration.rb
@@ -15,7 +15,7 @@ class RequireMigration
end
MIGRATION_FOLDERS = %w[db/migrate db/post_migrate].freeze
- SPEC_FILE_PATTERN = /.+\/(?<file_name>.+)_spec\.rb/.freeze
+ SPEC_FILE_PATTERN = %r{.+/(?<file_name>.+)_spec\.rb}.freeze
class << self
def require_migration!(file_name)
@@ -29,7 +29,7 @@ class RequireMigration
migration_folders.flat_map do |path|
migration_path = Rails.root.join(path).to_s
- Find.find(migration_path).grep(/\d+_#{file_name}\.rb/)
+ Find.find(migration_path).select { |m| File.basename(m).match? /\A\d+_#{file_name}\.rb\z/ }
end
end