Skip to content

Commit

Permalink
Remove debugging, tests are passing
Browse files Browse the repository at this point in the history
  • Loading branch information
eanders committed Nov 4, 2022
1 parent 854b5e0 commit 48c46a7
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions lib/pg_fixtures.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@ def store(force: false)
# truncating each table before loading
def restore
truncate
# NOTE: you must store the connection information in `.pg_pass` for this to work
# puts "Running psql #{db_options} #{db_name} -f #{file_path}"
`psql #{db_options} -f #{file_path}`
fix_sequences
end
Expand All @@ -54,19 +52,10 @@ def exists?
private

def pg_dump
# NOTE: you must store the connection information in `.pg_pass` for this to work
# puts "Running: pg_dump #{db_options} #{pg_table_string} --data-only #{db_name} > #{file_path}"
puts `cat ~/.pgpass`
puts "pg_dump #{db_options} #{pg_table_string} --data-only > #{file_path}"
`pg_dump #{db_options} #{pg_table_string} --data-only > #{file_path}`
end

def db_options
# [].tap do |options|
# options << "-h #{host}" if host.present?
# options << "-U #{username}" if username.present?
# options << "-p #{port}" if port.present?
# end.join(' ')
"postgresql://#{username}:#{password}@#{host}:#{port}/#{db_name}"
end

Expand Down

0 comments on commit 48c46a7

Please sign in to comment.