appsignal 2.8.4.beta.1 → 2.9.18.beta.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/ISSUE_TEMPLATE/bug_report.md +31 -0
- data/.github/ISSUE_TEMPLATE/chore.md +14 -0
- data/.gitignore +2 -3
- data/.rubocop.yml +3 -0
- data/.rubocop_todo.yml +7 -16
- data/.travis.yml +28 -27
- data/CHANGELOG.md +657 -533
- data/README.md +31 -3
- data/Rakefile +128 -129
- data/SUPPORT.md +16 -0
- data/appsignal.gemspec +17 -4
- data/build_matrix.yml +21 -9
- data/ext/Rakefile +23 -17
- data/ext/agent.yml +40 -37
- data/ext/base.rb +116 -31
- data/ext/extconf.rb +34 -28
- data/gemfiles/capistrano2.gemfile +5 -0
- data/gemfiles/capistrano3.gemfile +5 -0
- data/gemfiles/grape.gemfile +5 -0
- data/gemfiles/no_dependencies.gemfile +5 -0
- data/gemfiles/padrino.gemfile +5 -0
- data/gemfiles/que.gemfile +5 -0
- data/gemfiles/que_beta.gemfile +10 -0
- data/gemfiles/rails-3.2.gemfile +5 -0
- data/gemfiles/rails-4.0.gemfile +5 -0
- data/gemfiles/rails-4.1.gemfile +5 -0
- data/gemfiles/rails-4.2.gemfile +5 -0
- data/gemfiles/rails-6.0.gemfile +5 -0
- data/gemfiles/resque.gemfile +5 -0
- data/lib/appsignal.rb +14 -492
- data/lib/appsignal/cli/demo.rb +5 -2
- data/lib/appsignal/cli/diagnose.rb +84 -4
- data/lib/appsignal/cli/diagnose/paths.rb +0 -5
- data/lib/appsignal/cli/diagnose/utils.rb +19 -0
- data/lib/appsignal/cli/helpers.rb +6 -0
- data/lib/appsignal/cli/install.rb +45 -15
- data/lib/appsignal/cli/notify_of_deploy.rb +10 -0
- data/lib/appsignal/config.rb +1 -2
- data/lib/appsignal/event_formatter.rb +4 -5
- data/lib/appsignal/event_formatter/action_view/render_formatter.rb +10 -8
- data/lib/appsignal/event_formatter/moped/query_formatter.rb +60 -59
- data/lib/appsignal/extension.rb +2 -2
- data/lib/appsignal/helpers/instrumentation.rb +494 -0
- data/lib/appsignal/helpers/metrics.rb +54 -0
- data/lib/appsignal/hooks.rb +11 -8
- data/lib/appsignal/hooks/active_support_notifications.rb +2 -5
- data/lib/appsignal/hooks/puma.rb +74 -11
- data/lib/appsignal/hooks/sequel.rb +1 -1
- data/lib/appsignal/hooks/sidekiq.rb +115 -0
- data/lib/appsignal/integrations/mongo_ruby_driver.rb +7 -0
- data/lib/appsignal/integrations/que.rb +9 -8
- data/lib/appsignal/integrations/railtie.rb +2 -1
- data/lib/appsignal/marker.rb +2 -3
- data/lib/appsignal/minutely.rb +188 -19
- data/lib/appsignal/rack/sinatra_instrumentation.rb +1 -1
- data/lib/appsignal/system.rb +16 -18
- data/lib/appsignal/transaction.rb +8 -0
- data/lib/appsignal/utils/rails_helper.rb +20 -0
- data/lib/appsignal/version.rb +1 -1
- data/lib/puma/plugin/appsignal.rb +26 -0
- data/spec/lib/appsignal/cli/diagnose/utils_spec.rb +40 -0
- data/spec/lib/appsignal/cli/diagnose_spec.rb +129 -22
- data/spec/lib/appsignal/cli/install_spec.rb +57 -8
- data/spec/lib/appsignal/cli/notify_of_deploy_spec.rb +10 -0
- data/spec/lib/appsignal/config_spec.rb +13 -11
- data/spec/lib/appsignal/event_formatter/action_view/render_formatter_spec.rb +38 -28
- data/spec/lib/appsignal/event_formatter/moped/query_formatter_spec.rb +6 -0
- data/spec/lib/appsignal/event_formatter_spec.rb +168 -69
- data/spec/lib/appsignal/hooks/active_support_notifications_spec.rb +104 -25
- data/spec/lib/appsignal/hooks/puma_spec.rb +251 -34
- data/spec/lib/appsignal/hooks/sidekiq_spec.rb +209 -0
- data/spec/lib/appsignal/hooks_spec.rb +4 -0
- data/spec/lib/appsignal/integrations/mongo_ruby_driver_spec.rb +24 -1
- data/spec/lib/appsignal/minutely_spec.rb +318 -26
- data/spec/lib/appsignal/system_spec.rb +0 -35
- data/spec/lib/appsignal/transaction_spec.rb +68 -10
- data/spec/lib/appsignal/utils/hash_sanitizer_spec.rb +39 -31
- data/spec/lib/appsignal/utils/json_spec.rb +7 -3
- data/spec/lib/appsignal_spec.rb +98 -22
- data/spec/lib/puma/appsignal_spec.rb +91 -0
- data/spec/spec_helper.rb +13 -0
- data/spec/support/{project_fixture → fixtures/projects/valid}/config/application.rb +0 -0
- data/spec/support/{project_fixture → fixtures/projects/valid}/config/appsignal.yml +1 -0
- data/spec/support/{project_fixture → fixtures/projects/valid}/config/environments/development.rb +0 -0
- data/spec/support/{project_fixture → fixtures/projects/valid}/config/environments/production.rb +0 -0
- data/spec/support/{project_fixture → fixtures/projects/valid}/config/environments/test.rb +0 -0
- data/spec/support/{project_fixture → fixtures/projects/valid}/log/.gitkeep +0 -0
- data/spec/support/helpers/config_helpers.rb +1 -1
- data/spec/support/helpers/log_helpers.rb +6 -0
- data/spec/support/helpers/wait_for_helper.rb +28 -0
- data/spec/support/mocks/mock_probe.rb +11 -0
- data/spec/support/stubs/sidekiq/api.rb +4 -0
- metadata +43 -31
- data/spec/support/fixtures/containers/cgroups/docker +0 -14
- data/spec/support/fixtures/containers/cgroups/docker_systemd +0 -8
- data/spec/support/fixtures/containers/cgroups/lxc +0 -10
- data/spec/support/fixtures/containers/cgroups/no_permission +0 -0
- data/spec/support/fixtures/containers/cgroups/none +0 -1
data/README.md
CHANGED
@@ -6,6 +6,7 @@ issues.
|
|
6
6
|
|
7
7
|
- [AppSignal.com website][appsignal]
|
8
8
|
- [Documentation][docs]
|
9
|
+
- [Ruby code documentation][ruby-doc]
|
9
10
|
- [Support][contact]
|
10
11
|
|
11
12
|
[![Build Status](https://travis-ci.org/appsignal/appsignal-ruby.png?branch=master)](https://travis-ci.org/appsignal/appsignal-ruby)
|
@@ -172,6 +173,29 @@ bundle exec rake install
|
|
172
173
|
bundle exec rake extension:install
|
173
174
|
```
|
174
175
|
|
176
|
+
#### Git source for Bundler
|
177
|
+
|
178
|
+
When specifying a git source for the AppSignal gem in Bundler we do not support
|
179
|
+
JRuby. This is because our gemspec defaults to the Ruby implementation for
|
180
|
+
installing the AppSignal C-extension.
|
181
|
+
|
182
|
+
```ruby
|
183
|
+
# Gemfile
|
184
|
+
gem "appsignal",
|
185
|
+
:git => "https://github.com/appsignal/appsignal-ruby.git",
|
186
|
+
:branch => "master"
|
187
|
+
```
|
188
|
+
|
189
|
+
When you need to use a git source of the gem in your JRuby install, you'll need
|
190
|
+
to run the following to install the C-extension on JRuby. Note that this
|
191
|
+
post-install step is not possible on platforms such as Heroku where the app is
|
192
|
+
sent through a deploy pipeline and the app is started immediately after.
|
193
|
+
|
194
|
+
```bash
|
195
|
+
bundle install
|
196
|
+
(cd $(bundle show appsignal)/ext && rake)
|
197
|
+
```
|
198
|
+
|
175
199
|
### Testing
|
176
200
|
|
177
201
|
```bash
|
@@ -207,9 +231,9 @@ BUNDLE_GEMFILE=gemfiles/sinatra.gemfile bundle exec rspec
|
|
207
231
|
BUNDLE_GEMFILE=gemfiles/webmachine.gemfile bundle exec rspec
|
208
232
|
```
|
209
233
|
|
210
|
-
If you have either [RVM][rvm]
|
211
|
-
`rake
|
212
|
-
all Ruby versions and gem combinations we support.
|
234
|
+
If you have either [RVM][rvm], [rbenv][rbenv] or [chruby][chruby] installed you
|
235
|
+
can also use `rake build_matrix:local:generate` to generate a script that runs
|
236
|
+
specs for all Ruby versions and gem combinations we support.
|
213
237
|
|
214
238
|
We run the suite against all of the Gemfiles mentioned above and on
|
215
239
|
a number of different Ruby versions.
|
@@ -244,12 +268,15 @@ we send a package to so far on our [Stroopwafles page][waffles-page].
|
|
244
268
|
AppSignal. They will help you get set up, tweak your code and make sure you get
|
245
269
|
the most out of using AppSignal.
|
246
270
|
|
271
|
+
Also see our [SUPPORT.md file](SUPPORT.md).
|
272
|
+
|
247
273
|
[appsignal]: https://appsignal.com
|
248
274
|
[appsignal-sign-up]: https://appsignal.com/users/sign_up
|
249
275
|
[contact]: mailto:support@appsignal.com
|
250
276
|
[coc]: https://docs.appsignal.com/appsignal/code-of-conduct.html
|
251
277
|
[waffles-page]: https://appsignal.com/waffles
|
252
278
|
[docs]: http://docs.appsignal.com
|
279
|
+
[ruby-doc]: https://www.rubydoc.info/gems/appsignal
|
253
280
|
[contributing-guide]: http://docs.appsignal.com/appsignal/contributing.html
|
254
281
|
[supported-systems]: http://docs.appsignal.com/support/operating-systems.html
|
255
282
|
[integrations]: http://docs.appsignal.com/ruby/integrations/index.html
|
@@ -263,3 +290,4 @@ the most out of using AppSignal.
|
|
263
290
|
[semver]: http://semver.org/
|
264
291
|
[rvm]: http://rvm.io/
|
265
292
|
[rbenv]: https://github.com/rbenv/rbenv
|
293
|
+
[chruby]: https://github.com/postmodern/chruby/
|
data/Rakefile
CHANGED
@@ -2,120 +2,157 @@ require "bundler"
|
|
2
2
|
require "rubygems/package_task"
|
3
3
|
require "fileutils"
|
4
4
|
|
5
|
-
GEMFILES = %w[
|
6
|
-
capistrano2
|
7
|
-
capistrano3
|
8
|
-
grape
|
9
|
-
no_dependencies
|
10
|
-
padrino
|
11
|
-
rails-3.2
|
12
|
-
rails-4.0
|
13
|
-
rails-4.1
|
14
|
-
rails-4.2
|
15
|
-
rails-5.0
|
16
|
-
resque
|
17
|
-
sequel
|
18
|
-
sequel-435
|
19
|
-
sinatra
|
20
|
-
grape
|
21
|
-
webmachine
|
22
|
-
que
|
23
|
-
].freeze
|
24
|
-
|
25
|
-
RUBY_VERSIONS = %w[
|
26
|
-
2.0.0-p648
|
27
|
-
2.1.8
|
28
|
-
2.2.4
|
29
|
-
2.3.0
|
30
|
-
2.4.0
|
31
|
-
].freeze
|
32
|
-
|
33
|
-
EXCLUSIONS = {
|
34
|
-
"rails-5.0" => %w[2.0.0 2.1.8]
|
35
|
-
}.freeze
|
36
|
-
|
37
5
|
VERSION_MANAGERS = {
|
38
|
-
:
|
39
|
-
|
6
|
+
:chruby => {
|
7
|
+
:env => "#!/bin/bash\nsource /usr/local/opt/chruby/share/chruby/chruby.sh",
|
8
|
+
:switch_command => lambda { |version| "chruby #{version}" }
|
9
|
+
},
|
10
|
+
:rbenv => {
|
11
|
+
:env => "#!/bin/bash",
|
12
|
+
:switch_command => lambda { |version| "rbenv local #{version}" }
|
13
|
+
},
|
14
|
+
:rvm => {
|
15
|
+
:env => "#!/bin/bash --login",
|
16
|
+
:switch_command => lambda { |version| "rvm use --default #{version}" }
|
17
|
+
}
|
40
18
|
}.freeze
|
41
19
|
|
42
|
-
namespace :
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
20
|
+
namespace :build_matrix do
|
21
|
+
namespace :travis do
|
22
|
+
task :generate do
|
23
|
+
yaml = YAML.load_file("build_matrix.yml")
|
24
|
+
matrix = yaml["matrix"]
|
25
|
+
defaults = matrix["defaults"]
|
26
|
+
|
27
|
+
builds = []
|
28
|
+
matrix["ruby"].each do |ruby|
|
29
|
+
ruby_version = ruby["ruby"]
|
30
|
+
gemset_for_ruby(ruby, matrix).each do |gem|
|
31
|
+
next if excluded_for_ruby?(gem, ruby)
|
32
|
+
|
33
|
+
env = ""
|
34
|
+
rubygems = gem["rubygems"] || ruby["rubygems"] || defaults["rubygems"]
|
35
|
+
env = "_RUBYGEMS_VERSION=#{rubygems}" if rubygems
|
36
|
+
bundler = gem["bundler"] || ruby["bundler"] || defaults["bundler"]
|
37
|
+
env += " _BUNDLER_VERSION=#{bundler}" if bundler
|
38
|
+
|
39
|
+
builds << {
|
40
|
+
"rvm" => ruby_version,
|
41
|
+
"gemfile" => "gemfiles/#{gem["gem"]}.gemfile",
|
42
|
+
"env" => env
|
43
|
+
}
|
44
|
+
end
|
45
|
+
end
|
46
|
+
travis = yaml["travis"]
|
47
|
+
travis["matrix"]["include"] = travis["matrix"]["include"] + builds
|
48
|
+
|
49
|
+
header = "# DO NOT EDIT\n" \
|
50
|
+
"# This is a generated file by the `rake build_matrix:travis:generate` task.\n" \
|
51
|
+
"# See `build_matrix.yml` for the build matrix.\n" \
|
52
|
+
"# Generate this file with `rake build_matrix:travis:generate`.\n"
|
53
|
+
generated_yaml = header + YAML.dump(travis)
|
54
|
+
File.write(".travis.yml", generated_yaml)
|
55
|
+
puts "Generated `.travis.yml`"
|
56
|
+
puts "Build count: #{builds.length}"
|
57
|
+
end
|
48
58
|
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
59
|
+
task :validate => :generate do
|
60
|
+
`git status | grep .travis.yml 2>&1`
|
61
|
+
if $?.exitstatus.zero? # rubocop:disable Style/SpecialGlobalVars
|
62
|
+
puts "The `.travis.yml` is modified. The changes were not committed."
|
63
|
+
puts "Please run `rake build_matrix:travis:generate` and commit the changes."
|
64
|
+
exit 1
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
68
|
+
|
69
|
+
namespace :local do
|
70
|
+
task :generate do
|
71
|
+
yaml = YAML.load_file("build_matrix.yml")
|
72
|
+
matrix = yaml["matrix"]
|
73
|
+
defaults = matrix["defaults"]
|
74
|
+
|
75
|
+
VERSION_MANAGERS.each do |version_manager, config|
|
76
|
+
out = []
|
77
|
+
out << config[:env]
|
78
|
+
out << "rm -f .ruby-version"
|
79
|
+
out << "echo 'Using #{version_manager}'"
|
80
|
+
matrix["ruby"].each do |ruby|
|
81
|
+
ruby_version = ruby["ruby"]
|
82
|
+
out << "echo 'Switching to #{ruby_version}'"
|
83
|
+
out << "#{config[:switch_command].call(ruby_version)} || { echo 'Switching Ruby failed'; exit 1; }"
|
84
|
+
out << "ruby -v"
|
85
|
+
out << "echo 'Compiling extension'"
|
86
|
+
out << "./support/bundler_wrapper exec rake extension:install"
|
87
|
+
out << "rm -f gemfiles/*.gemfile.lock"
|
88
|
+
gemset_for_ruby(ruby, matrix).each do |gem|
|
89
|
+
next if excluded_for_ruby?(gem, ruby)
|
90
|
+
gemfile = gem["gem"]
|
91
|
+
out << "echo 'Bundling #{gemfile} in #{ruby_version}'"
|
92
|
+
rubygems = gem["rubygems"] || ruby["rubygems"] || defaults["rubygems"]
|
93
|
+
rubygems_version = "env _RUBYGEMS_VERSION=#{rubygems_version}" if rubygems
|
94
|
+
bundler = gem["bundler"] || ruby["bundler"] || defaults["bundler"]
|
95
|
+
bundler_version = "env _BUNDLER_VERSION=#{bundler}" if bundler
|
96
|
+
gemfile_env = "env BUNDLE_GEMFILE=gemfiles/#{gemfile}.gemfile"
|
97
|
+
out << "#{bundler_version} #{rubygems_version} ./support/install_deps"
|
98
|
+
out << "#{bundler_version} #{gemfile_env} ./support/bundler_wrapper install --quiet || { echo 'Bundling failed'; exit 1; }"
|
99
|
+
out << "echo 'Running #{gemfile} in #{ruby_version}'"
|
100
|
+
out << "#{bundler_version} #{gemfile_env} ./support/bundler_wrapper exec rspec || { echo 'Running specs failed'; exit 1; }"
|
101
|
+
end
|
102
|
+
out << ""
|
103
|
+
end
|
104
|
+
out << "rm -f .ruby-version"
|
105
|
+
out << "echo 'Successfully ran specs for all environments'"
|
106
|
+
|
107
|
+
script = "bundle_and_spec_all_#{version_manager}"
|
108
|
+
FileUtils.rm_f(script)
|
109
|
+
File.open(script, "w") do |file|
|
110
|
+
file.write out.join("\n")
|
60
111
|
end
|
61
|
-
|
62
|
-
|
63
|
-
next if (gem.dig("exclude", "ruby") || []).include?(ruby_version)
|
64
|
-
|
65
|
-
env = ""
|
66
|
-
rubygems = gem["rubygems"] || ruby["rubygems"] || defaults["rubygems"]
|
67
|
-
env = "_RUBYGEMS_VERSION=#{rubygems}" if rubygems
|
68
|
-
bundler = gem["bundler"] || ruby["bundler"] || defaults["bundler"]
|
69
|
-
env += " _BUNDLER_VERSION=#{bundler}" if bundler
|
70
|
-
|
71
|
-
builds << {
|
72
|
-
"rvm" => ruby_version,
|
73
|
-
"gemfile" => "gemfiles/#{gem["gem"]}.gemfile",
|
74
|
-
"env" => env
|
75
|
-
}
|
112
|
+
File.chmod(0o775, script)
|
113
|
+
puts "Generated #{script}"
|
76
114
|
end
|
77
115
|
end
|
78
|
-
travis = yaml["travis"]
|
79
|
-
travis["matrix"]["include"] = travis["matrix"]["include"] + builds
|
80
|
-
|
81
|
-
header = "# DO NOT EDIT\n" \
|
82
|
-
"# This is a generated file by the `rake travis:generate` task.\n" \
|
83
|
-
"# See `build_matrix.yml` for the build matrix.\n" \
|
84
|
-
"# Generate this file with `rake travis:generate`.\n"
|
85
|
-
generated_yaml = header + YAML.dump(travis)
|
86
|
-
File.write(".travis.yml", generated_yaml)
|
87
|
-
puts "Generated `.travis.yml`"
|
88
|
-
puts "Build count: #{builds.length}"
|
89
116
|
end
|
90
117
|
|
91
|
-
|
92
|
-
|
93
|
-
if
|
94
|
-
|
95
|
-
|
96
|
-
|
118
|
+
def gemset_for_ruby(ruby, matrix)
|
119
|
+
gems = matrix["gems"]
|
120
|
+
if ruby["gems"]
|
121
|
+
# Only a specific gemset for this Ruby
|
122
|
+
selected_gems = matrix["gemsets"].fetch(ruby["gems"])
|
123
|
+
gems.select { |g| selected_gems.include?(g["gem"]) }
|
124
|
+
else
|
125
|
+
# All gems for this Ruby
|
126
|
+
gems
|
97
127
|
end
|
98
128
|
end
|
129
|
+
|
130
|
+
def excluded_for_ruby?(gem, ruby)
|
131
|
+
(gem.dig("exclude", "ruby") || []).include?(ruby["ruby"])
|
132
|
+
end
|
99
133
|
end
|
100
134
|
|
101
135
|
namespace :build do
|
136
|
+
def base_gemspec
|
137
|
+
eval(File.read("appsignal.gemspec")) # rubocop:disable Security/Eval
|
138
|
+
end
|
139
|
+
|
102
140
|
def modify_base_gemspec
|
103
|
-
|
141
|
+
base_gemspec.tap do |s|
|
104
142
|
yield s
|
105
143
|
end
|
106
144
|
end
|
107
145
|
|
108
146
|
namespace :ruby do
|
109
|
-
|
110
|
-
|
111
|
-
end
|
112
|
-
|
113
|
-
Gem::PackageTask.new(spec) { |_pkg| }
|
147
|
+
# Extension default set in `appsignal.gemspec`
|
148
|
+
Gem::PackageTask.new(base_gemspec) { |_pkg| }
|
114
149
|
end
|
115
150
|
|
116
151
|
namespace :jruby do
|
117
152
|
spec = modify_base_gemspec do |s|
|
118
153
|
s.platform = "java"
|
154
|
+
# Override extensions config with JRuby extension installer
|
155
|
+
# Default set in `appsignal.gemspec`
|
119
156
|
s.extensions = %w[ext/Rakefile]
|
120
157
|
s.add_dependency "ffi"
|
121
158
|
end
|
@@ -177,7 +214,7 @@ namespace :publish do
|
|
177
214
|
Dir.chdir("#{File.dirname(__FILE__)}/pkg") do
|
178
215
|
Dir["*.gem"].each do |gem_package|
|
179
216
|
puts "## Publishing gem package: #{gem_package}"
|
180
|
-
|
217
|
+
system "gem push #{gem_package}"
|
181
218
|
end
|
182
219
|
end
|
183
220
|
end
|
@@ -231,44 +268,6 @@ task :spec_all_gemfiles do
|
|
231
268
|
end
|
232
269
|
end
|
233
270
|
|
234
|
-
task :generate_bundle_and_spec_all do
|
235
|
-
VERSION_MANAGERS.each do |version_manager, switch_command|
|
236
|
-
out = []
|
237
|
-
out << if version_manager == :rvm
|
238
|
-
"#!/bin/bash --login"
|
239
|
-
else
|
240
|
-
"#!/bin/sh"
|
241
|
-
end
|
242
|
-
out << "rm -f .ruby-version"
|
243
|
-
out << "echo 'Using #{version_manager}'"
|
244
|
-
RUBY_VERSIONS.each do |version|
|
245
|
-
short_version = version.split("-").first
|
246
|
-
out << "echo 'Switching to #{short_version}'"
|
247
|
-
out << "#{switch_command.call(version)} || { echo 'Switching Ruby failed'; exit 1; }"
|
248
|
-
out << "ruby -v"
|
249
|
-
out << "echo 'Compiling extension'"
|
250
|
-
out << "cd ext && rm -f appsignal-agent appsignal_extension.bundle appsignal.h libappsignal.a Makefile && ruby extconf.rb && make && cd .."
|
251
|
-
GEMFILES.each do |gemfile|
|
252
|
-
next if EXCLUSIONS[gemfile] && EXCLUSIONS[gemfile].include?(short_version)
|
253
|
-
out << "echo 'Bundling #{gemfile} in #{short_version}'"
|
254
|
-
out << "bundle --quiet --gemfile gemfiles/#{gemfile}.gemfile || { echo 'Bundling failed'; exit 1; }"
|
255
|
-
out << "echo 'Running #{gemfile} in #{short_version}'"
|
256
|
-
out << "env BUNDLE_GEMFILE=gemfiles/#{gemfile}.gemfile bundle exec rspec || { echo 'Running specs failed'; exit 1; }"
|
257
|
-
end
|
258
|
-
end
|
259
|
-
out << "rm -f .ruby-version"
|
260
|
-
out << "echo 'Successfully ran specs for all environments'"
|
261
|
-
|
262
|
-
script = "bundle_and_spec_all_#{version_manager}"
|
263
|
-
FileUtils.rm_f(script)
|
264
|
-
File.open(script, "w") do |file|
|
265
|
-
file.write out.join("\n")
|
266
|
-
end
|
267
|
-
File.chmod(0o775, script)
|
268
|
-
puts "Generated #{script}"
|
269
|
-
end
|
270
|
-
end
|
271
|
-
|
272
271
|
task :console do
|
273
272
|
require "irb"
|
274
273
|
require "irb/completion"
|
@@ -300,7 +299,7 @@ namespace :extension do
|
|
300
299
|
appsignal_extension.o \
|
301
300
|
appsignal_extension.so \
|
302
301
|
appsignal_extension.bundle \
|
303
|
-
install.
|
302
|
+
install.report \
|
304
303
|
libappsignal.* \
|
305
304
|
appsignal.version \
|
306
305
|
Makefile \
|
data/SUPPORT.md
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
# Support
|
2
|
+
|
3
|
+
[Contact us][contact] and speak directly with the engineers working on
|
4
|
+
AppSignal. They will help you get set up, tweak your code and make sure you get
|
5
|
+
the most out of using AppSignal. You can also find our documentation at
|
6
|
+
[docs.appsignal.com](https://docs.appsignal.com/).
|
7
|
+
|
8
|
+
We do not recommend creating an issue on the Ruby gem's GitHub project if it
|
9
|
+
concerns your private app data. During the support process we'll need the
|
10
|
+
AppSignal logs and other resources that contain your app's private data,
|
11
|
+
something for which the public GitHub issue tracker is not suited.
|
12
|
+
|
13
|
+
Please contact us on our website [appsignal.com](https://appsignal.com/) or via
|
14
|
+
email at [support@appsignal.com][contact].
|
15
|
+
|
16
|
+
[contact]: mailto:support@appsignal.com
|
data/appsignal.gemspec
CHANGED
@@ -2,10 +2,11 @@
|
|
2
2
|
|
3
3
|
require File.expand_path("../lib/appsignal/version", __FILE__)
|
4
4
|
|
5
|
-
Gem::Specification.new do |gem|
|
5
|
+
Gem::Specification.new do |gem| # rubocop:disable Metrics/BlockLength
|
6
6
|
gem.authors = [
|
7
7
|
"Robert Beekman",
|
8
|
-
"Thijs Cadier"
|
8
|
+
"Thijs Cadier",
|
9
|
+
"Tom de Bruijn"
|
9
10
|
]
|
10
11
|
gem.email = ["support@appsignal.com"]
|
11
12
|
gem.description = "The official appsignal.com gem"
|
@@ -21,14 +22,26 @@ Gem::Specification.new do |gem|
|
|
21
22
|
gem.require_paths = %w[lib ext]
|
22
23
|
gem.version = Appsignal::VERSION
|
23
24
|
gem.required_ruby_version = ">= 1.9"
|
25
|
+
# Default extension installer. Overridden by JRuby gemspec as defined in
|
26
|
+
# `Rakefile`.
|
27
|
+
gem.extensions = %w[ext/extconf.rb]
|
28
|
+
|
29
|
+
gem.metadata = {
|
30
|
+
"bug_tracker_uri" => "https://github.com/appsignal/appsignal-ruby/issues",
|
31
|
+
"changelog_uri" =>
|
32
|
+
"https://github.com/appsignal/appsignal-ruby/blob/master/CHANGELOG.md",
|
33
|
+
"documentation_uri" => "https://docs.appsignal.com/ruby/",
|
34
|
+
"homepage_uri" => "https://docs.appsignal.com/ruby/",
|
35
|
+
"source_code_uri" => "https://github.com/appsignal/appsignal-ruby"
|
36
|
+
}
|
24
37
|
|
25
38
|
gem.add_dependency "rack"
|
26
39
|
|
27
40
|
gem.add_development_dependency "rake", "~> 11"
|
28
|
-
gem.add_development_dependency "rspec", "~> 3.
|
41
|
+
gem.add_development_dependency "rspec", "~> 3.8"
|
29
42
|
gem.add_development_dependency "pry"
|
30
43
|
gem.add_development_dependency "timecop"
|
31
44
|
gem.add_development_dependency "webmock"
|
32
45
|
gem.add_development_dependency "rubocop", "0.50.0"
|
33
|
-
gem.add_development_dependency "yard"
|
46
|
+
gem.add_development_dependency "yard", ">= 0.9.20"
|
34
47
|
end
|
data/build_matrix.yml
CHANGED
@@ -9,32 +9,33 @@ travis: # Default `.travis.yml` contents
|
|
9
9
|
language: ruby
|
10
10
|
cache:
|
11
11
|
directories:
|
12
|
-
- vendor/
|
12
|
+
- "$TRAVIS_BUILD_DIR/vendor/cache"
|
13
13
|
|
14
14
|
env:
|
15
15
|
global:
|
16
|
+
- "BUNDLE_PATH=$TRAVIS_BUILD_DIR/vendor/cache"
|
16
17
|
- "RUNNING_IN_CI=true"
|
17
18
|
- "RAILS_ENV=test"
|
18
19
|
- "JRUBY_OPTS=''" # Workaround https://github.com/travis-ci/travis-ci/issues/6471
|
19
20
|
|
20
21
|
before_install:
|
21
22
|
- "./support/install_deps"
|
22
|
-
install: "./support/bundler_wrapper install --jobs=3 --retry=3"
|
23
|
+
install: "./support/bundler_wrapper install --jobs=3 --retry=3 --path=${BUNDLE_PATH:-$TRAVIS_BUILD_DIR/vendor/cache}"
|
23
24
|
before_script:
|
24
25
|
- "./support/bundler_wrapper exec rake extension:install"
|
25
26
|
script: "./support/bundler_wrapper exec rake test"
|
26
27
|
after_failure:
|
27
|
-
- "find ./ext -name install.
|
28
|
+
- "find ./ext -name install.report -exec cat {} \\;"
|
28
29
|
- "find ./ext -name mkmf.log -exec cat {} \\;"
|
29
30
|
|
30
31
|
matrix:
|
31
32
|
fast_finish: true
|
32
33
|
include: # Builds based on the matrix below are added to this list
|
33
|
-
- rvm: "2.6.
|
34
|
+
- rvm: "2.6.4"
|
34
35
|
gemfile: "gemfiles/no_dependencies.gemfile"
|
35
36
|
before_script: "" # Unset default: No need to install the extension
|
36
37
|
script:
|
37
|
-
- "./support/bundler_wrapper exec rake travis:validate"
|
38
|
+
- "./support/bundler_wrapper exec rake build_matrix:travis:validate"
|
38
39
|
- "./support/bundler_wrapper exec rubocop"
|
39
40
|
|
40
41
|
matrix:
|
@@ -47,7 +48,6 @@ matrix:
|
|
47
48
|
- "no_dependencies"
|
48
49
|
minimal:
|
49
50
|
- "no_dependencies"
|
50
|
-
- "rails-4.2"
|
51
51
|
- "rails-5.2"
|
52
52
|
|
53
53
|
ruby:
|
@@ -65,7 +65,7 @@ matrix:
|
|
65
65
|
gems: "none"
|
66
66
|
- ruby: "2.5.3"
|
67
67
|
gems: "minimal"
|
68
|
-
- ruby: "2.6.
|
68
|
+
- ruby: "2.6.4"
|
69
69
|
- ruby: "jruby-19mode"
|
70
70
|
gems: "minimal"
|
71
71
|
gems:
|
@@ -76,16 +76,20 @@ matrix:
|
|
76
76
|
- gem: "padrino"
|
77
77
|
bundler: "1.17.3"
|
78
78
|
- gem: "que"
|
79
|
+
- gem: "que_beta"
|
80
|
+
exclude:
|
81
|
+
ruby:
|
82
|
+
- "2.0.0"
|
79
83
|
- gem: "rails-3.2"
|
80
84
|
bundler: "1.17.3"
|
81
85
|
exclude:
|
82
86
|
ruby:
|
83
|
-
- "2.6.
|
87
|
+
- "2.6.4"
|
84
88
|
- gem: "rails-4.2"
|
85
89
|
bundler: "1.17.3"
|
86
90
|
exclude:
|
87
91
|
ruby:
|
88
|
-
- "2.6.
|
92
|
+
- "2.6.4"
|
89
93
|
- gem: "rails-5.0"
|
90
94
|
exclude:
|
91
95
|
ruby:
|
@@ -98,6 +102,14 @@ matrix:
|
|
98
102
|
exclude:
|
99
103
|
ruby:
|
100
104
|
- "2.0.0"
|
105
|
+
- gem: "rails-6.0"
|
106
|
+
exclude:
|
107
|
+
ruby:
|
108
|
+
- "2.0.0"
|
109
|
+
- "2.1.8"
|
110
|
+
- "2.2.4"
|
111
|
+
- "2.3.8"
|
112
|
+
- "2.4.5"
|
101
113
|
- gem: "resque"
|
102
114
|
bundler: "1.17.3"
|
103
115
|
- gem: "sequel"
|