newrelic_rpm 3.6.3.106 → 3.6.3.111

Sign up to get free protection for your applications and to get access to all the features.
data.tar.gz.sig CHANGED
Binary file
@@ -13,26 +13,40 @@ DependencyDetection.defer do
13
13
  end
14
14
 
15
15
  depends_on do
16
- !NewRelic::Agent.config[:disable_activerecord_instrumentation] &&
16
+ !NewRelic::Agent.config[:disable_sequel_instrumentation] &&
17
17
  !NewRelic::Agent.config[:disable_database_instrumentation]
18
18
  end
19
19
 
20
+ def supported_sequel_version?
21
+ Sequel.const_defined?( :MAJOR ) &&
22
+ ( Sequel::MAJOR > 3 ||
23
+ Sequel::MAJOR == 3 && Sequel::MINOR >= 37 )
24
+ end
25
+
20
26
  executes do
21
- ::NewRelic::Agent.logger.info 'Installing Sequel instrumentation'
27
+ if supported_sequel_version?
28
+
29
+ ::NewRelic::Agent.logger.info 'Installing Sequel instrumentation'
30
+
31
+ if Sequel::Database.respond_to?( :extension )
32
+ Sequel::Database.extension :newrelic_instrumentation
33
+ else
34
+ NewRelic::Agent.logger.info "Detected Sequel version %s." % [ Sequel::VERSION ]
35
+ NewRelic::Agent.logger.info "Please see additional documentation: " +
36
+ "https://newrelic.com/docs/ruby/sequel-instrumentation"
37
+ end
38
+
39
+ Sequel.synchronize{Sequel::DATABASES.dup}.each do |db|
40
+ db.extension :newrelic_instrumentation
41
+ end
42
+
43
+ Sequel::Model.plugin :newrelic_instrumentation
22
44
 
23
- if Sequel::Database.respond_to?( :extension )
24
- Sequel::Database.extension :newrelic_instrumentation
25
45
  else
26
- NewRelic::Agent.logger.info "Detected Sequel version %s." % [ Sequel::VERSION ]
27
- NewRelic::Agent.logger.info "Please see additional documentation: " +
28
- "https://newrelic.com/docs/ruby/sequel-instrumentation"
29
- end
30
46
 
31
- Sequel.synchronize{Sequel::DATABASES.dup}.each do |db|
32
- db.extension :newrelic_instrumentation
33
- end
47
+ NewRelic::Agent.logger.info "Sequel instrumentation requires at least version 3.37.0."
34
48
 
35
- Sequel::Model.plugin :newrelic_instrumentation
49
+ end
36
50
 
37
51
  end
38
52
 
