glib-web 6.9.1 → 6.9.3

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/glib/engine.rb +12 -5
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 386e85f530042a0ae24b60c0f589c88ed6e1f6fdd0b442f851569b4839dbbe33
4
- data.tar.gz: 402f200bc3162ced6ea29228cbeaf231cc0a8f0ff3ebf9aba680bd5f7090f66e
3
+ metadata.gz: be34b6a047f58554b81fa3f72658076bcdefc2e06ec5b9d34f64a48208307ad2
4
+ data.tar.gz: b9daa421b06c9d995534d88ff8a7cc11024ca59291f67ceaaae4d96c7d2e7bed
5
5
  SHA512:
6
- metadata.gz: a6a4f13247dcc3d90b877f60c4b3299046ec2ec4a4afa410d1301ff0120fee4551b01258926fddbb00c7fe501d5d0ccd8f3490236529c084a7be702eca8cab9f
7
- data.tar.gz: 35e21c9e35d5b5c15d906f17b2c5f2c7fbf452d38b5fa09839864d9d5f37e35282dca8b237f07d5350f8d5430a8054bccf98145e28968ace7dce8fafdc7c5ab0
6
+ metadata.gz: 64e8c8220a4e59a60f6909f389dc7a1c2c0ed3e9086eb3ed4c6e8df979cdf2c87e8620dc79b75bb48eab574733a31f2787ad7bb4d281f4890e7d3feb592aab08
7
+ data.tar.gz: 8331b3ed70b4c3dd56dab59a9fcfaf9e59ef4fde9a1daf7c61a728598585685c7a0700ef4ebe9200bd9080dcd039d61d99358a4e623b3e739e47649dc83d704d
data/lib/glib/engine.rb CHANGED
@@ -28,16 +28,23 @@ module Glib
28
28
  #
29
29
  # Opt-in: only consumers who run the gem's `create_snapshot_blob_references` migration
30
30
  # have the table. The connection+table_exists? guard (wrapped in a rescue for boot
31
- # sequences with no DB yet — `rails db:create`, parallel test setup) makes this a no-op
32
- # for everyone else, so a bare `include Glib::SnapshotV2` never crashes a boot.
31
+ # sequences with no DB reachable — `rails db:create`, parallel test setup, and DB-less
32
+ # build containers like docker's `assets:precompile`) makes this a no-op for everyone
33
+ # else, so a bare `include Glib::SnapshotV2` never crashes a boot.
33
34
  unless respond_to?(:snapshot_blob_references)
34
35
  begin
35
36
  if connection.table_exists?(:snapshot_blob_references)
36
37
  has_many :snapshot_blob_references, dependent: :destroy
37
38
  end
38
- rescue ActiveRecord::NoDatabaseError, ActiveRecord::StatementInvalid
39
- # Boot before the DB exists (e.g. `rails db:create`). The association gets re-registered
40
- # on the next successful boot that finds the table.
39
+ rescue ActiveRecord::NoDatabaseError, ActiveRecord::StatementInvalid,
40
+ ActiveRecord::ConnectionNotEstablished => e
41
+ # NoDatabaseError/StatementInvalid: the server exists but the database doesn't yet
42
+ # (e.g. `rails db:create`). ConnectionNotEstablished: no server reachable at all —
43
+ # e.g. docker build's assets:precompile, where DATABASE_HOST is unset and pg falls
44
+ # back to the local socket. The association gets re-registered on the next
45
+ # successful boot that finds the table. Warn (stderr, not the app log) so the
46
+ # breadcrumb lands in build/boot logs regardless of the configured log level.
47
+ warn "[glib-web] snapshot_blob_references association not registered (#{e.class}) — no DB reachable at boot"
41
48
  end
42
49
  end
43
50
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: glib-web
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.9.1
4
+ version: 6.9.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - ''