newrelic_rpm 3.6.8.168 → 3.6.9.171

Sign up to get free protection for your applications and to get access to all the features.
Files changed (137) hide show
  1. data.tar.gz.sig +0 -0
  2. data/.gitignore +1 -0
  3. data/.yardopts +17 -0
  4. data/CHANGELOG +48 -0
  5. data/README.md +8 -6
  6. data/lib/new_relic/agent.rb +65 -17
  7. data/lib/new_relic/agent/agent.rb +42 -113
  8. data/lib/new_relic/agent/browser_monitoring.rb +9 -1
  9. data/lib/new_relic/agent/configuration/default_source.rb +12 -0
  10. data/lib/new_relic/agent/error_collector.rb +13 -6
  11. data/lib/new_relic/agent/instrumentation/active_record_subscriber.rb +5 -5
  12. data/lib/new_relic/agent/instrumentation/controller_instrumentation.rb +15 -0
  13. data/lib/new_relic/agent/instrumentation/curb.rb +2 -2
  14. data/lib/new_relic/agent/instrumentation/metric_frame.rb +2 -2
  15. data/lib/new_relic/agent/instrumentation/rack.rb +2 -0
  16. data/lib/new_relic/agent/instrumentation/resque.rb +9 -3
  17. data/lib/new_relic/agent/instrumentation/sidekiq.rb +5 -0
  18. data/lib/new_relic/agent/method_tracer.rb +45 -27
  19. data/lib/new_relic/agent/new_relic_service.rb +14 -6
  20. data/lib/new_relic/agent/pipe_service.rb +1 -1
  21. data/lib/new_relic/agent/request_sampler.rb +10 -7
  22. data/lib/new_relic/agent/rules_engine.rb +5 -0
  23. data/lib/new_relic/agent/samplers/object_sampler.rb +1 -1
  24. data/lib/new_relic/agent/sql_sampler.rb +4 -2
  25. data/lib/new_relic/agent/stats_engine.rb +3 -0
  26. data/lib/new_relic/agent/stats_engine/gc_profiler.rb +17 -7
  27. data/lib/new_relic/agent/stats_engine/metric_stats.rb +5 -7
  28. data/lib/new_relic/agent/stats_engine/stats_hash.rb +2 -0
  29. data/lib/new_relic/agent/supported_versions.rb +247 -0
  30. data/lib/new_relic/agent/threading/backtrace_service.rb +1 -1
  31. data/lib/new_relic/agent/threading/thread_profile.rb +2 -1
  32. data/lib/new_relic/agent/transaction.rb +7 -6
  33. data/lib/new_relic/agent/transaction/developer_mode_sample_buffer.rb +11 -5
  34. data/lib/new_relic/agent/transaction/force_persist_sample_buffer.rb +3 -3
  35. data/lib/new_relic/agent/transaction/slowest_sample_buffer.rb +3 -3
  36. data/lib/new_relic/agent/transaction/transaction_sample_buffer.rb +23 -4
  37. data/lib/new_relic/agent/transaction/xray_sample_buffer.rb +4 -4
  38. data/lib/new_relic/agent/transaction_sampler.rb +14 -18
  39. data/lib/new_relic/agent/worker_loop.rb +1 -0
  40. data/lib/new_relic/control.rb +1 -0
  41. data/lib/new_relic/control/instance_methods.rb +0 -1
  42. data/lib/new_relic/helper.rb +1 -2
  43. data/lib/new_relic/language_support.rb +12 -2
  44. data/lib/new_relic/local_environment.rb +12 -11
  45. data/lib/new_relic/rack.rb +9 -0
  46. data/lib/new_relic/rack/agent_hooks.rb +6 -0
  47. data/lib/new_relic/rack/browser_monitoring.rb +9 -2
  48. data/lib/new_relic/rack/developer_mode.rb +15 -1
  49. data/lib/new_relic/rack/error_collector.rb +7 -0
  50. data/lib/new_relic/recipes.rb +2 -0
  51. data/lib/new_relic/transaction_sample.rb +39 -48
  52. data/lib/new_relic/version.rb +1 -1
  53. data/lib/tasks/install.rake +44 -2
  54. data/lib/tasks/versions.html.erb +31 -0
  55. data/lib/tasks/versions.rake +52 -0
  56. data/lib/tasks/versions.txt.erb +14 -0
  57. data/newrelic_rpm.gemspec +4 -2
  58. data/test/agent_helper.rb +21 -1
  59. data/test/environments/lib/environments/runner.rb +19 -5
  60. data/test/environments/norails/Gemfile +4 -1
  61. data/test/environments/rails21/Gemfile +4 -6
  62. data/test/environments/rails21/Rakefile +4 -0
  63. data/test/environments/rails21/config/database.yml +2 -7
  64. data/test/environments/rails22/Gemfile +6 -13
  65. data/test/environments/rails22/Rakefile +4 -0
  66. data/test/environments/rails22/config/database.yml +2 -7
  67. data/test/environments/rails22/config/environment.rb +1 -1
  68. data/test/environments/rails23/Gemfile +3 -4
  69. data/test/environments/rails23/Rakefile +4 -0
  70. data/test/environments/rails23/config/database.yml +2 -7
  71. data/test/environments/rails30/Gemfile +2 -4
  72. data/test/environments/rails30/Rakefile +2 -0
  73. data/test/environments/rails30/config/database.yml +2 -7
  74. data/test/environments/rails31/Gemfile +2 -4
  75. data/test/environments/rails31/Rakefile +2 -0
  76. data/test/environments/rails31/config/database.yml +2 -7
  77. data/test/environments/rails32/Gemfile +2 -5
  78. data/test/environments/rails32/Rakefile +2 -0
  79. data/test/environments/rails32/config/database.yml +1 -1
  80. data/test/environments/rails40/Gemfile +7 -4
  81. data/test/environments/rails40/Rakefile +2 -0
  82. data/test/environments/rails40/config/database.yml +2 -7
  83. data/test/helpers/runtime_detection.rb +17 -0
  84. data/test/multiverse/lib/multiverse/suite.rb +20 -4
  85. data/test/multiverse/suites/agent_only/key_transactions_test.rb +1 -1
  86. data/test/multiverse/suites/agent_only/marshaling_test.rb +1 -1
  87. data/test/multiverse/suites/agent_only/thread_profiling_test.rb +32 -7
  88. data/test/multiverse/suites/agent_only/xray_sessions_test.rb +1 -0
  89. data/test/multiverse/suites/config_file_loading/config_file_loading_test.rb +4 -3
  90. data/test/multiverse/suites/curb/curb_test.rb +8 -0
  91. data/test/multiverse/suites/excon/excon_test.rb +8 -0
  92. data/test/multiverse/suites/httpclient/httpclient_test.rb +8 -0
  93. data/test/multiverse/suites/net_http/net_http_test.rb +8 -0
  94. data/test/multiverse/suites/padrino/Envfile +3 -2
  95. data/test/multiverse/suites/rails/gc_instrumentation_test.rb +17 -8
  96. data/test/multiverse/suites/resque/Envfile +3 -3
  97. data/test/multiverse/suites/resque/instrumentation_test.rb +47 -5
  98. data/test/multiverse/suites/sequel/Envfile +0 -3
  99. data/test/multiverse/suites/sequel/database.rb +53 -0
  100. data/test/{new_relic/agent/instrumentation/sequel_test.rb → multiverse/suites/sequel/sequel_instrumentation_test.rb} +12 -53
  101. data/test/multiverse/suites/sequel/{sequel_test.rb → sequel_safety_test.rb} +2 -17
  102. data/test/multiverse/suites/sidekiq/sidekiq_instrumentation_test.rb +50 -5
  103. data/test/multiverse/suites/sinatra/sinatra_metric_explosion_test.rb +15 -2
  104. data/test/multiverse/suites/typhoeus/typhoeus_test.rb +8 -0
  105. data/test/new_relic/agent/agent/connect_test.rb +3 -2
  106. data/test/new_relic/agent/agent_test.rb +89 -82
  107. data/test/new_relic/agent/browser_monitoring_test.rb +44 -1
  108. data/test/new_relic/agent/error_collector_test.rb +17 -20
  109. data/test/new_relic/agent/instrumentation/active_record_instrumentation_test.rb +13 -10
  110. data/test/new_relic/agent/instrumentation/active_record_subscriber_test.rb +16 -1
  111. data/test/new_relic/agent/instrumentation/task_instrumentation_test.rb +2 -2
  112. data/test/new_relic/agent/method_tracer/instance_methods/trace_execution_scoped_test.rb +1 -1
  113. data/test/new_relic/agent/new_relic_service_test.rb +78 -9
  114. data/test/new_relic/agent/pipe_channel_manager_test.rb +7 -9
  115. data/test/new_relic/agent/pipe_service_test.rb +4 -4
  116. data/test/new_relic/agent/request_sampler_test.rb +2 -2
  117. data/test/new_relic/agent/stats_engine/gc_profiler_test.rb +15 -35
  118. data/test/new_relic/agent/stats_engine/metric_stats_test.rb +15 -7
  119. data/test/new_relic/agent/stats_engine_test.rb +4 -3
  120. data/test/new_relic/agent/threading/backtrace_service_test.rb +2 -0
  121. data/test/new_relic/agent/threading/thread_profile_test.rb +19 -0
  122. data/test/new_relic/agent/transaction/developer_mode_sample_buffer_test.rb +4 -4
  123. data/test/new_relic/agent/transaction/force_persist_sample_buffer_test.rb +1 -1
  124. data/test/new_relic/agent/transaction_sampler_test.rb +60 -45
  125. data/test/new_relic/fake_collector.rb +37 -2
  126. data/test/new_relic/http_client_test_cases.rb +26 -1
  127. data/test/new_relic/language_support_test.rb +12 -31
  128. data/test/new_relic/local_environment_test.rb +6 -2
  129. data/test/new_relic/multiverse_helpers.rb +2 -5
  130. data/test/new_relic/transaction_sample_test.rb +57 -36
  131. data/test/performance/suites/config.rb +76 -0
  132. data/test/rum/no_html_and_no_header.result.html +3 -0
  133. data/test/rum/no_html_and_no_header.source.html +3 -0
  134. data/test/script/ci.sh +0 -2
  135. data/test/test_helper.rb +5 -0
  136. metadata +43 -26
  137. metadata.gz.sig +0 -0
@@ -12,7 +12,7 @@ module NewRelic
12
12
 
13
13
  MAJOR = 3
14
14
  MINOR = 6
15
- TINY = 8
15
+ TINY = 9
16
16
 
17
17
  begin
18
18
  require File.join(File.dirname(__FILE__), 'build')
@@ -7,9 +7,8 @@ namespace :newrelic do
7
7
 
8
8
  namespace :config do
9
9
  desc "Describe available New Relic configuration settings."
10
- task :docs do
11
- require File.expand_path(File.join(File.dirname(__FILE__), "..", "new_relic", "agent", "configuration", "default_source.rb"))
12
10
 
11
+ def output_text
13
12
  NewRelic::Agent::Configuration::DEFAULTS.each do |key, value|
14
13
  if value[:public]
15
14
  puts "Setting: #{key}"
@@ -18,10 +17,53 @@ namespace :newrelic do
18
17
  else
19
18
  puts "Type: #{value[:type]}"
20
19
  end
20
+ puts "Default: #{format_default_value(value)}"
21
+
21
22
  puts 'Description: ' + value[:description]
22
23
  puts "-" * (value[:description].length + 14)
23
24
  end
24
25
  end
25
26
  end
27
+
28
+ def format_default_value(spec)
29
+ if spec[:default].is_a?(Proc)
30
+ '(Dynamic)'
31
+ else
32
+ spec[:default].inspect
33
+ end
34
+ end
35
+
36
+ def output_html
37
+ puts "<table>"
38
+ puts "<thead>"
39
+ puts " <th>Setting</th>"
40
+ puts " <th style='width: 15%'>Type</th>"
41
+ puts " <th>Description</th>"
42
+ puts "</thead>"
43
+
44
+ NewRelic::Agent::Configuration::DEFAULTS.each do |key, value|
45
+ if value[:public]
46
+ puts "<tr>"
47
+ puts " <td><a name='#{key}'></a>#{key}</td>"
48
+ puts " <td>#{value[:type].to_s.gsub("NewRelic::Agent::Configuration::", "")}</td>"
49
+ puts " <td>#{format_default_value(value)}</td>"
50
+ puts " <td>#{value[:description]}</td>"
51
+ puts "</tr>"
52
+ end
53
+ end
54
+
55
+ puts "</table>"
56
+ end
57
+
58
+ task :docs, [:format] => [] do |t, args|
59
+ require File.expand_path(File.join(File.dirname(__FILE__), "..", "new_relic", "agent", "configuration", "default_source.rb"))
60
+
61
+ format = args[:format]
62
+ if format.nil? || format == "text"
63
+ output_text
64
+ else
65
+ output_html
66
+ end
67
+ end
26
68
  end