@@ -0,0 +1,34 @@
1
+ suite_condition("Sequel not supported in 1.8.6") do
2
+ RUBY_VERSION != '1.8.6'
3
+ end
4
+
5
+
6
+ gemfile <<-RB
7
+ gem 'newrelic_rpm', :require => false, :path => File.expand_path('../../../../')
8
+ gem 'jdbc-sqlite3', '3.7.2', :platform => :jruby
9
+ gem 'sqlite3', '1.3.7', :platform => :ruby
10
+ gem 'sequel', '2.9.0'
11
+ RB
12
+
13
+ gemfile <<-RB
14
+ gem 'newrelic_rpm', :require => false, :path => File.expand_path('../../../../')
15
+ gem 'jdbc-sqlite3', '3.7.2', :platform => :jruby
16
+ gem 'sqlite3', '1.3.7', :platform => :ruby
17
+ gem 'sequel', '3.34.0'
18
+ RB
19
+
20
+ gemfile <<-RB
21
+ gem 'newrelic_rpm', :require => false, :path => File.expand_path('../../../../')
22
+ gem 'jdbc-sqlite3', '3.7.2', :platform => :jruby
23
+ gem 'sqlite3', '1.3.7', :platform => :ruby
24
+ gem 'sequel', '3.36.1'
25
+ RB
26
+
27
+ gemfile <<-RB
28
+ gem 'newrelic_rpm', :require => false, :path => File.expand_path('../../../../')
29
+ gem 'jdbc-sqlite3', '3.7.2', :platform => :jruby
30
+ gem 'sqlite3', '1.3.7', :platform => :ruby
31
+ gem 'sequel', '3.47.0'
32
+ RB
33
+
34
+
@@ -0,0 +1,22 @@
1
+ ---
2
+ development:
3
+ error_collector:
4
+ capture_source: true
5
+ enabled: true
6
+ apdex_t: 0.5
7
+ ssl: false
8
+ monitor_mode: true
9
+ license_key: bootstrap_newrelic_admin_license_key_000
10
+ developer_mode: false
11
+ app_name: test
12
+ host: 127.0.0.1
13
+ api_host: 127.0.0.1
14
+ port: <%= 30_000 + ($$ % 10_000) %>
15
+ transaction_tracer:
16
+ record_sql: obfuscated
17
+ enabled: true
18
+ stack_trace_threshold: 0.5
19
+ transaction_threshold: 1.0
20
+ capture_params: false
21
+ log_level: debug
22
+ log_file_path: agent.log
@@ -0,0 +1,35 @@
1
+ # encoding: utf-8
2
+ # This file is distributed under New Relic's license terms.
3
+ # See https://github.com/newrelic/rpm/blob/master/LICENSE for complete details.
4
+
5
+ # https://newrelic.atlassian.net/browse/RUBY-1123
6
+ # https://support.newrelic.com/tickets/42515
7
+
8
+ require 'sequel'
9
+ require 'test/unit'
10
+
11
+ if defined?(JRuby)
12
+ DB = Sequel.connect('jdbc:sqlite::memory:')
13
+ else
14
+ DB = Sequel.sqlite
15
+ end
16
+
17
+ DB.create_table( :users ) do
18
+ primary_key :uid
19
+ string :login
20
+ string :firstname
21
+ string :lastname
22
+ end
23
+ class User < Sequel::Model; end
24
+
25
+ class SequelTest < Test::Unit::TestCase
26
+
27
+ def test_it_doesnt_blow_up
28
+ require 'newrelic_rpm'
29
+
30
+ u = User.create( :login => 'jrandom', :firstname => 'J. Random', :lastname => 'Hacquer' )
31
+ assert u.is_a?( User ), "#{u} isn't a User"
32
+ end
33
+
34
+ end
35
+
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: newrelic_rpm
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.6.3.106
4
+ version: 3.6.3.111
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -41,7 +41,7 @@ cert_chain:
41
41
  cHUySWFQWE92bTNUOEc0TzZxWnZobkxoL1VpZW4rK0RqOGVGQmVjVFBvTThw
42
42
  VmpLM3BoNQpuL0V3dVpDY0U2Z2h0Q0NNCi0tLS0tRU5EIENFUlRJRklDQVRF
43
43
  LS0tLS0K
44
- date: 2013-06-04 00:00:00.000000000 Z
44
+ date: 2013-06-06 00:00:00.000000000 Z
45
45
  dependencies: []
46
46
  description: ! 'New Relic is a performance management system, developed by New Relic,
47
47
 
@@ -310,6 +310,9 @@ files:
310
310
  - test/multiverse/suites/resque/config/newrelic.yml
311
311
  - test/multiverse/suites/resque/instrumentation_test.rb
312
312
  - test/multiverse/suites/resque/resque_setup.rb
313
+ - test/multiverse/suites/sequel/Envfile
314
+ - test/multiverse/suites/sequel/config/newrelic.yml
315
+ - test/multiverse/suites/sequel/sequel_test.rb
313
316
  - test/multiverse/suites/sidekiq/Envfile
314
317
  - test/multiverse/suites/sidekiq/app.rb
315
318
  - test/multiverse/suites/sidekiq/config/newrelic.yml
metadata.gz.sig CHANGED
Binary file