branch_db 0.1.0 → 0.1.1

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: c68b9335eb0602387a79af5a1e9c715249e2e30070faaa916510ff8e97f21203
4
- data.tar.gz: b7f409fd18171d5845e812f1b5a1b2ec052b02b46d809c5b64a611bb5ee3a966
3
+ metadata.gz: 8a44bc87f28c22ce64d6203b277410bca8c1b5d700d6985023cda0f759057b83
4
+ data.tar.gz: f801399f3ba42bd476428c96f64412fc51d2705c05ab2762dbb5d219cc96babc
5
5
  SHA512:
6
- metadata.gz: 6ef2f12ea030b88a18549ab83d9b8aac9db5afae73ab607165d5667e789d86af0292b0a4c7b64cad56c828120c10da5a7d538529e8afd4c609748a096a70e903
7
- data.tar.gz: 2314b2ab78c68af51f995ffc9d2600dbc13ed3a78a2c504661396e243fed6e6bd24326841ea6de6ada234adc01b72fbb9b67523fe99322bc51a4e9ea21eef94f
6
+ metadata.gz: 0e0f292f72bb117d603377611f6f09d0849a01b2a14658b1113331c0646c22323775dafacd437727f3136fa5e13a6536043e7b03cce3c4061ebec76f1f9b01c1
7
+ data.tar.gz: ac74c3bd8eee25af6139b29cec4ed0071621c04f02dbb4c94316bfe855053272fd6ec820da281249cdc36aee5327268d3e56eddd3f7be5324926552c824ff623
data/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.1.1] - 2026-01-18
4
+
5
+ ### Fixed
6
+
7
+ - Fixed production/staging crash caused by undefined `BranchDb` constant when gem is only loaded in development/test groups
8
+ - Updated initializer template with `return unless defined?(BranchDb)` guard
9
+ - Updated documentation with `defined?(BranchDb)` guard in `database.yml` examples
10
+ - Removed unnecessary `Gemfile.lock` file
11
+
3
12
  ## [0.1.0] - 2026-01-18
4
13
 
5
14
  ### Added
data/README.md CHANGED
@@ -78,14 +78,14 @@ Update your `config/database.yml`:
78
78
  ```yaml
79
79
  development:
80
80
  <<: *default
81
- database: <%= BranchDb.database_name('myapp_development') %>
81
+ database: <%= defined?(BranchDb) ? BranchDb.database_name('myapp_development') : 'myapp_development' %>
82
82
 
83
83
  test:
84
84
  <<: *default
85
- database: <%= BranchDb.database_name('myapp_test') %>
85
+ database: <%= defined?(BranchDb) ? BranchDb.database_name('myapp_test') : 'myapp_test' %>
86
86
  ```
87
87
 
88
- > **Note:** Replace `myapp` with your application name. Keep `_development` and `_test` suffixes for the cleanup feature to work correctly.
88
+ > **Note:** The `defined?(BranchDb)` guard ensures production/staging environments work correctly since the gem is only loaded in development/test. Replace `myapp` with your application name.
89
89
 
90
90
  Initialize your first branch database:
91
91
 
@@ -1,3 +1,3 @@
1
1
  module BranchDb
2
- VERSION = "0.1.0".freeze
2
+ VERSION = "0.1.1".freeze
3
3
  end
@@ -1,3 +1,5 @@
1
+ return unless defined?(BranchDb)
2
+
1
3
  BranchDb.configure do |config|
2
4
  # The name of your main/stable branch (default: 'main')
3
5
  # config.main_branch = 'main'
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.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ali Hamdi Ali Fadel