bard-rake 0.23.1 → 0.25.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3a4cd031df1cd55f1d80a9391ad9f6d38fa4a9ffdbb1a03a15eb859460b354a3
4
- data.tar.gz: eb94409e18156b0c0e24c6cef3aa16eda3486564e583b4da520db4f80259ebb1
3
+ metadata.gz: 68b2a1c881c339a90c3d60d783461dd19013f5fd7d24c675c40594bb817bc479
4
+ data.tar.gz: ed5bbf69aaf91505d60638fad60071e918ea73b53b0b52d3b304cb9fa8a0d11f
5
5
  SHA512:
6
- metadata.gz: 9625ffc88f3162feb6a904a815e9bf40f6f85ba1f85521d88eaffab273449f10d17c1f8e764205d5fa9e123652d9fc4e3a29b42c076d5585f5d86c76b02d8809
7
- data.tar.gz: 90003bcf6707b2d416e98216b080d707a26fb173bf824cf3822a4ea93b56915d7778c23658658c11a2b9fbc05edf5cfaa2b1ce5769f4123bd9edeb5f86a5c93b
6
+ metadata.gz: 941d3889ae8d1a652b3d614d7e7555ec9639fd678974a4543e7c4f168ea5dfa9a0a827343421ad1e728ca200e60ed81072dac22b05726890ff96c3ee1cdc75d7
7
+ data.tar.gz: 529ce6f722a7c922e593618e2dfef4ba4484dd328c93a80c86d0131d0a424706e1a08c1d43b96b39e32dd34cf581c695e555d66a294f60b0d1698bf3a41445be
@@ -2,21 +2,24 @@ require "backhoe"
2
2
  require "bard-backup"
3
3
 
4
4
  namespace :db do
5
- desc "Dump the current database to db/data.sql.gz"
6
- task :dump => :environment do
7
- Backhoe.dump "db/data.sql.gz"
5
+ desc "Dump the current database to supplied path (default: db/data.sql.gz)"
6
+ task :dump, [:path] => :environment do |_, args|
7
+ args.with_defaults(path: "db/data.sql.gz")
8
+ Backhoe.dump args.path
8
9
  end
9
10
 
10
- desc "Load the db/data.sql data into the current database."
11
- task :load => :environment do
12
- Backhoe.load "db/data.sql.gz", drop_and_create: true
11
+ desc "Load the supplied path (default: db/data.sql.gz) into the current database."
12
+ task :load, [:path] => :environment do |_, args|
13
+ args.with_defaults(path: "db/data.sql.gz")
14
+ Backhoe.load args.path, drop_and_create: true
13
15
  end
14
16
 
15
17
  task :backup => :environment do
16
18
  project_name = File.basename(Dir.getwd)
17
- config = Rails.application.credentials.bard_backup
18
- s3_path = config.delete(:s3_path) || "bard-backup/#{project_name}"
19
- Bard::Backup.call s3_path, **config
19
+ Array(Rails.application.credentials.bard_backup).each do |config|
20
+ s3_path = config.delete(:s3_path) || "bard-backup/#{project_name}"
21
+ Bard::Backup.call s3_path, **config
22
+ end
20
23
  end
21
24
 
22
25
  task "drop:current" => :environment do
@@ -1,6 +1,6 @@
1
1
  module Bard
2
2
  module Rake
3
- VERSION = "0.23.1"
3
+ VERSION = "0.25.0"
4
4
  end
5
5
  end
6
6
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bard-rake
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.23.1
4
+ version: 0.25.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Micah Geisel
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-07-22 00:00:00.000000000 Z
11
+ date: 2025-07-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake