rails_failover 2.0.0 → 2.0.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: b769d81f278cffd6d960f9a43da2feb15d46e23dd35d2608dbef0fdb04688a70
4
- data.tar.gz: a72536269e00455cf0506f68dfbbdf6c98a7b7c8a24064532a7219fa31b4bec6
3
+ metadata.gz: 22d00b2fbfa1a5c8fc28cae9244e93700885a41da8f1a824bf0c381d4606fafa
4
+ data.tar.gz: 6e9763206550dfa0101ca5680f740aae32ec9d8d452b469dc7d14c033848c56c
5
5
  SHA512:
6
- metadata.gz: 33f8835985676d80ba1701eda774322db0701040691e3164218bbf931901314a277ad63c926634f7ac6270f43e5899a7a90030b03f7ec53badb618bac0a187b3
7
- data.tar.gz: a219d8441c37438bc1ea367fc99920cf3090728a5be482dd59a68f80a5690effa3f2a2a059085675980ed2e816e662ca3c485b12543437bde2801e07d4adfa6b
6
+ metadata.gz: 4e9fafd722150cda45594b10ff642b4296c29e14bd604a8c0c8cd1fbc89706bbcd3b339c5043478056d32302c13d59b510fb77eaa0c248eb363527cf90d74715
7
+ data.tar.gz: 55dd5bde9d208dbf9103a73474af639ef03447e4aba5c6012937670b6f627cc5119bcd09cc8559ec6ded4b7fc895e2190d55662acf5b79e5592e8f548fb4e32d
data/CHANGELOG.md CHANGED
@@ -5,7 +5,9 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
- ## [Unreleased]
8
+ ## [2.0.1] - 2023-05-30
9
+
10
+ - FIX: Use `next` instead of `break` to avoid a local jump error
9
11
 
10
12
  ## [2.0.0] - 2023-05-16
11
13
 
@@ -6,7 +6,7 @@ module RailsFailover
6
6
  initializer "rails_failover.init", after: "active_record.initialize_database" do |app|
7
7
  app.config.active_record_rails_failover = false
8
8
  config = RailsFailover::ActiveRecord.config
9
- break unless config[:replica_host] && config[:replica_port]
9
+ next unless config[:replica_host] && config[:replica_port]
10
10
 
11
11
  app.config.active_record_rails_failover = true
12
12
  ::ActiveSupport.on_load(:active_record) do
@@ -21,14 +21,14 @@ module RailsFailover
21
21
  end
22
22
 
23
23
  initializer "rails_failover.insert_middleware" do |app|
24
- if app.config.active_record_rails_failover
25
- ActionDispatch::DebugExceptions.register_interceptor do |request, exception|
26
- RailsFailover::ActiveRecord::Interceptor.handle(request, exception)
27
- end
24
+ next unless app.config.active_record_rails_failover
28
25
 
29
- if !skip_middleware?(app.config)
30
- app.middleware.unshift(RailsFailover::ActiveRecord::Middleware)
31
- end
26
+ ActionDispatch::DebugExceptions.register_interceptor do |request, exception|
27
+ RailsFailover::ActiveRecord::Interceptor.handle(request, exception)
28
+ end
29
+
30
+ if !skip_middleware?(app.config)
31
+ app.middleware.unshift(RailsFailover::ActiveRecord::Middleware)
32
32
  end
33
33
  end
34
34
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RailsFailover
4
- VERSION = "2.0.0"
4
+ VERSION = "2.0.1"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_failover
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alan Tan