24
25
26
27
28
29
30
31
32
33
34
|
# File 'lib/metabase_query_sync/cli.rb', line 24
def call(root_collection_id:, paths: nil, dry_run: false, host: nil, user: nil, pass: nil, config_file: nil, **)
config = MetabaseQuerySync::Config.from_file(
config_file || File.join(Dir.pwd, '.metabase-query-sync.erb.yaml'),
paths: paths,
host: host,
user: user,
pass: pass,
)
sync = MetabaseQuerySync::Sync.from_config(config, Logger.new(STDOUT))
sync.(MetabaseQuerySync::SyncRequest.new(root_collection_id: root_collection_id.to_i, dry_run: dry_run))
end
|