branch_db 0.1.3 → 0.1.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6a9a8b72349d30a64cb6470f69883057ccb9a7a3de5121e50ccca99bf685f454
4
- data.tar.gz: 7a04f03dc48fee80f0439b40e393051e1c36648bca7e5795069e209743772800
3
+ metadata.gz: 9161a1c2f0b77819a5081474320b61fe4e67f40cdfedeb827aa0ec1ccd90271c
4
+ data.tar.gz: c12ccfb6e4934a1d04e6b8fd33f22e323983426d1b90a41c0708c8b5891cf2fe
5
5
  SHA512:
6
- metadata.gz: aa15046941647a37df718509290e97bd80751cbd7830a7844195ef5112f5dda1c05275c63bd04dd7862c7b5ea91baa28cb28dc48375436d93769c081dcd7b4ca
7
- data.tar.gz: b0bb800806b39914eb0451790341af6634e7933b8405293273958311e322615b2ae7b507519596355ba77de79c784113732bcc6a6d412415516aa03377fdeb18
6
+ metadata.gz: 3cc42e63a336cf1ce931d3df4e864f8e07b635d25614442d4a74123d254d377ab76d80c6926885d1a0307647230bd846e7f49abc4a61748385bb0c099f3f7dc1
7
+ data.tar.gz: 6713fd11a7353164c9a65546ba6a04aa92a8c779fe7bea2d8bc16daef10d8feb057dcd716da8964206a8c9ddcdd76977292f6051cc5007477e6b576e363cf922
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.1.4] - 2026-03-11
4
+
5
+ ### Added
6
+
7
+ - `FORCE=1` environment variable to skip confirmation prompt on `db:branch:purge` and `db:branch:prune`
8
+
3
9
  ## [0.1.3] - 2026-02-19
4
10
 
5
11
  ### Fixed
data/README.md CHANGED
@@ -155,8 +155,8 @@ RAILS_ENV=test rails db:prepare
155
155
  |---------|-------------|
156
156
  | `rails db:prepare` | Rails' standard command, enhanced with cloning from parent/main |
157
157
  | `rails db:branch:list` | List all branch databases |
158
- | `rails db:branch:purge` | Remove all branch databases except current and main |
159
- | `rails db:branch:prune` | Remove databases for branches that no longer exist in git |
158
+ | `rails db:branch:purge` | Remove all branch databases except current and main. Use `FORCE=1` to skip confirmation. |
159
+ | `rails db:branch:prune` | Remove databases for branches that no longer exist in git. Use `FORCE=1` to skip confirmation. |
160
160
 
161
161
  ### Examples
162
162
 
@@ -185,6 +185,10 @@ rails db:branch:prune
185
185
  # => - myapp_development_merged_feature
186
186
  # => - myapp_test_merged_feature
187
187
  # => Proceed with deletion? [y/N]
188
+
189
+ # Skip confirmation prompt (useful for CI/scripts)
190
+ FORCE=1 rails db:branch:purge
191
+ FORCE=1 rails db:branch:prune
188
192
  ```
189
193
 
190
194
  ## How It Works
@@ -9,14 +9,14 @@ namespace :db do
9
9
  db_configs.each { cleaner_for(_1).list_branch_databases }
10
10
  end
11
11
 
12
- desc "Remove all branch databases (keeps main and current branch)"
12
+ desc "Remove all branch databases (keeps main and current branch). Set FORCE=1 to skip confirmation."
13
13
  task purge: :environment do
14
- db_configs.each { cleaner_for(_1).purge }
14
+ db_configs.each { cleaner_for(_1).purge(confirm: ENV["FORCE"] != "1") }
15
15
  end
16
16
 
17
- desc "Remove databases for branches that no longer exist in git"
17
+ desc "Remove databases for branches that no longer exist in git. Set FORCE=1 to skip confirmation."
18
18
  task prune: :environment do
19
- db_configs.each { cleaner_for(_1).prune }
19
+ db_configs.each { cleaner_for(_1).prune(confirm: ENV["FORCE"] != "1") }
20
20
  end
21
21
 
22
22
  desc "Ensure branch database exists (used by db:prepare enhancement)"
@@ -1,3 +1,3 @@
1
1
  module BranchDb
2
- VERSION = "0.1.3".freeze
2
+ VERSION = "0.1.4".freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: branch_db
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ali Hamdi Ali Fadel