glib-web 6.9.1 → 6.9.2

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 +10 -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: b14f64597fd648c2aee68f4e201e47e1cbe5b8c5e6b57da72a8334a7adeaba91
4
+ data.tar.gz: 527865b5bbc3fdbb39fddc294b0007a1adc1e575a970098fd0e3a59988cc09f0
5
5
  SHA512:
6
- metadata.gz: a6a4f13247dcc3d90b877f60c4b3299046ec2ec4a4afa410d1301ff0120fee4551b01258926fddbb00c7fe501d5d0ccd8f3490236529c084a7be702eca8cab9f
7
- data.tar.gz: 35e21c9e35d5b5c15d906f17b2c5f2c7fbf452d38b5fa09839864d9d5f37e35282dca8b237f07d5350f8d5430a8054bccf98145e28968ace7dce8fafdc7c5ab0
6
+ metadata.gz: c01a566c50f0f32e15162b3ee1e484fd4507632967176a58aeeccd45199278367ea347093358f46d6411d675fbf49810b34104939c91baedc7f4fb62b45c8731
7
+ data.tar.gz: f16d7dd5d9ee7468098946e3b61a09188a3b2584ab2375b60adbb41f1b906b10d008d5bdef77b3fe3cc8559f69d9aac6f6b59195e4ff9e66d78e494e39907c0e
data/lib/glib/engine.rb CHANGED
@@ -28,16 +28,21 @@ 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
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.
41
46
  end
42
47
  end
43
48
 
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.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - ''