jetstream_bridge 7.0.3 → 7.0.5

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: 3987a6471d65daf7af34a7b010201708e5958be9a438a555c9e4454724665a05
4
- data.tar.gz: eb50cc9fbf525cb7262878c4442e2f40d9622ae83ecd6d855952557fba656d0e
3
+ metadata.gz: 7d7a08f0c887494700158188558b2e686d7a55fe773d20d2716f13741f92de67
4
+ data.tar.gz: 6ebea4aecaeefdb2b03d07445313dd7faba8a09cc5b51c2a1cb2ab60a8a4f86a
5
5
  SHA512:
6
- metadata.gz: e8d73031cc47224189f633875213c6f3c7e2bf21d500ee147c87f05f9bbd61133094933d216da1dd2b49d0eb2a53f9e86561d98b6a73dcbf40a484ae60ad4e88
7
- data.tar.gz: 3e4d74d0a21f6a7fcf803526d0adbd68032df9640225943ded56b7ab04020616501735fb3e30071ceff755fac6586ff37e2822c781ef92b7efa19a86fa735150
6
+ metadata.gz: 661aefd62030b960a4d370226145406c1429391ac0f8be94b6c1c93dd8e575f095227efe8469b7a9bf4c9d9c086ff65574182a47c28371dd1c7a290dbccdcb66
7
+ data.tar.gz: efff08f8624bf540027b0ce5a049c839db02e4c041ddf33d131f3fb6e69cd9a92187ecde3e6ee04afd435bcbd5ec26d5efd72e7aec8a639f779fa3fab2f03e17
@@ -28,21 +28,26 @@ module JetstreamBridge
28
28
 
29
29
  # -- Rails::Generators::Migration plumbing --
30
30
  def self.next_migration_number(dirname)
31
- if timestamped_migrations?
32
- Time.now.utc.strftime('%Y%m%d%H%M%S')
33
- else
34
- format('%.3d', current_migration_number(dirname) + 1)
35
- end
31
+ return format('%.3d', current_migration_number(dirname) + 1) unless timestamped_migrations?
32
+
33
+ current_timestamp = Time.now.utc.strftime('%Y%m%d%H%M%S').to_i
34
+ last_migration = current_migration_number(dirname) + 1
35
+
36
+ [current_timestamp, last_migration].max.to_s
36
37
  end
37
38
 
38
39
  def self.timestamped_migrations?
39
- if ActiveRecord::Base.respond_to?(:timestamped_migrations)
40
- ActiveRecord::Base.timestamped_migrations
41
- elsif ActiveRecord::Migration.respond_to?(:timestamped_migrations)
42
- ActiveRecord::Migration.timestamped_migrations
43
- else
44
- true
40
+ # Prefer the Rails application configuration which is available
41
+ # without hitting ActiveRecord's dynamic matchers (that would raise
42
+ # when no connection is established).
43
+ if defined?(Rails) &&
44
+ Rails.application &&
45
+ Rails.application.config.respond_to?(:active_record)
46
+ ar_config = Rails.application.config.active_record
47
+ return ar_config.timestamped_migrations if ar_config.respond_to?(:timestamped_migrations)
45
48
  end
49
+
50
+ true
46
51
  end
47
52
 
48
53
  private
@@ -4,5 +4,5 @@
4
4
  #
5
5
  # Version constant for the gem.
6
6
  module JetstreamBridge
7
- VERSION = '7.0.3'
7
+ VERSION = '7.0.5'
8
8
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jetstream_bridge
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.0.3
4
+ version: 7.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Attara
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-01-31 00:00:00.000000000 Z
11
+ date: 2026-02-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord