mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 09:42:02 +08:00
DEV: Add initial structure for migrations-tooling
This commit is contained in:
parent
29beaff25b
commit
e16537fa9f
0
migrations/README.md
Normal file
0
migrations/README.md
Normal file
0
migrations/common/.gitkeep
Normal file
0
migrations/common/.gitkeep
Normal file
2
migrations/convert
Executable file
2
migrations/convert
Executable file
|
@ -0,0 +1,2 @@
|
|||
#!/usr/bin/env ruby
|
||||
# frozen_string_literal: true
|
0
migrations/converters/.gitkeep
Normal file
0
migrations/converters/.gitkeep
Normal file
0
migrations/docs/.gitkeep
Normal file
0
migrations/docs/.gitkeep
Normal file
17
migrations/import
Executable file
17
migrations/import
Executable 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
|
0
migrations/importer/.gitkeep
Normal file
0
migrations/importer/.gitkeep
Normal file
0
migrations/importer/steps/.gitkeep
Normal file
0
migrations/importer/steps/.gitkeep
Normal file
0
migrations/spec/.gitkeep
Normal file
0
migrations/spec/.gitkeep
Normal file
11
migrations/spec/import_spec.rb
Normal file
11
migrations/spec/import_spec.rb
Normal 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
|
Loading…
Reference in New Issue
Block a user