appsignal 2.10.3 → 2.10.5
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 +964 -0
- data/CHANGELOG.md +12 -0
- data/README.md +1 -1
- data/Rakefile +66 -21
- data/appsignal.gemspec +5 -2
- data/build_matrix.yml +94 -49
- data/gemfiles/capistrano2.gemfile +0 -5
- data/gemfiles/capistrano3.gemfile +0 -5
- data/gemfiles/grape.gemfile +0 -5
- data/gemfiles/no_dependencies.gemfile +0 -5
- data/gemfiles/padrino.gemfile +0 -5
- data/gemfiles/que.gemfile +0 -5
- data/gemfiles/que_beta.gemfile +0 -5
- data/gemfiles/rails-3.2.gemfile +0 -5
- data/gemfiles/rails-4.0.gemfile +0 -5
- data/gemfiles/rails-4.1.gemfile +0 -5
- data/gemfiles/rails-4.2.gemfile +0 -5
- data/gemfiles/resque.gemfile +0 -5
- data/lib/appsignal/cli/diagnose.rb +1 -1
- data/lib/appsignal/hooks/net_http.rb +13 -8
- data/lib/appsignal/integrations/grape.rb +2 -1
- data/lib/appsignal/integrations/net_http.rb +16 -0
- data/lib/appsignal/system.rb +6 -0
- data/lib/appsignal/transaction.rb +7 -2
- data/lib/appsignal/version.rb +1 -1
- data/spec/lib/appsignal/auth_check_spec.rb +1 -1
- data/spec/lib/appsignal/cli/diagnose_spec.rb +1 -1
- data/spec/lib/appsignal/integrations/grape_spec.rb +10 -0
- data/spec/lib/appsignal/system_spec.rb +36 -0
- data/spec/lib/appsignal/transaction_spec.rb +33 -14
- data/spec/lib/appsignal/transmitter_spec.rb +3 -1
- data/spec/spec_helper.rb +15 -1
- data/support/check_versions +22 -0
- data/support/install_deps +9 -4
- metadata +20 -18
- data/.travis.yml +0 -197
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,17 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 2.10.5
|
4
|
+
- Improve Ruby 1.9 compatibility. PR #591
|
5
|
+
- Add grape.skip_appsignal_error request env. PR #588
|
6
|
+
More information: https://docs.appsignal.com/ruby/integrations/grape.html
|
7
|
+
- Fix compatibility with the `http_logger` gem. Fix `SystemStackError`. PR #597
|
8
|
+
|
9
|
+
## 2.10.4
|
10
|
+
- Fix `Appsignal::Transaction#set_http_or_background_action` helper (used by
|
11
|
+
`Appsignal.monitor_transaction`), to allow overwriting the action name of a
|
12
|
+
`Transaction` with `Appsignal.set_action`. PR #594
|
13
|
+
- Move build to Semaphore. PR #587, #590 and #592
|
14
|
+
|
3
15
|
## 2.10.3
|
4
16
|
- Only warn about reused transactions once. Repeated occurrences are logged as
|
5
17
|
debug messages. PR #585
|
data/README.md
CHANGED
@@ -9,7 +9,7 @@ issues.
|
|
9
9
|
- [Ruby code documentation][ruby-doc]
|
10
10
|
- [Support][contact]
|
11
11
|
|
12
|
-
[![Build
|
12
|
+
[![Build status](https://appsignal.semaphoreci.com/badges/appsignal-ruby/branches/master.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
|
|
data/Rakefile
CHANGED
@@ -17,50 +17,90 @@ VERSION_MANAGERS = {
|
|
17
17
|
}
|
18
18
|
}.freeze
|
19
19
|
|
20
|
+
def env_map(key, value)
|
21
|
+
{
|
22
|
+
"name" => key,
|
23
|
+
"value" => value
|
24
|
+
}
|
25
|
+
end
|
26
|
+
|
27
|
+
def build_task(ruby_version, type = nil)
|
28
|
+
{
|
29
|
+
"name" => "Ruby #{ruby_version}#{type ? " - #{type}" : nil}",
|
30
|
+
"dependencies" => ["Validation"],
|
31
|
+
"task" => {
|
32
|
+
"prologue" => {
|
33
|
+
"commands" => [
|
34
|
+
"./support/bundler_wrapper exec rake extension:install"
|
35
|
+
]
|
36
|
+
},
|
37
|
+
"jobs" => []
|
38
|
+
}
|
39
|
+
}
|
40
|
+
end
|
41
|
+
|
20
42
|
namespace :build_matrix do
|
21
|
-
namespace :
|
43
|
+
namespace :semaphore do
|
22
44
|
task :generate do
|
23
45
|
yaml = YAML.load_file("build_matrix.yml")
|
24
46
|
matrix = yaml["matrix"]
|
25
47
|
defaults = matrix["defaults"]
|
48
|
+
semaphore = yaml["semaphore"]
|
26
49
|
|
27
50
|
builds = []
|
28
51
|
matrix["ruby"].each do |ruby|
|
29
52
|
ruby_version = ruby["ruby"]
|
53
|
+
ruby_primary_block = build_task(ruby_version)
|
54
|
+
ruby_secondary_block = build_task(ruby_version, "Gems").tap do |t|
|
55
|
+
t["dependencies"] = ["Ruby #{ruby_version}"]
|
56
|
+
end
|
30
57
|
gemset_for_ruby(ruby, matrix).each do |gem|
|
31
58
|
next if excluded_for_ruby?(gem, ruby)
|
32
59
|
|
33
|
-
env =
|
60
|
+
env = [
|
61
|
+
env_map("RUBY_VERSION", ruby_version),
|
62
|
+
env_map("GEMSET", gem["gem"]),
|
63
|
+
env_map("BUNDLE_GEMFILE", "gemfiles/#{gem["gem"]}.gemfile")
|
64
|
+
]
|
34
65
|
rubygems = gem["rubygems"] || ruby["rubygems"] || defaults["rubygems"]
|
35
|
-
env
|
66
|
+
env << env_map("_RUBYGEMS_VERSION", rubygems) if rubygems
|
36
67
|
bundler = gem["bundler"] || ruby["bundler"] || defaults["bundler"]
|
37
|
-
env
|
68
|
+
env << env_map("_BUNDLER_VERSION", bundler) if bundler
|
38
69
|
|
39
|
-
|
40
|
-
"
|
41
|
-
"
|
42
|
-
"
|
70
|
+
job = {
|
71
|
+
"name" => "Ruby #{ruby_version} for #{gem["gem"]}",
|
72
|
+
"env_vars" => env,
|
73
|
+
"commands" => ["./support/bundler_wrapper exec rake test"]
|
43
74
|
}
|
75
|
+
if gem["gem"] == "no_dependencies"
|
76
|
+
ruby_primary_block["task"]["jobs"] << job
|
77
|
+
else
|
78
|
+
ruby_secondary_block["task"]["jobs"] << job
|
79
|
+
end
|
80
|
+
end
|
81
|
+
builds << ruby_primary_block
|
82
|
+
if ruby_secondary_block["task"]["jobs"].count.nonzero?
|
83
|
+
builds << ruby_secondary_block
|
44
84
|
end
|
45
85
|
end
|
46
|
-
|
47
|
-
travis["matrix"]["include"] = travis["matrix"]["include"] + builds
|
86
|
+
semaphore["blocks"] += builds
|
48
87
|
|
49
88
|
header = "# DO NOT EDIT\n" \
|
50
|
-
"# This is a generated file by the `rake build_matrix:
|
89
|
+
"# This is a generated file by the `rake build_matrix:semaphore:generate` task.\n" \
|
51
90
|
"# See `build_matrix.yml` for the build matrix.\n" \
|
52
|
-
"# Generate this file with `rake build_matrix:
|
53
|
-
generated_yaml = header + YAML.dump(
|
54
|
-
File.write(".
|
55
|
-
puts "Generated `.
|
56
|
-
puts "
|
91
|
+
"# Generate this file with `rake build_matrix:semaphore:generate`.\n"
|
92
|
+
generated_yaml = header + YAML.dump(semaphore)
|
93
|
+
File.write(".semaphore/semaphore.yml", generated_yaml)
|
94
|
+
puts "Generated `.semaphore/semaphore.yml`"
|
95
|
+
puts "Task count: #{builds.length}"
|
96
|
+
puts "Job count: #{builds.sum { |block| block["task"]["jobs"].count }}"
|
57
97
|
end
|
58
98
|
|
59
99
|
task :validate => :generate do
|
60
|
-
`git status | grep .
|
100
|
+
`git status | grep .semaphore/semaphore.yml 2>&1`
|
61
101
|
if $?.exitstatus.zero? # rubocop:disable Style/SpecialGlobalVars
|
62
|
-
puts "The `.
|
63
|
-
puts "Please run `rake build_matrix:
|
102
|
+
puts "The `.semaphore/semaphore.yml` is modified. The changes were not committed."
|
103
|
+
puts "Please run `rake build_matrix:semaphore:generate` and commit the changes."
|
64
104
|
exit 1
|
65
105
|
end
|
66
106
|
end
|
@@ -318,14 +358,19 @@ namespace :extension do
|
|
318
358
|
appsignal.version \
|
319
359
|
Makefile \
|
320
360
|
mkmf.log
|
321
|
-
|
361
|
+
COMMAND
|
322
362
|
end
|
323
363
|
end
|
324
364
|
|
325
365
|
begin
|
326
366
|
require "rspec/core/rake_task"
|
327
367
|
desc "Run the AppSignal gem test suite."
|
328
|
-
RSpec::Core::RakeTask.new :test
|
368
|
+
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"
|
372
|
+
end
|
373
|
+
end
|
329
374
|
rescue LoadError # rubocop:disable Lint/HandleExceptions
|
330
375
|
# When running rake install, there is no RSpec yet.
|
331
376
|
end
|
data/appsignal.gemspec
CHANGED
@@ -39,9 +39,12 @@ Gem::Specification.new do |gem| # rubocop:disable Metrics/BlockLength
|
|
39
39
|
|
40
40
|
gem.add_development_dependency "rake", "~> 11"
|
41
41
|
gem.add_development_dependency "rspec", "~> 3.8"
|
42
|
-
gem.add_development_dependency "pry"
|
43
42
|
gem.add_development_dependency "timecop"
|
44
43
|
gem.add_development_dependency "webmock"
|
45
|
-
gem.add_development_dependency "rubocop", "0.50.0"
|
46
44
|
gem.add_development_dependency "yard", ">= 0.9.20"
|
45
|
+
is_modern_ruby = Gem::Version.new(RUBY_VERSION) >= Gem::Version.new("2.0.0")
|
46
|
+
if is_modern_ruby
|
47
|
+
gem.add_development_dependency "pry"
|
48
|
+
gem.add_development_dependency "rubocop", "0.50.0"
|
49
|
+
end
|
47
50
|
end
|
data/build_matrix.yml
CHANGED
@@ -1,42 +1,78 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
semaphore: # Default `.semaphore/semaphore.yml` contents
|
2
|
+
version: v1.0
|
3
|
+
name: AppSignal Ruby Build and Tests
|
3
4
|
|
4
|
-
|
5
|
-
|
6
|
-
-
|
7
|
-
|
5
|
+
agent:
|
6
|
+
machine:
|
7
|
+
type: e1-standard-2
|
8
|
+
os_image: ubuntu1804
|
8
9
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
10
|
+
# Cancel all running and queued workflows before this one
|
11
|
+
auto_cancel:
|
12
|
+
running:
|
13
|
+
# Ignore master AND develop branch as we want it to build all workflows
|
14
|
+
when: "branch != 'master' AND branch != 'develop'"
|
13
15
|
|
14
|
-
|
15
|
-
|
16
|
-
-
|
17
|
-
|
18
|
-
-
|
19
|
-
|
16
|
+
global_job_config:
|
17
|
+
env_vars:
|
18
|
+
- name: _BUNDLER_CACHE
|
19
|
+
value: "v2"
|
20
|
+
- name: _GEMS_CACHE
|
21
|
+
value: "v2"
|
22
|
+
- name: BUNDLE_PATH
|
23
|
+
value: "../.bundle/"
|
24
|
+
- name: RUNNING_IN_CI
|
25
|
+
value: "true"
|
26
|
+
- name: RAILS_ENV
|
27
|
+
value: "test"
|
28
|
+
- name: JRUBY_OPTS
|
29
|
+
value: ""
|
30
|
+
- name: COV
|
31
|
+
value: "1"
|
32
|
+
prologue:
|
33
|
+
commands:
|
34
|
+
- checkout
|
35
|
+
- sem-version ruby $RUBY_VERSION
|
36
|
+
- ./support/check_versions
|
37
|
+
- cache restore $_BUNDLER_CACHE-bundler-$RUBY_VERSION-$GEMSET-$(checksum $BUNDLE_GEMFILE),$_BUNDLER_CACHE-bundler-$RUBY_VERSION-$GEMSET,$_BUNDLER_CACHE-bundler-$RUBY_VERSION
|
38
|
+
- cache restore $_GEMS_CACHE-gems-$RUBY_VERSION-$(checksum $BUNDLE_GEMFILE),$_GEMS_CACHE-gems-$RUBY_VERSION
|
39
|
+
- ./support/install_deps
|
40
|
+
- ./support/bundler_wrapper install --jobs=3 --retry=3
|
41
|
+
epilogue:
|
42
|
+
on_pass:
|
43
|
+
commands:
|
44
|
+
- cache store $_BUNDLER_CACHE-bundler-$RUBY_VERSION-$GEMSET-$(checksum $BUNDLE_GEMFILE) .bundle
|
45
|
+
- cache store $_GEMS_CACHE-gems-$RUBY_VERSION-$(checksum $BUNDLE_GEMFILE) $HOME/.gem
|
20
46
|
|
21
|
-
|
22
|
-
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
47
|
+
blocks:
|
48
|
+
- name: Validation
|
49
|
+
dependencies: []
|
50
|
+
task:
|
51
|
+
jobs:
|
52
|
+
- name: Validate CI setup
|
53
|
+
env_vars:
|
54
|
+
- name: RUBY_VERSION
|
55
|
+
value: 2.6.5
|
56
|
+
- name: GEMSET
|
57
|
+
value: no_dependencies
|
58
|
+
- name: BUNDLE_GEMFILE
|
59
|
+
value: gemfiles/no_dependencies.gemfile
|
60
|
+
commands:
|
61
|
+
- ./support/bundler_wrapper exec rake build_matrix:semaphore:validate
|
62
|
+
- name: Linters
|
63
|
+
dependencies: []
|
64
|
+
task:
|
65
|
+
jobs:
|
66
|
+
- name: RuboCop
|
67
|
+
env_vars:
|
68
|
+
- name: RUBY_VERSION
|
69
|
+
value: 2.6.5
|
70
|
+
- name: GEMSET
|
71
|
+
value: no_dependencies
|
72
|
+
- name: BUNDLE_GEMFILE
|
73
|
+
value: gemfiles/no_dependencies.gemfile
|
74
|
+
commands:
|
75
|
+
- ./support/bundler_wrapper exec rubocop
|
40
76
|
|
41
77
|
matrix:
|
42
78
|
defaults:
|
@@ -49,25 +85,33 @@ matrix:
|
|
49
85
|
minimal:
|
50
86
|
- "no_dependencies"
|
51
87
|
- "rails-5.2"
|
88
|
+
- "rails-6.0"
|
52
89
|
|
53
90
|
ruby:
|
54
|
-
- ruby: "
|
91
|
+
- ruby: "1.9.3-p551"
|
55
92
|
rubygems: "2.7.8"
|
56
|
-
|
93
|
+
bundler: "1.17.3"
|
94
|
+
gems: "none"
|
95
|
+
- ruby: "2.0.0-p648"
|
57
96
|
rubygems: "2.7.8"
|
97
|
+
bundler: "1.17.3"
|
98
|
+
- ruby: "2.1.10"
|
99
|
+
rubygems: "2.7.8"
|
100
|
+
bundler: "1.17.3"
|
58
101
|
gems: "none"
|
59
|
-
- ruby: "2.2.
|
102
|
+
- ruby: "2.2.10"
|
60
103
|
rubygems: "2.7.8"
|
104
|
+
bundler: "1.17.3"
|
61
105
|
gems: "none"
|
62
106
|
- ruby: "2.3.8"
|
63
107
|
gems: "none"
|
64
|
-
- ruby: "2.4.
|
108
|
+
- ruby: "2.4.9"
|
65
109
|
gems: "none"
|
66
|
-
- ruby: "2.5.
|
110
|
+
- ruby: "2.5.7"
|
67
111
|
gems: "minimal"
|
68
112
|
- ruby: "2.6.5"
|
69
113
|
- ruby: "2.7.0"
|
70
|
-
- ruby: "jruby-
|
114
|
+
- ruby: "jruby-9.1.17.0"
|
71
115
|
gems: "minimal"
|
72
116
|
gems:
|
73
117
|
- gem: "no_dependencies"
|
@@ -80,7 +124,7 @@ matrix:
|
|
80
124
|
- gem: "que_beta"
|
81
125
|
exclude:
|
82
126
|
ruby:
|
83
|
-
- "2.0.0"
|
127
|
+
- "2.0.0-p648"
|
84
128
|
- gem: "rails-3.2"
|
85
129
|
bundler: "1.17.3"
|
86
130
|
exclude:
|
@@ -96,23 +140,24 @@ matrix:
|
|
96
140
|
- gem: "rails-5.0"
|
97
141
|
exclude:
|
98
142
|
ruby:
|
99
|
-
- "2.0.0"
|
143
|
+
- "2.0.0-p648"
|
100
144
|
- gem: "rails-5.1"
|
101
145
|
exclude:
|
102
146
|
ruby:
|
103
|
-
- "2.0.0"
|
147
|
+
- "2.0.0-p648"
|
104
148
|
- gem: "rails-5.2"
|
105
149
|
exclude:
|
106
150
|
ruby:
|
107
|
-
- "2.0.0"
|
151
|
+
- "2.0.0-p648"
|
108
152
|
- gem: "rails-6.0"
|
109
153
|
exclude:
|
110
154
|
ruby:
|
111
|
-
- "2.0.0"
|
112
|
-
- "2.1.
|
113
|
-
- "2.2.
|
155
|
+
- "2.0.0-p648"
|
156
|
+
- "2.1.10"
|
157
|
+
- "2.2.10"
|
114
158
|
- "2.3.8"
|
115
|
-
- "2.4.
|
159
|
+
- "2.4.9"
|
160
|
+
- "jruby-9.1.17.0"
|
116
161
|
- gem: "resque"
|
117
162
|
bundler: "1.17.3"
|
118
163
|
- gem: "sequel"
|
@@ -3,10 +3,5 @@ source 'https://rubygems.org'
|
|
3
3
|
gem 'capistrano', '< 3.0'
|
4
4
|
gem 'net-ssh', '2.9.2'
|
5
5
|
gem 'rack', '~> 1.6'
|
6
|
-
if Gem::Version.new(RUBY_VERSION) <= Gem::Version.new("2.1.0")
|
7
|
-
gem 'public_suffix', "~> 2.0.0"
|
8
|
-
else
|
9
|
-
gem 'public_suffix'
|
10
|
-
end
|
11
6
|
|
12
7
|
gemspec :path => '../'
|
@@ -4,10 +4,5 @@ gem 'capistrano', '~> 3.0'
|
|
4
4
|
gem 'i18n', '~> 1.2.0'
|
5
5
|
gem 'net-ssh', '2.9.2'
|
6
6
|
gem 'rack', '~> 1.6'
|
7
|
-
if Gem::Version.new(RUBY_VERSION) <= Gem::Version.new("2.1.0")
|
8
|
-
gem 'public_suffix', "~> 2.0.0"
|
9
|
-
else
|
10
|
-
gem 'public_suffix'
|
11
|
-
end
|
12
7
|
|
13
8
|
gemspec :path => '../'
|
data/gemfiles/grape.gemfile
CHANGED
@@ -3,10 +3,5 @@ source 'https://rubygems.org'
|
|
3
3
|
gem 'grape', '0.14.0'
|
4
4
|
gem 'rack', '~> 1.6'
|
5
5
|
gem 'activesupport', '~> 4.2'
|
6
|
-
if Gem::Version.new(RUBY_VERSION) <= Gem::Version.new("2.1.0")
|
7
|
-
gem 'public_suffix', "~> 2.0.0"
|
8
|
-
else
|
9
|
-
gem 'public_suffix'
|
10
|
-
end
|
11
6
|
|
12
7
|
gemspec :path => '../'
|
data/gemfiles/padrino.gemfile
CHANGED
data/gemfiles/que.gemfile
CHANGED