appsignal 2.10.3 → 2.10.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -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 Status](https://travis-ci.org/appsignal/appsignal-ruby.png?branch=master)](https://travis-ci.org/appsignal/appsignal-ruby)
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 :travis do
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 = "_RUBYGEMS_VERSION=#{rubygems}" if rubygems
66
+ env << env_map("_RUBYGEMS_VERSION", rubygems) if rubygems
36
67
  bundler = gem["bundler"] || ruby["bundler"] || defaults["bundler"]
37
- env += " _BUNDLER_VERSION=#{bundler}" if bundler
68
+ env << env_map("_BUNDLER_VERSION", bundler) if bundler
38
69
 
39
- builds << {
40
- "rvm" => ruby_version,
41
- "gemfile" => "gemfiles/#{gem["gem"]}.gemfile",
42
- "env" => env
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
- travis = yaml["travis"]
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:travis:generate` task.\n" \
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: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}"
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 .travis.yml 2>&1`
100
+ `git status | grep .semaphore/semaphore.yml 2>&1`
61
101
  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."
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
- COMMAND
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
@@ -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
@@ -1,42 +1,78 @@
1
- travis: # Default `.travis.yml` contents
2
- sudo: false
1
+ semaphore: # Default `.semaphore/semaphore.yml` contents
2
+ version: v1.0
3
+ name: AppSignal Ruby Build and Tests
3
4
 
4
- branches:
5
- only:
6
- - "master"
7
- - "develop"
5
+ agent:
6
+ machine:
7
+ type: e1-standard-2
8
+ os_image: ubuntu1804
8
9
 
9
- language: ruby
10
- cache:
11
- directories:
12
- - "$TRAVIS_BUILD_DIR/vendor/cache"
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
- env:
15
- global:
16
- - "BUNDLE_PATH=$TRAVIS_BUILD_DIR/vendor/cache"
17
- - "RUNNING_IN_CI=true"
18
- - "RAILS_ENV=test"
19
- - "JRUBY_OPTS=''" # Workaround https://github.com/travis-ci/travis-ci/issues/6471
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
- before_install:
22
- - "./support/install_deps"
23
- install: "./support/bundler_wrapper install --jobs=3 --retry=3 --path=${BUNDLE_PATH:-$TRAVIS_BUILD_DIR/vendor/cache}"
24
- before_script:
25
- - "./support/bundler_wrapper exec rake extension:install"
26
- script: "./support/bundler_wrapper exec rake test"
27
- after_failure:
28
- - "find ./ext -name install.report -exec cat {} \\;"
29
- - "find ./ext -name mkmf.log -exec cat {} \\;"
30
-
31
- matrix:
32
- fast_finish: true
33
- include: # Builds based on the matrix below are added to this list
34
- - rvm: "2.6.5"
35
- gemfile: "gemfiles/no_dependencies.gemfile"
36
- before_script: "" # Unset default: No need to install the extension
37
- script:
38
- - "./support/bundler_wrapper exec rake build_matrix:travis:validate"
39
- - "./support/bundler_wrapper exec rubocop"
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: "2.0.0"
91
+ - ruby: "1.9.3-p551"
55
92
  rubygems: "2.7.8"
56
- - ruby: "2.1.8"
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.4"
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.5"
108
+ - ruby: "2.4.9"
65
109
  gems: "none"
66
- - ruby: "2.5.3"
110
+ - ruby: "2.5.7"
67
111
  gems: "minimal"
68
112
  - ruby: "2.6.5"
69
113
  - ruby: "2.7.0"
70
- - ruby: "jruby-19mode"
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.8"
113
- - "2.2.4"
155
+ - "2.0.0-p648"
156
+ - "2.1.10"
157
+ - "2.2.10"
114
158
  - "2.3.8"
115
- - "2.4.5"
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 => '../'
@@ -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 => '../'
@@ -1,10 +1,5 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
3
  gem 'rack', '~> 1.6'
4
- if Gem::Version.new(RUBY_VERSION) <= Gem::Version.new("2.1.0")
5
- gem 'public_suffix', "~> 2.0.0"
6
- else
7
- gem 'public_suffix'
8
- end
9
4
 
10
5
  gemspec :path => '../'
@@ -2,10 +2,5 @@ source 'https://rubygems.org'
2
2
 
3
3
  gem 'padrino', '~> 0.13.0'
4
4
  gem 'rack', '~> 1.6'
5
- if Gem::Version.new(RUBY_VERSION) <= Gem::Version.new("2.1.0")
6
- gem 'public_suffix', "~> 2.0.0"
7
- else
8
- gem 'public_suffix'
9
- end
10
5
 
11
6
  gemspec :path => '../'
@@ -1,10 +1,5 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
3
  gem 'que'
4
- if Gem::Version.new(RUBY_VERSION) <= Gem::Version.new("2.1.0")
5
- gem 'public_suffix', "~> 2.0.0"
6
- else
7
- gem 'public_suffix'
8
- end
9
4
 
10
5
  gemspec :path => '../'
@@ -1,10 +1,5 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
3
  gem 'que', '1.0.0.beta3'
4
- if Gem::Version.new(RUBY_VERSION) <= Gem::Version.new("2.1.0")
5
- gem 'public_suffix', "~> 2.0.0"
6
- else
7
- gem 'public_suffix'
8
- end
9
4
 
10
5
  gemspec :path => '../'