appsignal 2.11.0.beta.4-java → 2.11.2-java

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.
Files changed (61) hide show
  1. checksums.yaml +4 -4
  2. data/.semaphore/semaphore.yml +254 -1
  3. data/CHANGELOG.md +27 -0
  4. data/README.md +20 -5
  5. data/Rakefile +27 -9
  6. data/appsignal.gemspec +1 -1
  7. data/build_matrix.yml +15 -2
  8. data/ext/Rakefile +2 -0
  9. data/ext/agent.yml +17 -25
  10. data/ext/appsignal_extension.c +1 -1
  11. data/ext/base.rb +19 -9
  12. data/ext/extconf.rb +2 -0
  13. data/gemfiles/no_dependencies.gemfile +7 -0
  14. data/gemfiles/resque-2.gemfile +0 -1
  15. data/gemfiles/webmachine.gemfile +1 -0
  16. data/lib/appsignal.rb +1 -0
  17. data/lib/appsignal/auth_check.rb +4 -2
  18. data/lib/appsignal/cli/diagnose.rb +1 -1
  19. data/lib/appsignal/cli/diagnose/utils.rb +8 -11
  20. data/lib/appsignal/cli/install.rb +5 -8
  21. data/lib/appsignal/config.rb +82 -17
  22. data/lib/appsignal/extension.rb +6 -5
  23. data/lib/appsignal/extension/jruby.rb +6 -5
  24. data/lib/appsignal/helpers/instrumentation.rb +32 -0
  25. data/lib/appsignal/hooks.rb +24 -0
  26. data/lib/appsignal/hooks/action_mailer.rb +22 -0
  27. data/lib/appsignal/hooks/active_job.rb +32 -9
  28. data/lib/appsignal/hooks/active_support_notifications.rb +72 -0
  29. data/lib/appsignal/hooks/puma.rb +0 -1
  30. data/lib/appsignal/hooks/sidekiq.rb +0 -1
  31. data/lib/appsignal/probes.rb +7 -0
  32. data/lib/appsignal/probes/puma.rb +1 -1
  33. data/lib/appsignal/probes/sidekiq.rb +3 -1
  34. data/lib/appsignal/transaction.rb +30 -2
  35. data/lib/appsignal/utils/deprecation_message.rb +1 -1
  36. data/lib/appsignal/version.rb +1 -1
  37. data/spec/lib/appsignal/auth_check_spec.rb +23 -0
  38. data/spec/lib/appsignal/capistrano2_spec.rb +1 -1
  39. data/spec/lib/appsignal/capistrano3_spec.rb +1 -1
  40. data/spec/lib/appsignal/cli/diagnose_spec.rb +42 -0
  41. data/spec/lib/appsignal/config_spec.rb +39 -1
  42. data/spec/lib/appsignal/extension/jruby_spec.rb +31 -28
  43. data/spec/lib/appsignal/extension_install_failure_spec.rb +23 -0
  44. data/spec/lib/appsignal/hooks/action_mailer_spec.rb +54 -0
  45. data/spec/lib/appsignal/hooks/active_support_notifications/finish_with_state_shared_examples.rb +35 -0
  46. data/spec/lib/appsignal/hooks/active_support_notifications/instrument_shared_examples.rb +145 -0
  47. data/spec/lib/appsignal/hooks/active_support_notifications/start_finish_shared_examples.rb +69 -0
  48. data/spec/lib/appsignal/hooks/active_support_notifications_spec.rb +9 -137
  49. data/spec/lib/appsignal/hooks/activejob_spec.rb +44 -1
  50. data/spec/lib/appsignal/hooks/resque_spec.rb +10 -2
  51. data/spec/lib/appsignal/hooks/sidekiq_spec.rb +4 -2
  52. data/spec/lib/appsignal/hooks_spec.rb +57 -0
  53. data/spec/lib/appsignal/marker_spec.rb +1 -1
  54. data/spec/lib/appsignal/transaction_spec.rb +55 -0
  55. data/spec/lib/appsignal_spec.rb +30 -0
  56. data/spec/spec_helper.rb +5 -0
  57. data/spec/support/helpers/config_helpers.rb +3 -2
  58. data/spec/support/helpers/dependency_helper.rb +4 -0
  59. data/spec/support/helpers/transaction_helpers.rb +1 -1
  60. data/spec/support/testing.rb +19 -19
  61. metadata +17 -5
