mirror of
https://github.com/discourse/discourse.git
synced 2025-05-24 14:12:10 +08:00
DEV: Prepare new structure for migrations-tooling (#26631)
* Moves existing files around. All essential scripts are in `migrations/bin`, and non-essential scripts like benchmarks are in `migrations/scripts` * Dependabot configuration for migrations-tooling (disabled for now) * Updates test configuration for migrations-tooling * Shorter configuration for intermediate DB for now. We will add the rest table by table. * Adds a couple of benchmark scripts * RSpec setup especially for migrations-tooling and the first tests * Adds sorting/formatting to the `generate_schema` script
This commit is contained in:
20
migrations/spec/rails_helper.rb
Normal file
20
migrations/spec/rails_helper.rb
Normal file
@ -0,0 +1,20 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
# we need to require the rails_helper from core to load the Rails environment
|
||||
require_relative "../../spec/rails_helper"
|
||||
|
||||
require "bundler/inline"
|
||||
require "bundler/ui"
|
||||
|
||||
# this is a hack to allow us to load Gemfiles for converters
|
||||
Dir[File.expand_path("../config/gemfiles/**/Gemfile", __dir__)].each do |path|
|
||||
# Create new UI and set level to confirm to avoid printing unnecessary messages
|
||||
bundler_ui = Bundler::UI::Shell.new
|
||||
bundler_ui.level = "confirm"
|
||||
|
||||
gemfile(true, ui: bundler_ui) do
|
||||
# rubocop:disable Security/Eval
|
||||
eval(File.read(path), nil, path, 1)
|
||||
# rubocop:enable Security/Eval
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user