DEV: Add initial structure for migrations-tooling
This commit is contained in:
parent
29beaff25b
commit
e16537fa9f
|
@ -0,0 +1,2 @@
|
||||||
|
#!/usr/bin/env ruby
|
||||||
|
# frozen_string_literal: true
|
|
@ -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
|
|
@ -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
|
Loading…
Reference in New Issue