appsignal 2.11.0.beta.4 → 2.11.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.semaphore/semaphore.yml +254 -1
- data/CHANGELOG.md +27 -0
- data/README.md +20 -5
- data/Rakefile +27 -9
- data/appsignal.gemspec +1 -1
- data/build_matrix.yml +15 -2
- data/ext/Rakefile +2 -0
- data/ext/agent.yml +17 -25
- data/ext/appsignal_extension.c +1 -1
- data/ext/base.rb +19 -9
- data/ext/extconf.rb +2 -0
- data/gemfiles/no_dependencies.gemfile +7 -0
- data/gemfiles/resque-2.gemfile +0 -1
- data/gemfiles/webmachine.gemfile +1 -0
- data/lib/appsignal.rb +1 -0
- data/lib/appsignal/auth_check.rb +4 -2
- data/lib/appsignal/cli/diagnose.rb +1 -1
- data/lib/appsignal/cli/diagnose/utils.rb +8 -11
- data/lib/appsignal/cli/install.rb +5 -8
- data/lib/appsignal/config.rb +82 -17
- data/lib/appsignal/extension.rb +6 -5
- data/lib/appsignal/extension/jruby.rb +6 -5
- data/lib/appsignal/helpers/instrumentation.rb +32 -0
- data/lib/appsignal/hooks.rb +24 -0
- data/lib/appsignal/hooks/action_mailer.rb +22 -0
- data/lib/appsignal/hooks/active_job.rb +32 -9
- data/lib/appsignal/hooks/active_support_notifications.rb +72 -0
- data/lib/appsignal/hooks/puma.rb +0 -1
- data/lib/appsignal/hooks/sidekiq.rb +0 -1
- data/lib/appsignal/probes.rb +7 -0
- data/lib/appsignal/probes/puma.rb +1 -1
- data/lib/appsignal/probes/sidekiq.rb +3 -1
- data/lib/appsignal/transaction.rb +30 -2
- data/lib/appsignal/utils/deprecation_message.rb +1 -1
- data/lib/appsignal/version.rb +1 -1
- data/spec/lib/appsignal/auth_check_spec.rb +23 -0
- data/spec/lib/appsignal/capistrano2_spec.rb +1 -1
- data/spec/lib/appsignal/capistrano3_spec.rb +1 -1
- data/spec/lib/appsignal/cli/diagnose_spec.rb +42 -0
- data/spec/lib/appsignal/config_spec.rb +39 -1
- data/spec/lib/appsignal/extension/jruby_spec.rb +31 -28
- data/spec/lib/appsignal/extension_install_failure_spec.rb +23 -0
- data/spec/lib/appsignal/hooks/action_mailer_spec.rb +54 -0
- data/spec/lib/appsignal/hooks/active_support_notifications/finish_with_state_shared_examples.rb +35 -0
- data/spec/lib/appsignal/hooks/active_support_notifications/instrument_shared_examples.rb +145 -0
- data/spec/lib/appsignal/hooks/active_support_notifications/start_finish_shared_examples.rb +69 -0
- data/spec/lib/appsignal/hooks/active_support_notifications_spec.rb +9 -137
- data/spec/lib/appsignal/hooks/activejob_spec.rb +44 -1
- data/spec/lib/appsignal/hooks/resque_spec.rb +10 -2
- data/spec/lib/appsignal/hooks/sidekiq_spec.rb +4 -2
- data/spec/lib/appsignal/hooks_spec.rb +57 -0
- data/spec/lib/appsignal/marker_spec.rb +1 -1
- data/spec/lib/appsignal/transaction_spec.rb +55 -0
- data/spec/lib/appsignal_spec.rb +30 -0
- data/spec/spec_helper.rb +5 -0
- data/spec/support/helpers/config_helpers.rb +3 -2
- data/spec/support/helpers/dependency_helper.rb +4 -0
- data/spec/support/helpers/transaction_helpers.rb +1 -1
- data/spec/support/testing.rb +19 -19
- metadata +17 -5
data/CHANGELOG.md
CHANGED
@@ -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/
|
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 => "
|
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/
|
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 `
|
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 `
|
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" => [
|
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
|
-
|
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
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
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
|
-
|
370
|
-
|
371
|
-
|
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
|
data/appsignal.gemspec
CHANGED
@@ -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/
|
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"
|
data/build_matrix.yml
CHANGED
@@ -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
|
14
|
-
when: "branch != '
|
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"
|
data/ext/Rakefile
CHANGED
data/ext/agent.yml
CHANGED
@@ -1,70 +1,62 @@
|
|
1
1
|
---
|
2
|
-
version:
|
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:
|
9
|
+
checksum: 4e08cb0cef0ea7e30f8d507380b923f6cfa14adaea12c81804e118acd6395b57
|
10
10
|
filename: appsignal-x86_64-darwin-all-static.tar.gz
|
11
11
|
dynamic:
|
12
|
-
checksum:
|
12
|
+
checksum: 1a9c3e26bd453fe60a2f511d536e64bdeddb1f939664bda90d6a41eaeedf5250
|
13
13
|
filename: appsignal-x86_64-darwin-all-dynamic.tar.gz
|
14
14
|
universal-darwin:
|
15
15
|
static:
|
16
|
-
checksum:
|
16
|
+
checksum: 4e08cb0cef0ea7e30f8d507380b923f6cfa14adaea12c81804e118acd6395b57
|
17
17
|
filename: appsignal-x86_64-darwin-all-static.tar.gz
|
18
18
|
dynamic:
|
19
|
-
checksum:
|
19
|
+
checksum: 1a9c3e26bd453fe60a2f511d536e64bdeddb1f939664bda90d6a41eaeedf5250
|
20
20
|
filename: appsignal-x86_64-darwin-all-dynamic.tar.gz
|
21
21
|
i686-linux:
|
22
22
|
static:
|
23
|
-
checksum:
|
23
|
+
checksum: 01c027b3e472cb39d844284fcc8ba532628c00731b912e0e9718646ed124ae6e
|
24
24
|
filename: appsignal-i686-linux-all-static.tar.gz
|
25
25
|
dynamic:
|
26
|
-
checksum:
|
26
|
+
checksum: 30696eac3ae5646bcb21ff86a1824dd4511a41dd323514e4a97a41b5ff09e2f8
|
27
27
|
filename: appsignal-i686-linux-all-dynamic.tar.gz
|
28
28
|
x86-linux:
|
29
29
|
static:
|
30
|
-
checksum:
|
30
|
+
checksum: 01c027b3e472cb39d844284fcc8ba532628c00731b912e0e9718646ed124ae6e
|
31
31
|
filename: appsignal-i686-linux-all-static.tar.gz
|
32
32
|
dynamic:
|
33
|
-
checksum:
|
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:
|
37
|
+
checksum: fe2038d6fa468fc23900fea6d8179d2b37d41d54f4ff33c573116183ac1cb491
|
46
38
|
filename: appsignal-x86_64-linux-all-static.tar.gz
|
47
39
|
dynamic:
|
48
|
-
checksum:
|
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:
|
44
|
+
checksum: b2ee5579a62b76a1d2f41f4e06749c4c549f9aaa40764862eff49c5a6a8841f1
|
53
45
|
filename: appsignal-x86_64-linux-musl-all-static.tar.gz
|
54
46
|
dynamic:
|
55
|
-
checksum:
|
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:
|
51
|
+
checksum: f228dd2f2cf951c9eb9f04487be50fdfdc3d29a956e639787a4022bd73f02e53
|
60
52
|
filename: appsignal-x86_64-freebsd-all-static.tar.gz
|
61
53
|
dynamic:
|
62
|
-
checksum:
|
54
|
+
checksum: 030b322b2cb15607260cbb0424c03f6e41646dca7aacc43a30279ad63a336541
|
63
55
|
filename: appsignal-x86_64-freebsd-all-dynamic.tar.gz
|
64
56
|
amd64-freebsd:
|
65
57
|
static:
|
66
|
-
checksum:
|
58
|
+
checksum: f228dd2f2cf951c9eb9f04487be50fdfdc3d29a956e639787a4022bd73f02e53
|
67
59
|
filename: appsignal-x86_64-freebsd-all-static.tar.gz
|
68
60
|
dynamic:
|
69
|
-
checksum:
|
61
|
+
checksum: 030b322b2cb15607260cbb0424c03f6e41646dca7aacc43a30279ad63a336541
|
70
62
|
filename: appsignal-x86_64-freebsd-all-dynamic.tar.gz
|
data/ext/appsignal_extension.c
CHANGED
@@ -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
|
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);
|
data/ext/base.rb
CHANGED
@@ -119,30 +119,33 @@ def download_archive(type)
|
|
119
119
|
|
120
120
|
version = AGENT_CONFIG["version"]
|
121
121
|
filename = ARCH_CONFIG[type]["filename"]
|
122
|
-
|
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
|
-
|
129
|
+
args = [
|
131
130
|
download_url,
|
132
131
|
:ssl_ca_cert => CA_CERT_PATH,
|
133
132
|
:proxy => http_proxy
|
134
|
-
|
135
|
-
|
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
|
-
"
|
144
|
-
"#{
|
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
|
data/ext/extconf.rb
CHANGED
@@ -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 => '../'
|