dumpcar 0.1.0.2 → 0.1.0.4
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 +31 -11
- data/gemfiles/rails_6.0.gemfile +1 -0
- data/gemfiles/rails_6.1.gemfile +1 -0
- data/gemfiles/rails_7.0.gemfile +1 -0
- data/gemfiles/rails_7.1.gemfile +1 -0
- data/gemfiles/rails_7.2.gemfile +1 -0
- data/gemfiles/rails_8.0.gemfile +1 -0
- data/gemfiles/rails_edge.gemfile +1 -0
- data/lib/dumpcar/location.rb +5 -1
- data/lib/dumpcar/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ed119cf17a409f818d9dd8f069a5e7220311915609c84a89e1e4cee24708ec1b
|
4
|
+
data.tar.gz: f3537224213f96e745edfcdccbc56e3906f0b32fdb349ce725425a41f9d78887
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 14c5f0ba07c1618d401a9b3f8d5b7345b7c70b1c484bdbe0179f75e7c8f7995e5316470a4e6b0986f7b4ff02701f012df80d9c60b8b9a31f1519144efb309908
|
7
|
+
data.tar.gz: 5bfad0956996b9fd3f9937728b179f9144af7ba65cbe8f33ee60156dfdb7820852675ef12d8286a3faad5f0d01eaa22d4314886c8dc4774e66d85f6c99ef39c8
|
data/README.md
CHANGED
@@ -1,30 +1,45 @@
|
|
1
|
-
#
|
1
|
+
# Dumpcar
|
2
2
|
|
3
|
-
|
3
|
+
Rake tasks for dumping and restoring the contents of the PostgreSQL database for your Rails application.
|
4
4
|
|
5
|
-
|
5
|
+
* Dump (`rails dumpcar:dump`) and restore your last dump (`rails dumpcar:restore`) with a single command
|
6
|
+
* Uses your Rails database credentials for your environment
|
6
7
|
|
7
|
-
|
8
|
+
## Installation
|
8
9
|
|
9
|
-
Install the gem
|
10
|
+
Install the gem executing:
|
10
11
|
|
11
12
|
```bash
|
12
13
|
bundle add Dumpcar
|
14
|
+
rails g dumpcar # creates db/dumps folder, adds it to .gitignore and commits
|
13
15
|
```
|
14
16
|
|
15
|
-
|
17
|
+
## Usage
|
16
18
|
|
17
19
|
```bash
|
18
|
-
|
20
|
+
rails dumpcar:dump # creates a postgresql dump based on current time like db/dumps/20250601022124.dump
|
21
|
+
rails dumpcar:restore # restores the last dump made chronologically from the db/dumps directory
|
19
22
|
```
|
20
23
|
|
21
|
-
##
|
24
|
+
## Compatibility
|
22
25
|
|
23
|
-
|
26
|
+
Outside of the `rails dumpcar:dump` and `rails dumpcar:restore` commands, don't expect any compatibility guarantees for now.
|
27
|
+
|
28
|
+
## Longer term feature goals
|
29
|
+
|
30
|
+
* Support other Rails database (MySQL and SQLite)
|
31
|
+
* Support other Rails environments than the current one
|
32
|
+
* Ability to clean your db/dumps directory of all dumps before a given time
|
33
|
+
* Add support for naming a dump (you can manually do this now but not via the rake task)
|
34
|
+
* Restoring a specific dump via filepath
|
35
|
+
* Restoring a specific dump by timestamp
|
36
|
+
* Restoring a specific dump by name
|
37
|
+
* Restoring a specific dump made before or after a given time
|
38
|
+
* Extension points for other ways to get a database (Easily get a dump from Heroku's Postgres backups, for example)
|
24
39
|
|
25
40
|
## Development
|
26
41
|
|
27
|
-
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
42
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You should run `bin/appraisal rspec` to run all of the tests on all of the supported Rails versions. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
28
43
|
|
29
44
|
## Contributing
|
30
45
|
|
@@ -36,4 +51,9 @@ The gem is available as open source under the terms of the [LGPL-3.0-or-later li
|
|
36
51
|
|
37
52
|
## Code of Conduct
|
38
53
|
|
39
|
-
Everyone interacting in the
|
54
|
+
Everyone interacting in the Dumpcar project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/wwahammy/dumpcar/blob/main/CODE_OF_CONDUCT.md).
|
55
|
+
|
56
|
+
## Releasing
|
57
|
+
|
58
|
+
1. Update the version in the `lib/dumpcar/version.rb`
|
59
|
+
2. Run the Push Gem workflow
|
data/gemfiles/rails_6.0.gemfile
CHANGED
data/gemfiles/rails_6.1.gemfile
CHANGED
data/gemfiles/rails_7.0.gemfile
CHANGED
data/gemfiles/rails_7.1.gemfile
CHANGED
data/gemfiles/rails_7.2.gemfile
CHANGED
data/gemfiles/rails_8.0.gemfile
CHANGED
data/gemfiles/rails_edge.gemfile
CHANGED
data/lib/dumpcar/location.rb
CHANGED
@@ -11,7 +11,7 @@ module Dumpcar
|
|
11
11
|
|
12
12
|
def dumps
|
13
13
|
prepare_base!
|
14
|
-
|
14
|
+
base.glob(TIMESTAMP_FILE_GLOB)
|
15
15
|
end
|
16
16
|
|
17
17
|
def first
|
@@ -19,6 +19,10 @@ module Dumpcar
|
|
19
19
|
dumps.first
|
20
20
|
end
|
21
21
|
|
22
|
+
def search(query)
|
23
|
+
dumps.first { |file| file.basename.starts_with(query) }
|
24
|
+
end
|
25
|
+
|
22
26
|
def last
|
23
27
|
prepare_base!
|
24
28
|
dumps.last
|
data/lib/dumpcar/version.rb
CHANGED
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.0.
|
4
|
+
version: 0.1.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eric Schultz
|
@@ -84,5 +84,5 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
84
84
|
requirements: []
|
85
85
|
rubygems_version: 3.6.7
|
86
86
|
specification_version: 4
|
87
|
-
summary:
|
87
|
+
summary: Rake tasks for dumping and restoring Rails PostgreSQL database contents
|
88
88
|
test_files: []
|