DEV: Add initial structure for migrations-tooling

This commit is contained in:
Gerhard Schlager 2023-10-13 15:38:12 +02:00 committed by Gerhard Schlager
parent 29beaff25b
commit e16537fa9f
10 changed files with 30 additions and 0 deletions

0
migrations/README.md Normal file
View File

View File

2
migrations/convert Executable file
View File

@ -0,0 +1,2 @@
#!/usr/bin/env ruby
# frozen_string_literal: true

View File

0
migrations/docs/.gitkeep Normal file
View File

17
migrations/import Executable file
View File

@ -0,0 +1,17 @@
#!/usr/bin/env ruby
# frozen_string_literal: true
puts "Loading application..."
require_relative "../config/environment"
module Migrations
module Import
class << self
def run
puts "Importing into Discourse #{Discourse::VERSION::STRING}"
end
end
end
end
Migrations::Import.run

View File

View File

0
migrations/spec/.gitkeep Normal file
View File

View File

@ -0,0 +1,11 @@
# frozen_string_literal: true
RSpec.describe "Migrations::Import" do
subject(:cli) { system "migrations/import" }
it "works" do
expect { cli }.to output(
include("Importing into Discourse #{Discourse::VERSION::STRING}"),
).to_stdout_from_any_process
end
end