dumpcar 0.1.1 → 0.1.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +2 -1
- data/lib/dumpcar/railtie.rb +0 -4
- data/lib/dumpcar/version.rb +1 -1
- data/lib/rails/commands/dumpcar_command.rb +15 -0
- metadata +3 -3
- data/lib/dumpcar/tasks/dump.rake +0 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b08e3ae8d2d7e0e92ac0031399b0d8b8cade5041febce05c95d11bad2e6dd5bf
|
4
|
+
data.tar.gz: 40620d3d09bb284ea73f5dd76d67caa64dc10a1e4ff2015fecb2e9d7ae6e1d28
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: df6accb1edcb0216ef5db0997b561fbae926b3fd38d82148e9b87e59cee96bcdf1b4707ee6d70ab744615b1525cfd6ea904fb42144f9acca3aa2c2db7ca5f99f
|
7
|
+
data.tar.gz: 5ee0c794ba6a1c3d7c8de55726c811d753359a40d822f8646f09c63ee8f7f3218a3ea48d8485f1f4b95b8b4e966cd1311389daea8b1dcb73f433cf33977a973d
|
data/README.md
CHANGED
@@ -10,7 +10,7 @@ Rake tasks for dumping and restoring the contents of the PostgreSQL database for
|
|
10
10
|
Install the gem executing:
|
11
11
|
|
12
12
|
```bash
|
13
|
-
bundle add
|
13
|
+
bundle add dumpcar
|
14
14
|
rails g dumpcar # creates db/dumps folder, adds it to .gitignore and commits
|
15
15
|
```
|
16
16
|
|
@@ -57,3 +57,4 @@ Everyone interacting in the Dumpcar project's codebases, issue trackers, chat ro
|
|
57
57
|
|
58
58
|
1. Update the version in the `lib/dumpcar/version.rb`
|
59
59
|
2. Run the Push Gem workflow
|
60
|
+
3. Create a new release from the UI for the new tag
|
data/lib/dumpcar/railtie.rb
CHANGED
data/lib/dumpcar/version.rb
CHANGED
@@ -0,0 +1,15 @@
|
|
1
|
+
class DumpcarCommand < Rails::Command::Base
|
2
|
+
class_option :base, type: :string, desc: "the location of your DB dumps, defaults to Rails.root.join('db/dumps')"
|
3
|
+
|
4
|
+
desc "dump", "Dump postgres backup file"
|
5
|
+
def dump
|
6
|
+
require "dumpcar"
|
7
|
+
Dumpcar::Instance.new.dump
|
8
|
+
end
|
9
|
+
|
10
|
+
desc "restore", "Restore postgres backup file"
|
11
|
+
def restore
|
12
|
+
require "dumpcar"
|
13
|
+
Dumpcar::Instance.new.restore
|
14
|
+
end
|
15
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dumpcar
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.1
|
4
|
+
version: 0.1.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eric Schultz
|
@@ -61,8 +61,8 @@ files:
|
|
61
61
|
- lib/dumpcar/location.rb
|
62
62
|
- lib/dumpcar/pg.rb
|
63
63
|
- lib/dumpcar/railtie.rb
|
64
|
-
- lib/dumpcar/tasks/dump.rake
|
65
64
|
- lib/dumpcar/version.rb
|
65
|
+
- lib/rails/commands/dumpcar_command.rb
|
66
66
|
- package-lock.json
|
67
67
|
- package.json
|
68
68
|
homepage: https://github.com/wwahammy/dumpcar
|
@@ -87,5 +87,5 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
87
87
|
requirements: []
|
88
88
|
rubygems_version: 3.6.7
|
89
89
|
specification_version: 4
|
90
|
-
summary:
|
90
|
+
summary: Commands for dumping and restoring Rails PostgreSQL database contents
|
91
91
|
test_files: []
|
data/lib/dumpcar/tasks/dump.rake
DELETED
@@ -1,17 +0,0 @@
|
|
1
|
-
namespace :dumpcar do
|
2
|
-
namespace :pg do
|
3
|
-
desc "Dumped postgres backup file"
|
4
|
-
task dump: :environment do
|
5
|
-
Dumpcar.dump
|
6
|
-
end
|
7
|
-
|
8
|
-
desc "Load dumped postgres backup file"
|
9
|
-
task restore: :environment do
|
10
|
-
Dumpcar.restore
|
11
|
-
end
|
12
|
-
|
13
|
-
def say(something)
|
14
|
-
puts(something)
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|