@@ -1,5 +1,16 @@
1
1
  # Changelog
2
2
 
3
+ # 2.11.2
4
+ - Support Ruby 3.0. PR #681
5
+ - Support breadcrumbs. PR #666
6
+ - Log Ruby errors on extension download. PR #679
7
+ - Fix Ruby 1.9 build. PR #680
8
+
9
+ # 2.11.1
10
+ - Support AS notifications instrumenters that use `start` and `finish`.
11
+ - Updated agent with better logging and an IO stats fix.
12
+ - ActionMailer magic dashboard
13
+
3
14
  # 2.11.0
4
15
  - Track queue time regardless of namespace. Support custom namespaces. PR #602
5
16
  - Improve deprecation message from frontend error middleware. PR #620
@@ -23,6 +34,22 @@
23
34
  - Always report Active Job ID, an internal ID used by Active Job. PR #639
24
35
  - Support Delayed::Job jobs without specific method name, using
25
36
  `Delayed::Job.enqueue`. PR #642
37
+ - Print warnings using Kernel.warn. PR #648
38
+ - Update AuthCheck class to use DeprecationMessage helper. PR #649
39
+ - Print extension load error when AppSignal is loaded. PR #651
40
+
41
+ # 2.10.12
42
+ - Fix `working_directory_path` config option loaded from environment variables.
43
+ PR #653
44
+
45
+ # 2.10.11
46
+ - Fix extension install report status output in `appsignal diagnose`. PR #636
47
+ - Support setting a specific configuration file to load with the
48
+ `Appsignal::Config` initializer. PR #638
49
+
50
+ # 2.10.10
51
+ - Bump agent to v-4548c88. PR #634
52
+ - Fix issue with host metrics values being reported as "Infinity".
26
53
 
27
54
  # 2.10.9
28
55
  - Use http proxy if configured when downloading agent. PR #606
data/README.md CHANGED
@@ -9,7 +9,7 @@ issues.
9
9
  - [Ruby code documentation][ruby-doc]
10
10
  - [Support][contact]
11
11
 
