active_record_proxy_adapters 0.5.2 → 0.5.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 45e61dce1f61cdeeb8acc1ee14bbea512dabaa4cb8eefc78f9f7dd148da55f24
4
- data.tar.gz: f93bae0e1f7085c525d517374a75ffbc42e65d8824623eaabb8df3ffa6322f34
3
+ metadata.gz: 55e0477b9312372e04d9fe8c544aa6181a378462c3013d6e880b7c6b4e3936ea
4
+ data.tar.gz: 3f5f4022dbbd02ad8120f5e8c71841a604bc020b48149a271fa10a9dc4a13da4
5
5
  SHA512:
6
- metadata.gz: 41becd445288a11dfbd61c1ffd9a9a896886860283994433ea4a0af559765af92c34daa4e6587ab24c3e3fdb235995a75896244ed24be77259a16d84d2493b19
7
- data.tar.gz: c7aa47d21be45995e7a1888c29caa635beb39a7ea7bf40b8f1a6364582b0b87c767e3b5204706f676be2caf6b18241c0a290e0aa8ed17f12c4b0f88dc8f8040b
6
+ metadata.gz: 37de942412b4348743f5fec2b6377552c222058b213e4715dd2f72292c442e5f65ca398699df898309fc21c6fbfd2a8c19b916358937db2d52f8b95b420a6ddd
7
+ data.tar.gz: e001c6b1d423487b6a08f791a623fc1801e64f9c9a1811470a8e5802bb64c7d4e99fef72d78281211da3953c28e237f5aa147a9a53a2b9895cc6b98c6bcf354e
@@ -32,13 +32,13 @@ module ActiveRecordProxyAdapters
32
32
  # These patterns define which database statments are considered write statments, so we can shortly re-route all
33
33
  # requests to the primary database so the replica has time to replicate
34
34
  WRITE_STATEMENT_MATCHERS = [
35
- /\ABEGIN/i,
36
- /\ACOMMIT/i,
37
- /\AROLLBACK/i,
38
- /INSERT\s[\s\S]*INTO\s[\s\S]*/i,
39
- /UPDATE\s[\s\S]*/i,
40
- /DELETE\s[\s\S]*FROM\s[\s\S]*/i,
41
- /DROP\s/i
35
+ /(\A|\s+?)BEGIN/i,
36
+ /(\A|\s+?)COMMIT/i,
37
+ /(\A|\s+?)ROLLBACK/i,
38
+ /(\A|\s+?)(INSERT\s+?INTO\s+?\S+?)/i,
39
+ /(\A|\s+?)UPDATE\s+?\S+?/i,
40
+ /(\A|\s+?)DELETE\s+?FROM\s+?\S+?/i,
41
+ /(\A|\s+?)DROP\s/i
42
42
  ].map(&:freeze).freeze
43
43
 
44
44
  # Abstract adapter methods that should be proxied.
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ActiveRecordProxyAdapters
4
- VERSION = "0.5.2"
4
+ VERSION = "0.5.3"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_record_proxy_adapters
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.2
4
+ version: 0.5.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Cruz