27
69
  end
@@ -0,0 +1,31 @@
1
+ <h2 id="<%= anchor %>"><%= title %></h2>
2
+ <table>
3
+ <thead>
4
+ <th>Name</th>
5
+ <% unless suppress_versions %>
6
+ <th>Supported</th>
7
+ <th>Deprecated</th>
8
+ <th>Experimental</th>
9
+ <% end %>
10
+ </thead>
11
+ <% for version in versions %>
12
+ <tr>
13
+ <td><b><%= version.name %></b></td>
14
+ <% unless suppress_versions %>
15
+ <td><%= version_list(version.supported) %></td>
16
+ <td><%= version_list(version.deprecated) %></td>
17
+ <td><%= version_list(version.experimental) %></td>
18
+ <% end %>
19
+ </tr>
20
+ <% if version.notes %>
21
+ <tr>
22
+ <td></td>
23
+ <td colspan=3>
24
+ <% for note in version.notes %>
25
+ <%= note %><br/>
26
+ <% end %>
27
+ </td>
28
+ </tr>
29
+ <% end %>
30
+ <% end %>
31
+ </table>
@@ -0,0 +1,52 @@
1
+ namespace :newrelic do
2
+ desc "Lists information on supported versions of frameworks for this agent"
3
+
4
+ require File.join(File.dirname(__FILE__), '..', 'new_relic', 'agent', 'supported_versions')
5
+
6
+ task :supported_versions, [:format] => [] do |t, args|
7
+
8
+ def version_list(list)
9
+ return "-" if list.nil? || list.empty?
10
+ list.join(", ")
11
+ end
12
+
13
+ def versions_for_type(type)
14
+ NewRelic::Agent::SUPPORTED_VERSIONS.
15
+ select {|_,v| v[:type] == type}.
16
+ map do |key,values|
17
+ VersionStruct.new(
18
+ values[:name] || key,
19
+ values[:supported],
20
+ values[:deprecated],
21
+ values[:experimental],
22
+ values[:notes])
23
+ end
24
+ end
25
+
26
+ def build_erb(format)
27
+ require 'erb'
28
+ path = File.join(File.dirname(__FILE__), "versions.#{format}.erb")
29
+ template = File.read(File.expand_path(path))
30
+ ERB.new(template)
31
+ end
32
+
33
+ def write_versions(title, type, erb, suppress_versions = false)
34
+ anchor = title.downcase.gsub(" ", "_")
35
+ versions = versions_for_type(type)
36
+ puts erb.result(binding)
37
+ end
38
+
39
+ VersionStruct = Struct.new(:name, :supported, :deprecated, :experimental, :notes)
40
+
41
+ format = args[:format] || "txt"
42
+ erb = build_erb(format)
43
+
44
+ write_versions("Ruby Versions", :ruby, erb)
45
+ write_versions("Web Servers", :app_server, erb)
46
+ write_versions("Web Frameworks", :web, erb)
47
+ write_versions("Database", :database, erb)
48
+ write_versions("Background Jobs", :background, erb)
49
+ write_versions("HTTP Clients", :http, erb)
50
+ write_versions("Other", :other, erb, true)
51
+ end
52
+ end
@@ -0,0 +1,14 @@
1
+ =========================================
2
+ <%= title %>
3
+ =========================================
4
+ <% for version in versions %>
5
+ <%= version.name %>
6
+
7
+ Supported: <%= version_list(version.supported) %>
8
+ Deprecated: <%= version_list(version.deprecated) %>
9
+ Experimental: <%= version_list(version.experimental) %>
10
+ <% if version.notes %>Notes:<% for note in version.notes %>
11
+ <%= note %><% end %>
12
+ <% end %>
13
+ ------------------------------------
14
+ <% end %>
@@ -40,6 +40,8 @@ EOS
40
40
  s.rubygems_version = Gem::VERSION
41
41
  s.summary = "New Relic Ruby Agent"
42
42
  s.post_install_message = NewRelic::LatestChanges.read
43
+ s.add_development_dependency 'rubysl' if defined?(RUBY_ENGINE) && RUBY_ENGINE == 'rbx'
44
+ s.add_development_dependency 'racc' if defined?(RUBY_ENGINE) && RUBY_ENGINE == 'rbx'
43
45
  s.add_development_dependency 'rake', '10.1.0'
44
46
  s.add_development_dependency 'minitest', '~> 4.7.5'
45
47
  s.add_development_dependency 'mocha', '~> 0.13.0'
@@ -51,8 +53,8 @@ EOS
51
53
  s.add_development_dependency 'jruby-openssl' if RUBY_PLATFORM == 'java'
52
54
  s.add_development_dependency 'sequel', '~> 3.46.0'
53
55
  s.add_development_dependency 'pry'
54
- s.add_development_dependency 'guard'
55
- s.add_development_dependency 'guard-test'
56
+ s.add_development_dependency 'guard', '~> 1.8.3' # Guard 2.0 is Ruby 1.9 only
57
+ s.add_development_dependency 'guard-test', '~> 1.0.0'
56
58
  s.add_development_dependency 'rb-fsevent', '~> 0.9.1'
57
59
 
58
60
  # Only sign with our private key if you can find it
@@ -138,7 +138,11 @@ def assert_metrics_recorded(expected)
138
138
  matches.map! { |m| " #{m.inspect}" }
139
139
  msg = "Did not find stats for spec #{expected_spec.inspect}."
140
140
  msg += "\nDid find specs: [\n#{matches.join(",\n")}\n]" unless matches.empty?
141
- msg += "\nAll specs in there were: [\n#{all_specs.map {|s| s.name}.join(",\n")}\n]"
141
+
142
+ msg += "\nAll specs in there were: [\n#{all_specs.map do |s|
143
+ "#{s.name} (#{s.scope.empty? ? '<unscoped>' : s.scope})"
144
+ end.join(",\n")}\n]"
145
+
142
146
  assert(actual_stats, msg)
143
147
  end
144
148
  expected_attrs.each do |attr, expected_value|
@@ -319,3 +323,19 @@ end
319
323
  def create_agent_command(args = {})
320
324
  NewRelic::Agent::Commands::AgentCommand.new([-1, { "name" => "command_name", "arguments" => args}])
321
325
  end
326
+
327
+ def wait_for_backtrace_service_poll(opts={})
328
+ defaults = {
329
+ :timeout => 5.0,
330
+ :service => NewRelic::Agent.agent.agent_command_router.backtrace_service,
331
+ :iterations => 1
332
+ }
333
+ opts = defaults.merge(opts)
334
+ deadline = Time.now + opts[:timeout]
335
+ until opts[:service].worker_loop.iterations > opts[:iterations]
336
+ sleep(0.01)
337
+ if Time.now > deadline
338
+ raise "Timed out waiting #{timeout} s for backtrace service poll"
339
+ end
340
+ end
341
+ end
@@ -18,8 +18,9 @@ module Environments
18
18
  "1.9.2" => ["rails21", "rails22", "rails40"],
19
19
  "1.9.3" => ["rails21", "rails22"],
20
20
  "2.0.0" => ["rails21", "rails22", "rails23"],
21
- "jruby-1.6.8" => ["rails40"],
22
- "jruby-1.7.3" => ["rails21", "rails22", "rails23", "rails40"],
21
+ "jruby-1.6" => ["rails40"],
22
+ "jruby-1.7" => ["rails21", "rails22", "rails23"],
23
+ "rbx-2.0" => ["rails21", "rails22", "rails23", "rails30", "rails31", "rails32"],
23
24
  }
24
25
 
25
26
  attr_reader :envs
@@ -42,6 +43,7 @@ module Environments
42
43
  dir = File.expand_path(dir)
43
44
  puts "", yellow("Running tests for #{dir}")
44
45
  bundle(dir)
46
+ create_database(dir)
45
47
  status = run(dir)
46
48
  if !status.success?
47
49
  overall_status += 1
@@ -64,7 +66,8 @@ module Environments
64
66
 
65
67
  version = RUBY_VERSION
66
68
  version = "ree" if defined?(RUBY_DESCRIPTION) && RUBY_DESCRIPTION =~ /Ruby Enterprise Edition/
