rails_db_dump_restore 0.0.4 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4f35f56ab8cf6f0687fc168342fee0a0816b1a89
4
- data.tar.gz: 006f7ed811f8f56fb52e7abc0bd387004fcc62ed
3
+ metadata.gz: 277c7da9c5bce2eaf27c5c887d14a8bc86df8c2f
4
+ data.tar.gz: 8104077570fbe021a9415adfdc7b9142beeac0a7
5
5
  SHA512:
6
- metadata.gz: 2f2de33510a9924f0809ae282cfc7d06dbf6c883981f9b24763ae2dd8a6e70a480e7f85ec880b76df1c62d4e7af5886a76e7f9c9f2387308a61b312eb5a81819
7
- data.tar.gz: 681aae5e8c831a6712760c2ffeaf24d8948fd0d13b653b184cd3476a167250c48f30c026b6b77077b9041da20f2db45492b652c2623840d8786f7165790c7cf9
6
+ metadata.gz: c5545b54d1fa9e683f63f31d734eb713fbc949352166cce1817e128b84fa2cc3bcebdb7d43b429b4644ccda0269db1de2f687f0d76dc8161cd3e85cb540c0794
7
+ data.tar.gz: fe968aeafb1bae403d81a08390c1e29540aeb236017085c94f9092683e5d8697163d205ae30b80d49ea43f606085e2f7e4e8e9d3dde02c6312833dff65f09891
@@ -1,27 +1,27 @@
1
1
  module RailsDbDumpRestore
2
2
  class Database
3
3
  def dump
4
- system "mkdir -p $(dirname #{dumpfile})"
4
+ system "mkdir -p $(dirname '#{dumpfile}')"
5
5
  path = "#{Rails.root}/#{dumpfile}"
6
6
  case ActiveRecord::Base.connection_config[:adapter]
7
7
  when "postgresql"
8
8
  args = "--clean --no-owner --no-privileges"
9
9
 
10
10
  run """
11
- PGPASSWORD=#{password}
11
+ PGPASSWORD='#{password}'
12
12
  pg_dump #{args}
13
- --host=#{host}
14
- --username=#{username}
15
- --dbname=#{database}
16
- --file=#{path}
13
+ --host='#{host}'
14
+ --username='#{username}'
15
+ --dbname='#{database}'
16
+ --file='#{path}'
17
17
  """
18
18
  when "mysql2"
19
19
  run """
20
- MYSQL_PWD=#{password}
20
+ MYSQL_PWD='#{password}'
21
21
  mysqldump
22
- --host=#{host}
23
- --user=#{username}
24
- #{database} > #{path}
22
+ --host='#{host}'
23
+ --user='#{username}'
24
+ '#{database}' > '#{path}'
25
25
  """
26
26
  end
27
27
 
@@ -1,3 +1,3 @@
1
1
  module RailsDbDumpRestore
2
- VERSION = "0.0.4"
2
+ VERSION = "1.0.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_db_dump_restore
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Albert Arvidsson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-01-07 00:00:00.000000000 Z
11
+ date: 2016-10-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties
@@ -67,9 +67,6 @@ files:
67
67
  - lib/rails_db_dump_restore/railtie.rb
68
68
  - lib/rails_db_dump_restore/version.rb
69
69
  - lib/tasks/db.rake
70
- - test/dummy-deploy/mysql/shared/bin/bundler
71
- - test/rails_db_dump_restore_test.rb
72
- - test/test_helper.rb
73
70
  homepage: http://github.com/standout/rails_db_dump_restore
74
71
  licenses:
75
72
  - MIT
@@ -90,11 +87,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
90
87
  version: '0'
91
88
  requirements: []
92
89
  rubyforge_project:
93
- rubygems_version: 2.2.2
90
+ rubygems_version: 2.5.1
94
91
  signing_key:
95
92
  specification_version: 4
96
93
  summary: Add rake db:dump, rake db:restore and cap db:pull
97
- test_files:
98
- - test/dummy-deploy/mysql/shared/bin/bundler
99
- - test/rails_db_dump_restore_test.rb
100
- - test/test_helper.rb
94
+ test_files: []
@@ -1,16 +0,0 @@
1
- #!/usr/bin/env ruby
2
- #
3
- # This file was generated by Bundler.
4
- #
5
- # The application 'bundler' is installed as part of a gem, and
6
- # this file is here to facilitate running it.
7
- #
8
-
9
- require 'pathname'
10
- ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../../../../../Gemfile",
11
- Pathname.new(__FILE__).realpath)
12
-
13
- require 'rubygems'
14
- require 'bundler/setup'
15
-
16
- load Gem.bin_path('bundler', 'bundler')
@@ -1,7 +0,0 @@
1
- require 'test_helper'
2
-
3
- class RailsDbDumpRestoreTest < ActiveSupport::TestCase
4
- test "truth" do
5
- assert_kind_of Module, RailsDbDumpRestore
6
- end
7
- end
@@ -1,16 +0,0 @@
1
- # Configure Rails Environment
2
- ENV["RAILS_ENV"] = "test"
3
-
4
- require "rails/test_help"
5
-
6
- # Filter out Minitest backtrace while allowing backtrace from other libraries
7
- # to be shown.
8
- Minitest.backtrace_filter = Minitest::BacktraceFilter.new
9
-
10
- # Load support files
11
- Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
12
-
13
- # Load fixtures from the engine
14
- if ActiveSupport::TestCase.respond_to?(:fixture_path=)
15
- ActiveSupport::TestCase.fixture_path = File.expand_path("../fixtures", __FILE__)
16
- end