12
- [![Build status](https://appsignal.semaphoreci.com/badges/appsignal-ruby/branches/master.svg)](https://appsignal.semaphoreci.com/projects/appsignal-ruby)
12
+ [![Build status](https://appsignal.semaphoreci.com/badges/appsignal-ruby/branches/main.svg)](https://appsignal.semaphoreci.com/projects/appsignal-ruby)
13
13
  [![Gem Version](https://badge.fury.io/rb/appsignal.svg)](http://badge.fury.io/rb/appsignal)
14
14
  [![Code Climate](https://codeclimate.com/github/appsignal/appsignal.png)](https://codeclimate.com/github/appsignal/appsignal)
15
15
 
@@ -157,6 +157,15 @@ as most Linux distributions, FreeBSD, macOS, excluding Microsoft Windows.
157
157
  For more detailed information please visit our [Supported
158
158
  systems][supported-systems] page.
159
159
 
160
+ ## Releases
161
+
162
+ Following the process below to release a new version of the Ruby gem.
163
+
164
+ 1. Run: `rake publish`
165
+ 1. Update the Ruby gem version number when prompted.
166
+ 1. Update the `CHANGELOG` file with the changes since the last release.
167
+ 1. Confirm with your two-factor authentication token for Rubygems.org, _twice_.
168
+
160
169
  ## Development
161
170
 
162
171
  ### Installation
@@ -183,7 +192,7 @@ installing the AppSignal C-extension.
183
192
  # Gemfile
184
193
  gem "appsignal",
185
194
  :git => "https://github.com/appsignal/appsignal-ruby.git",
186
- :branch => "master"
195
+ :branch => "main"
187
196
  ```
188
197
 
189
198
  When you need to use a git source of the gem in your JRuby install, you'll need
@@ -219,12 +228,18 @@ BUNDLE_GEMFILE=gemfiles/capistrano3.gemfile bundle exec rspec
219
228
  BUNDLE_GEMFILE=gemfiles/grape.gemfile bundle exec rspec
220
229
  BUNDLE_GEMFILE=gemfiles/no_dependencies.gemfile bundle exec rspec
221
230
  BUNDLE_GEMFILE=gemfiles/padrino.gemfile bundle exec rspec
231
+ BUNDLE_GEMFILE=gemfiles/que.gemfile bundle exec rspec
232
+ BUNDLE_GEMFILE=gemfiles/que_beta.gemfile bundle exec rspec
222
233
  BUNDLE_GEMFILE=gemfiles/rails-3.2.gemfile bundle exec rspec
223
234
  BUNDLE_GEMFILE=gemfiles/rails-4.0.gemfile bundle exec rspec
224
235
  BUNDLE_GEMFILE=gemfiles/rails-4.1.gemfile bundle exec rspec
225
236
  BUNDLE_GEMFILE=gemfiles/rails-4.2.gemfile bundle exec rspec
226
237
  BUNDLE_GEMFILE=gemfiles/rails-5.0.gemfile bundle exec rspec
227
- BUNDLE_GEMFILE=gemfiles/resque.gemfile bundle exec rspec
238
+ BUNDLE_GEMFILE=gemfiles/rails-5.1.gemfile bundle exec rspec
239
+ BUNDLE_GEMFILE=gemfiles/rails-5.2.gemfile bundle exec rspec
240
+ BUNDLE_GEMFILE=gemfiles/rails-6.0.gemfile bundle exec rspec
241
+ BUNDLE_GEMFILE=gemfiles/resque-1.gemfile bundle exec rspec
242
+ BUNDLE_GEMFILE=gemfiles/resque-2.gemfile bundle exec rspec
228
243
  BUNDLE_GEMFILE=gemfiles/sequel-435.gemfile bundle exec rspec
229
244
  BUNDLE_GEMFILE=gemfiles/sequel.gemfile bundle exec rspec
230
245
  BUNDLE_GEMFILE=gemfiles/sinatra.gemfile bundle exec rspec
@@ -242,12 +257,12 @@ a number of different Ruby versions.
242
257
 
243
258
  This gem uses [Semantic Versioning][semver].
244
259
 
245
- The `master` branch corresponds to the current stable release of the gem.
260
+ The `main` branch corresponds to the current stable release of the gem.
246
261
 
247
262
  The `develop` branch is used for development of features that will end up in
248
263
  the next minor release.
249
264
 
250
- Open a Pull Request on the `master` branch if you're fixing a bug. For new new
265
+ Open a Pull Request on the `main` branch if you're fixing a bug. For new new
251
266
  features, open a Pull Request on the `develop` branch.
252
267
 
253
268
  Every stable and unstable release is tagged in git with a version tag.
data/Rakefile CHANGED
@@ -39,6 +39,10 @@ def build_task(ruby_version, type = nil)
39
39
  }
40
40
  end
41
41
 
42
+ def gems_with_gemfiles
43
+ YAML.load_file("build_matrix.yml")["matrix"]["gems"].map { |g| g["gem"] }.freeze
44
+ end
45
+
42
46
  namespace :build_matrix do
43
47
  namespace :semaphore do
44
48
  task :generate do
@@ -70,7 +74,10 @@ namespace :build_matrix do
70
74
  job = {
71
75
  "name" => "Ruby #{ruby_version} for #{gem["gem"]}",
72
76
  "env_vars" => env,
73
- "commands" => ["./support/bundler_wrapper exec rake test"]
77
+ "commands" => [
78
+ "./support/bundler_wrapper exec rake test",
79
+ "./support/bundler_wrapper exec rake test:failure"
80
+ ]
74
81
  }
75
82
  if gem["gem"] == "no_dependencies"
76
83
  ruby_primary_block["task"]["jobs"] << job
@@ -307,17 +314,19 @@ task :publish => [
307
314
  desc "Install the AppSignal gem, extension and all possible dependencies."
308
315
  task :install => "extension:install" do
309
316
  Bundler.with_clean_env do
310
- GEMFILES.each do |gemfile|
317
+ gems_with_gemfiles.each do |gemfile|
311
318
  system "bundle --gemfile gemfiles/#{gemfile}.gemfile"
312
319
  end
313
320
  end
314
321
  end
315
322
 
316
323
  task :spec_all_gemfiles do
317
- GEMFILES.each do |gemfile|
318
- puts "Running tests for #{gemfile}"
319
- unless system("env BUNDLE_GEMFILE=gemfiles/#{gemfile}.gemfile bundle exec rspec")
320
- raise "Not successful"
324
+ Bundler.with_clean_env do
325
+ gems_with_gemfiles.each do |gemfile|
326
+ puts "Running tests for #{gemfile}"
327
+ unless system("env BUNDLE_GEMFILE=gemfiles/#{gemfile}.gemfile bundle exec rspec")
328
+ raise "Not successful"
329
+ end
321
330
  end
322
331
  end
323
332
  end
@@ -364,11 +373,20 @@ end
364
373
 
365
374
  begin
366
375
  require "rspec/core/rake_task"
376
+ is_jruby = defined?(RUBY_ENGINE) && RUBY_ENGINE == "jruby"
377
+ unless is_jruby
378
+ jruby_opts = "--exclude-pattern=spec/lib/appsignal/extension/jruby_spec.rb"
379
+ end
380
+
367
381
  desc "Run the AppSignal gem test suite."
368
382
  RSpec::Core::RakeTask.new :test do |t|
369
- is_jruby = defined?(RUBY_ENGINE) && RUBY_ENGINE == "jruby"
370
- unless is_jruby
371
- t.rspec_opts = "--exclude-pattern=spec/lib/appsignal/extension/jruby_spec.rb"
383
+ t.rspec_opts = jruby_opts
384
+ end
385
+
386
+ namespace :test do
387
+ desc "Run the Appsignal gem test in an extension failure scenario"
388
+ RSpec::Core::RakeTask.new :failure do |t|
389
+ t.rspec_opts = "#{jruby_opts} --tag extension_installation_failure"
372
390
  end
373
391
  end
374
392
  rescue LoadError # rubocop:disable Lint/HandleExceptions
@@ -29,7 +29,7 @@ Gem::Specification.new do |gem| # rubocop:disable Metrics/BlockLength
29
29
  gem.metadata = {
30
30
  "bug_tracker_uri" => "https://github.com/appsignal/appsignal-ruby/issues",
31
31
  "changelog_uri" =>
32
- "https://github.com/appsignal/appsignal-ruby/blob/master/CHANGELOG.md",
32
+ "https://github.com/appsignal/appsignal-ruby/blob/main/CHANGELOG.md",
33
33
  "documentation_uri" => "https://docs.appsignal.com/ruby/",
34
34
  "homepage_uri" => "https://docs.appsignal.com/ruby/",
35
35
  "source_code_uri" => "https://github.com/appsignal/appsignal-ruby"
@@ -10,8 +10,8 @@ semaphore: # Default `.semaphore/semaphore.yml` contents
10
10
  # Cancel all running and queued workflows before this one
11
11
  auto_cancel:
12
12
  running:
13
- # Ignore master AND develop branch as we want it to build all workflows
14
- when: "branch != 'master' AND branch != 'develop'"
13
+ # Ignore main AND develop branch as we want it to build all workflows
14
+ when: "branch != 'main' AND branch != 'develop'"
15
15
 
16
16
  global_job_config:
17
17
  env_vars:
@@ -32,6 +32,7 @@ semaphore: # Default `.semaphore/semaphore.yml` contents
32
32
  prologue:
33
33
  commands:
34
34
  - checkout
35
+ - git -C /home/semaphore/.rbenv/plugins/ruby-build pull
35
36
  - sem-version ruby $RUBY_VERSION
36
37
  - ./support/check_versions
37
38
  - cache restore $_BUNDLER_CACHE-bundler-$RUBY_VERSION-$GEMSET-$(checksum $BUNDLE_GEMFILE)
@@ -116,6 +117,7 @@ matrix:
116
117
  gems: "minimal"
117
118
  - ruby: "2.6.5"
118
119
  - ruby: "2.7.1"
120
+ - ruby: "3.0.0"
119
121
  - ruby: "jruby-9.1.17.0"
120
122
  gems: "minimal"
121
123
  gems:
@@ -138,24 +140,29 @@ matrix:
138
140
  ruby:
139
141
  - "2.6.5"
140
142
  - "2.7.1"
143
+ - "3.0.0"
141
144
  - gem: "rails-4.2"
142
145
  bundler: "1.17.3"
143
146
  exclude:
144
147
  ruby:
145
148
  - "2.6.5"
146
149
  - "2.7.1"
150
+ - "3.0.0"
147
151
  - gem: "rails-5.0"
148
152
  exclude:
149
153
  ruby:
150
154
  - "2.0.0-p648"
155
+ - "3.0.0"
151
156
  - gem: "rails-5.1"
152
157
  exclude:
153
158
  ruby:
154
159
  - "2.0.0-p648"
160
+ - "3.0.0"
155
161
  - gem: "rails-5.2"
156
162
  exclude:
157
163
  ruby:
158
164
  - "2.0.0-p648"
165
+ - "3.0.0"
159
166
  - gem: "rails-6.0"
160
167
  exclude:
161
168
  ruby:
@@ -167,11 +174,17 @@ matrix:
167
174
  - "jruby-9.1.17.0"
168
175
  - gem: "resque-1"
169
176
  bundler: "1.17.3"
177
+ exclude:
178
+ ruby:
179
+ - "3.0.0"
170
180
  - gem: "resque-2"
171
181
  exclude:
172
182
  ruby:
173
183
  - "2.0.0-p648"
174
184
  - gem: "sequel"
175
185
  - gem: "sequel-435"
186
+ exclude:
187
+ ruby:
188
+ - "3.0.0"
176
189
  - gem: "sinatra"
177
190
  - gem: "webmachine"
@@ -11,6 +11,8 @@ end
11
11
 
12
12
  task :default do
13
13
  begin
14
+ fail_install_on_purpose_in_test!
15
+
14
16
  library_type = "dynamic"
15
17
  report["language"]["implementation"] = "jruby"
16
18
  report["build"]["library_type"] = library_type
@@ -1,70 +1,62 @@
1
1
  ---
2
- version: a5b5db2
2
+ version: 361340a
3
3
  mirrors:
4
4
  - https://appsignal-agent-releases.global.ssl.fastly.net
5
5
  - https://d135dj0rjqvssy.cloudfront.net
6
6
  triples:
7
7
  x86_64-darwin:
8
8
  static:
9
- checksum: 60236d6cfe998d5d9e8a8d1c493b0be956c35b449dd16c47c1b9d4dada73c57e
9
+ checksum: 4e08cb0cef0ea7e30f8d507380b923f6cfa14adaea12c81804e118acd6395b57
10
10
  filename: appsignal-x86_64-darwin-all-static.tar.gz
11
11
  dynamic:
12
- checksum: e69a6fab6b854345bcecba2eb06de38f00d8a9fc67bb04502feab13e987699b4
12
+ checksum: 1a9c3e26bd453fe60a2f511d536e64bdeddb1f939664bda90d6a41eaeedf5250
13
13
  filename: appsignal-x86_64-darwin-all-dynamic.tar.gz
14
14
  universal-darwin:
15
15
  static:
16
- checksum: 60236d6cfe998d5d9e8a8d1c493b0be956c35b449dd16c47c1b9d4dada73c57e
16
+ checksum: 4e08cb0cef0ea7e30f8d507380b923f6cfa14adaea12c81804e118acd6395b57
17
17
  filename: appsignal-x86_64-darwin-all-static.tar.gz
18
18
  dynamic:
19
- checksum: e69a6fab6b854345bcecba2eb06de38f00d8a9fc67bb04502feab13e987699b4
19
+ checksum: 1a9c3e26bd453fe60a2f511d536e64bdeddb1f939664bda90d6a41eaeedf5250
20
20
  filename: appsignal-x86_64-darwin-all-dynamic.tar.gz
21
21
  i686-linux:
22
22
  static:
23
- checksum: 31d4400ec70ab05a1cf960b7e3bd46c3e8b3e0d4e2cf3be9bd20ed97ff5291e6
23
+ checksum: 01c027b3e472cb39d844284fcc8ba532628c00731b912e0e9718646ed124ae6e
24
24
  filename: appsignal-i686-linux-all-static.tar.gz
25
25
  dynamic:
26
- checksum: a2625de08adbf2804230774bb9d7ad7b4c568a5525a5300d41a450334c4b5528
26
+ checksum: 30696eac3ae5646bcb21ff86a1824dd4511a41dd323514e4a97a41b5ff09e2f8
27
27
  filename: appsignal-i686-linux-all-dynamic.tar.gz
28
28
  x86-linux:
29
29
  static:
30
- checksum: 31d4400ec70ab05a1cf960b7e3bd46c3e8b3e0d4e2cf3be9bd20ed97ff5291e6
30
+ checksum: 01c027b3e472cb39d844284fcc8ba532628c00731b912e0e9718646ed124ae6e
31
31
  filename: appsignal-i686-linux-all-static.tar.gz
32
32
  dynamic:
33
- checksum: a2625de08adbf2804230774bb9d7ad7b4c568a5525a5300d41a450334c4b5528
33
+ checksum: 30696eac3ae5646bcb21ff86a1824dd4511a41dd323514e4a97a41b5ff09e2f8
34
34
  filename: appsignal-i686-linux-all-dynamic.tar.gz
35
- i686-linux-musl:
36
- static:
37
- checksum: 18a5648c469718676e0c4b2925fbdd04a6d9b916ff778571a48d4ff0ffa944b6
38
- filename: appsignal-i686-linux-musl-all-static.tar.gz
39
- x86-linux-musl:
40
- static:
41
- checksum: 18a5648c469718676e0c4b2925fbdd04a6d9b916ff778571a48d4ff0ffa944b6
42
- filename: appsignal-i686-linux-musl-all-static.tar.gz
43
35
  x86_64-linux:
44
36
  static:
45
- checksum: df100f661e19266fe92a19ae44407f413e14f1bb975261542e3b738c5215889a
37
+ checksum: fe2038d6fa468fc23900fea6d8179d2b37d41d54f4ff33c573116183ac1cb491
46
38
  filename: appsignal-x86_64-linux-all-static.tar.gz
47
39
  dynamic:
48
- checksum: 4d988176e9419fe553cbab10ebc4eab617fdd3806682cbb35ab01d1f02bcd297
40
+ checksum: bcbf9546b078fb8bbaae5e7df4ed84831346c814bc865a47d32a3a095a84acbb
49
41
  filename: appsignal-x86_64-linux-all-dynamic.tar.gz
50
42
  x86_64-linux-musl:
51
43
  static:
52
- checksum: 265d42b764789b105cc5a8b5117ec1dbc07265f870e936661a8b6211c04de05a
44
+ checksum: b2ee5579a62b76a1d2f41f4e06749c4c549f9aaa40764862eff49c5a6a8841f1
53
45
  filename: appsignal-x86_64-linux-musl-all-static.tar.gz
54
46
  dynamic:
55
- checksum: 0b96c3f03b6c2943b2b51bfcdd56aa90e0869a5890dedf7ce30df9a8fe4f6d9a
47
+ checksum: 53cd2464853e61c2d8f911ec32ff98cb48f824293ffd575da6743bc34625a7eb
56
48
  filename: appsignal-x86_64-linux-musl-all-dynamic.tar.gz
57
49
  x86_64-freebsd:
58
50
  static:
59
- checksum: 0ffbe3fa91e5b1687693fa9af8e9c6bdccb98ffd6122d8ccd86bb81fbea91e3f
51
+ checksum: f228dd2f2cf951c9eb9f04487be50fdfdc3d29a956e639787a4022bd73f02e53
60
52
  filename: appsignal-x86_64-freebsd-all-static.tar.gz
61
53
  dynamic:
62
- checksum: d0f02acf08c3ab4601b2a1e26c899bc14274b742d6af1b5701646781c6c0e50c
54
+ checksum: 030b322b2cb15607260cbb0424c03f6e41646dca7aacc43a30279ad63a336541
63
55
  filename: appsignal-x86_64-freebsd-all-dynamic.tar.gz
64
56
  amd64-freebsd:
65
57
  static:
66
- checksum: 0ffbe3fa91e5b1687693fa9af8e9c6bdccb98ffd6122d8ccd86bb81fbea91e3f
58
+ checksum: f228dd2f2cf951c9eb9f04487be50fdfdc3d29a956e639787a4022bd73f02e53
67
59
  filename: appsignal-x86_64-freebsd-all-static.tar.gz
68
60
  dynamic:
69
- checksum: d0f02acf08c3ab4601b2a1e26c899bc14274b742d6af1b5701646781c6c0e50c
61
+ checksum: 030b322b2cb15607260cbb0424c03f6e41646dca7aacc43a30279ad63a336541
70
62
  filename: appsignal-x86_64-freebsd-all-dynamic.tar.gz
@@ -485,7 +485,7 @@ static VALUE data_append_boolean(VALUE self, VALUE value) {
485
485
  return Qnil;
486
486
  }
487
487
 
488
- static VALUE data_append_nil(VALUE self, VALUE value) {
488
+ static VALUE data_append_nil(VALUE self) {
489
489
  appsignal_data_t* data;
490
490
 
491
491
  Data_Get_Struct(self, appsignal_data_t, data);
@@ -119,30 +119,33 @@ def download_archive(type)
119
119
 
120
120
  version = AGENT_CONFIG["version"]
121
121
  filename = ARCH_CONFIG[type]["filename"]
122
- attempted_mirror_urls = []
122
+ download_errors = []
123
123
 
124
124
  AGENT_CONFIG["mirrors"].each do |mirror|
125
125
  download_url = [mirror, version, filename].join("/")
126
- attempted_mirror_urls << download_url
127
126
  report["download"]["download_url"] = download_url
128
127
 
129
128
  begin
130
- return open(
129
+ args = [
131
130
  download_url,
132
131
  :ssl_ca_cert => CA_CERT_PATH,
133
132
  :proxy => http_proxy
134
- )
135
- rescue
133
+ ]
134
+ if URI.respond_to?(:open) # rubocop:disable Style/GuardClause
135
+ return URI.open(*args)
136
+ else
137
+ return open(*args)
138
+ end
139
+ rescue => error
140
+ download_errors << "- URL: #{download_url}\n Error: #{error.class}: #{error.message}"
136
141
  next
137
142
  end
138
143
  end
139
144
 
140
- attempted_mirror_urls_mapped = attempted_mirror_urls.map { |mirror| "- #{mirror}" }
141
145
  abort_installation(
142
146
  "Could not download archive from any of our mirrors. " \
143
- "Attempted to download the archive from the following urls:\n" \
144
- "#{attempted_mirror_urls_mapped.join("\n")}\n" \
145
- "Please make sure your network allows access to any of these mirrors."
147
+ "Please make sure your network allows access to any of these mirrors.\n" \
148
+ "Attempted to download the archive from the following urls:\n#{download_errors.join("\n")}"
146
149
  )
147
150
  end
148
151
 
@@ -183,3 +186,10 @@ end
183
186
  def http_proxy
184
187
  Gem.configuration[:http_proxy] || ENV["http_proxy"] || ENV["HTTP_PROXY"]
185
188
  end
189
+
190
+ # Fail the installation on purpose in a specific test environment.
191
+ def fail_install_on_purpose_in_test!
192
+ return unless ENV["_TEST_APPSIGNAL_EXTENSION_FAILURE"]
193
+
194
+ raise "AppSignal internal test failure"
195
+ end
@@ -7,6 +7,8 @@ def local_build?
7
7
  end
8
8
 
9
9
  def install
10
+ fail_install_on_purpose_in_test!
11
+
10
12
  library_type = "static"
11
13
  report["language"]["implementation"] = "ruby"
12
14
  report["build"]["library_type"] = library_type
@@ -2,4 +2,11 @@ source 'https://rubygems.org'
2
2
 
3
3
  gem 'rack', '~> 1.6'
4
4
 
5
+ ruby_version = Gem::Version.new(RUBY_VERSION)
6
+ if ruby_version < Gem::Version.new("2.0.0")
7
+ # Newer versions of this gem have rexml as a dependency which doesn't work on
8
+ # Ruby 1.9
9
+ gem "crack", "0.4.4"
10
+ end
11
+
5
12
  gemspec :path => '../'
@@ -2,7 +2,6 @@ source 'https://rubygems.org'
2
2
 
3
3
  gem 'resque', "~> 2.0"
4
4
  gem 'sinatra'
5
- gem 'mime-types', '~> 2.6'
6
5
 
7
6
  gemspec :path => '../'
8
7