scout_apm 2.4.13 → 2.4.14

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
  SHA1:
3
- metadata.gz: 2ec07b46e556c0beae2648d2c25a610199814179
4
- data.tar.gz: ed6284b5c6a58a7ab08a464eb6e60cb65334d12f
3
+ metadata.gz: c2f05daf2aea310649b012308c81cee4f9de38df
4
+ data.tar.gz: 14407e60e5bb3dfb282b8cd92dd7f03e52b1cb12
5
5
  SHA512:
6
- metadata.gz: 15c5a89d33a1af9e605a03390b9344cfad0ceefbb18a3afe6800c4afb3797bca60af57d15ef0323165e344d55454877d15e8455f12e3ba5fd15bf3c3eaf01867
7
- data.tar.gz: 1caf6345c5900c54a493aa87bd95168fa5733ae91a7b73211094045b0437c707e6e755286481d89514f43dca1a8a2e31f3a8eeb5dec8cbbabdfebbfb8aed52ac
6
+ metadata.gz: 8450ba1ff69c5a8b976d27d755e5879cfc3e855f0951862c9ffab2584ac22dae4476792a628b1c50017d7325d60b65ef00b6590a4ec6a23aef01dc6bdbed9a66
7
+ data.tar.gz: 543779510c2f4b96fb31308bc25aedf3074a8ad3c4890f7bcf56d78daa1092fbf8f3ee15a0124c331216b832d000118398c321fafcc7d38204be1d5136fd9e89
data/CHANGELOG.markdown CHANGED
@@ -1,3 +1,7 @@
1
+ # 2.4.14
2
+
3
+ * Fix database connection issue when installed in an app also using the Textacular gem
4
+
1
5
  # 2.4.13
2
6
 
3
7
  * Incorporating total time consumed into transaction trace policy
@@ -55,12 +55,21 @@ module ScoutApm
55
55
  end
56
56
  end
57
57
 
58
+ # Note, this code intentionally avoids `.respond_to?` because of an
59
+ # infinite loop created by the Textacular gem (tested against 3.2.2 of
60
+ # that gem), which some customers have installed.
61
+ #
62
+ # The loop was:
63
+ # - Ask for database adapter
64
+ # - Do .respond_to? on AR::Base to look for connection_config (which isn't present on some versions of rails)
65
+ # - Textacular gem has a monkey-patch that queries the columns of the db
66
+ # This obtains a connection, and runs a query.
67
+ # - Scout tries to run SQLSanitizer against the query, which needs the database adapter.
68
+ # - Goes back to first step.
69
+ #
70
+ # We avoid this issue by not calling .respond_to? here, and instead using the less optimal `rescue nil` approach
58
71
  def raw_database_adapter
59
- adapter = if ActiveRecord::Base.respond_to?(:connection_config)
60
- ActiveRecord::Base.connection_config[:adapter].to_s
61
- else
62
- nil
63
- end
72
+ adapter = ActiveRecord::Base.connection_config[:adapter].to_s rescue nil
64
73
 
65
74
  if adapter.nil?
66
75
  adapter = ActiveRecord::Base.configurations[env]["adapter"]
@@ -1,4 +1,4 @@
1
1
  module ScoutApm
2
- VERSION = "2.4.13"
2
+ VERSION = "2.4.14"
3
3
  end
4
4
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scout_apm
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.13
4
+ version: 2.4.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - Derek Haynes
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2018-06-26 00:00:00.000000000 Z
12
+ date: 2018-07-02 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: minitest
@@ -390,7 +390,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
390
390
  version: '0'
391
391
  requirements: []
392
392
  rubyforge_project: scout_apm
393
- rubygems_version: 2.4.6
393
+ rubygems_version: 2.4.5.2
394
394
  signing_key:
395
395
  specification_version: 4
396
396
  summary: Ruby application performance monitoring
@@ -438,4 +438,3 @@ test_files:
438
438
  - test/unit/utils/backtrace_parser_test.rb
439
439
  - test/unit/utils/numbers_test.rb
440
440
  - test/unit/utils/scm.rb
441
- has_rdoc: