Skip to content

Commit

Permalink
Merge pull request #1754 from mamhoff/remove-task-helpers
Browse files Browse the repository at this point in the history
Remove Tasks::Helper module
  • Loading branch information
tvdeyen authored Mar 20, 2020
2 parents d22dd5a + 64433c8 commit 69bc84e
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 329 deletions.
86 changes: 0 additions & 86 deletions lib/alchemy/tasks/helpers.rb

This file was deleted.

18 changes: 1 addition & 17 deletions lib/tasks/alchemy/db.rake
Original file line number Diff line number Diff line change
@@ -1,29 +1,13 @@
# frozen_string_literal: true
require 'shellwords'

require 'alchemy/seeder'
require 'alchemy/tasks/helpers'

namespace :alchemy do
namespace :db do
include Alchemy::Tasks::Helpers

desc "Seeds the database with Alchemy defaults"
task seed: [:environment] do
Alchemy::Seeder.seed!
end

desc "Dumps the database to STDOUT (Pass DUMP_FILENAME to store the dump into a file)."
task dump: :environment do
dump_store = ENV['DUMP_FILENAME'] ? " > #{ENV['DUMP_FILENAME']}" : ""
dump_cmd = database_dump_command(database_config['adapter'])
system "#{dump_cmd}#{dump_store}"
end

desc "Imports the database from STDIN (Pass DUMP_FILENAME to read the dump from file)."
task import: :environment do
dump_store = ENV['DUMP_FILENAME'] ? "cat #{ENV['DUMP_FILENAME']}" : "echo #{Shellwords.escape(STDIN.read)}"
import_cmd = database_import_command(database_config['adapter'])
system "#{dump_store} | #{import_cmd}"
end
end
end
226 changes: 0 additions & 226 deletions spec/tasks/helpers_spec.rb

This file was deleted.

0 comments on commit 69bc84e

Please sign in to comment.