67
- version = "jruby-#{JRUBY_VERSION}" if defined?(JRUBY_VERSION)
69
+ version = "jruby-#{JRUBY_VERSION[0..2]}" if defined?(JRUBY_VERSION)
70
+ version = "rbx-2.0" if defined?(RUBY_ENGINE) && RUBY_ENGINE == "rbx"
68
71
 
69
72
  blacklist = BLACKLIST[version] || []
70
73
  blacklist.each do |blacklisted|
@@ -86,13 +89,24 @@ module Environments
86
89
  end
87
90
 
88
91
  def bundle(dir)
89
- puts "Bundling..."
92
+ puts "Bundling in #{dir}..."
90
93
  bundling = `cd #{dir} && bundle install --local`
91
94
  unless $?.success?
92
95
  puts "Failed local bundle, trying again with full bundle..."
93
96
  bundling = `cd #{dir} && bundle install`
94
97
  end
95
- puts red(bundling) unless $?.success?
98
+
99
+ bundling = red(bundling) unless $?.success?
100
+ puts bundling
101
+ end
102
+
103
+ # Would be nice to get our unit tests decoupled from the actual DB, but
104
+ # until then this is necessary
105
+ def create_database(dir)
106
+ return if File.basename(dir) == "norails"
107
+
108
+ puts "Making sure the database is there for '#{File.basename(dir)}'..."
109
+ result = `cd #{dir} && RAILS_ENV=test bundle exec rake --trace db:create`
96
110
  end
97
111
 
98
112
  def run(dir)
@@ -6,6 +6,9 @@ gem "mocha", '~>0.13.0', :require => false
6
6
  gem 'rack'
7
7
  gem 'rack-test'
8
8
 
9
- gem 'sequel', '~> 3.46.0'
9
+ platforms :rbx do
10
+ gem "rubysl"
11
+ gem "racc" # https://github.com/rubinius/rubinius/issues/2632
12
+ end
10
13
 
11
14
  gem "newrelic_rpm", :path => "../../.."
@@ -1,12 +1,12 @@
1
- # A sample Gemfile
2
- source :gemcutter
1
+ source 'http://rubygems.org'
3
2
 
4
- gem "rails", "2.1.2"
3
+ gem "rails", "~>2.1.2"
5
4
 
6
5
  gem "ci_reporter", "1.6.0"
7
6
  gem "mocha", "0.9.8"
8
7
  gem "jeweler", "1.4.0"
9
8
  gem "gemcutter", "0.5.0"
9
+ gem "rdoc"
10
10
 
11
11
  gem 'rack'
12
12
  gem 'rack-test'
@@ -17,8 +17,6 @@ if (RUBY_PLATFORM == 'java')
17
17
  gem "activerecord-jdbcsqlite3-adapter", "~>1.2.9"
18
18
  gem "jruby-openssl"
19
19
  else
20
- gem "mysql", RUBY_VERSION == '1.8.6' ? '2.7' : '2.8.1'
20
+ gem "mysql", "~>2.9.1"
21
21
  gem "sqlite3-ruby", "1.2.5"
22
22
  end
23
-
24
- gem 'sequel', '~> 3.46.0' unless RUBY_VERSION == '1.8.6'
@@ -5,8 +5,12 @@ require(File.join(File.dirname(__FILE__), 'config', 'boot'))
5
5
 
6
6
  require 'rake'
7
7
  require 'rake/testtask'
8
+ require 'rdoc/task'
8
9
 
9
10
  gem 'newrelic_rpm'
11
+
12
+ require 'tasks/rails'
10
13
  require 'tasks/all'
11
14
 
15
+ Rake::Task["default"].clear
12
16
  task :default => [:'test:newrelic']
@@ -1,13 +1,10 @@
1
- # Shared properties for mysql db
2
1
  mysql: &mysql
3
2
  adapter: mysql
4
3
  socket: <%= (`uname -s` =~ /Linux/ ) ? "" :"/tmp/mysql.sock" %>
5
4
  username: root
6
5
  host: localhost
7
- database: rails_blog
6
+ database: <%= db = "#{ENV['RUBY_VERSION']}#{ENV['BRANCH']}"; db.empty? ? "rails_blog" : db %>
8
7
 
9
- # Shared properties for postgres. This won't work with our schema but
10
- # Does work with agent tests
11
8
  sqlite3: &sqlite3
12
9
  <% if defined?(JRuby) %>
13
10
  adapter: jdbcsqlite3
@@ -18,9 +15,7 @@ sqlite3: &sqlite3
18
15
  pool: 5
19
16
  timeout: 5000
20
17
  host: localhost
21
-
22
- # SQLite version 3.x
23
- # gem install sqlite3-ruby (not necessary on OS X Leopard)
18
+
24
19
  development:
25
20
  <<: *mysql
26
21
 
@@ -1,12 +1,13 @@
1
- # A sample Gemfile
2
- source :gemcutter
1
+ source 'http://rubygems.org'
3
2
 
4
- gem "rails", "2.2.2"
3
+ gem "rails", "~>2.2.3"
5
4
 
6
5
  gem "ci_reporter", "1.6.0"
7
6
  gem "mocha", "0.9.8"
8
7
  gem "jeweler", "1.4.0"
9
8
  gem "gemcutter", "0.5.0"
9
+ gem "rdoc"
10
+
10
11
  gem 'rack'
11
12
  gem 'rack-test'
12
13
  gem 'newrelic_rpm', :path => '../../..'
@@ -16,14 +17,6 @@ if (RUBY_PLATFORM == 'java')
16
17
  gem "activerecord-jdbcsqlite3-adapter", "~>1.2.9"
17
18
  gem "jruby-openssl"
18
19
  else
19
- gem "sqlite3-ruby", "1.2.5"
20
- end
21
-
22
- if RUBY_VERSION == '1.8.6'
23
- gem "mysql", '2.7' unless RUBY_PLATFORM == 'java'
24
- gem 'shoulda', '~> 2.11.3'
25
- else
26
- gem "mysql", '2.8.1' unless RUBY_PLATFORM == 'java'
27
- gem 'shoulda', '~> 3.0.0'
28
- gem 'sequel', '~> 3.46.0'
20
+ gem "mysql", "~>2.9.1"
21
+ gem "sqlite3"
29
22
  end
@@ -5,8 +5,12 @@ require(File.join(File.dirname(__FILE__), 'config', 'boot'))
5
5
 
6
6
  require 'rake'
7
7
  require 'rake/testtask'
8
+ require 'rdoc/task'
8
9
 
9
10
  gem 'newrelic_rpm'
11
+
12
+ require 'tasks/rails'
10
13
  require 'tasks/all'
11
14
 
15
+ Rake::Task["default"].clear
12
16
  task :default => [:'test:newrelic']
@@ -1,13 +1,10 @@
1
- # Shared properties for mysql db
2
1
  mysql: &mysql
3
2
  adapter: mysql
4
3
  socket: <%= (`uname -s` =~ /Linux/ ) ? "" :"/tmp/mysql.sock" %>
5
4
  username: root
6
5
  host: localhost
7
- database: rails_blog
6
+ database: <%= db = "#{ENV['RUBY_VERSION']}#{ENV['BRANCH']}"; db.empty? ? "rails_blog" : db %>
8
7
 
9
- # Shared properties for postgres. This won't work with our schema but
10
- # Does work with agent tests
11
8
  sqlite3: &sqlite3
12
9
  <% if defined?(JRuby) %>
13
10
  adapter: jdbcsqlite3
@@ -18,9 +15,7 @@ sqlite3: &sqlite3
18
15
  pool: 5
19
16
  timeout: 5000
20
17
  host: localhost
21
-
22
- # SQLite version 3.x
23
- # gem install sqlite3-ruby (not necessary on OS X Leopard)
18
+
24
19
  development:
25
20
  <<: *mysql
26
21
 
@@ -3,7 +3,7 @@
3
3
  # See https://github.com/newrelic/rpm/blob/master/LICENSE for complete details.
4
4
 
5
5
  # Specifies gem version of Rails to use when vendor/rails is not present
6
- RAILS_GEM_VERSION = '2.2.2' #unless defined? RAILS_GEM_VERSION
6
+ RAILS_GEM_VERSION = '2.2.3'
7
7
 
8
8
  # Bootstrap the Rails environment, frameworks, and default configuration
9
9
  require File.join(File.dirname(__FILE__), 'boot')