appsignal 2.10.3 → 2.10.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 2.10.4
4
+ - Fix `Appsignal::Transaction#set_http_or_background_action` helper (used by
5
+ `Appsignal.monitor_transaction`), to allow overwriting the action name of a
6
+ `Transaction` with `Appsignal.set_action`. PR #594
7
+ - Move build to Semaphore. PR #587, #590 and #592
8
+
3
9
  ## 2.10.3
4
10
  - Only warn about reused transactions once. Repeated occurrences are logged as
5
11
  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,89 @@ 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("BUNDLE_GEMFILE", "gemfiles/#{gem["gem"]}.gemfile")
63
+ ]
34
64
  rubygems = gem["rubygems"] || ruby["rubygems"] || defaults["rubygems"]
35
- env = "_RUBYGEMS_VERSION=#{rubygems}" if rubygems
65
+ env << env_map("_RUBYGEMS_VERSION", rubygems) if rubygems
36
66
  bundler = gem["bundler"] || ruby["bundler"] || defaults["bundler"]
37
- env += " _BUNDLER_VERSION=#{bundler}" if bundler
67
+ env << env_map("_BUNDLER_VERSION", bundler) if bundler
38
68
 
39
- builds << {
40
- "rvm" => ruby_version,
41
- "gemfile" => "gemfiles/#{gem["gem"]}.gemfile",
42
- "env" => env
69
+ job = {
70
+ "name" => "Ruby #{ruby_version} for #{gem["gem"]}",
71
+ "env_vars" => env,
72
+ "commands" => ["./support/bundler_wrapper exec rake test"]
43
73
  }
74
+ if gem["gem"] == "no_dependencies"
75
+ ruby_primary_block["task"]["jobs"] << job
76
+ else
77
+ ruby_secondary_block["task"]["jobs"] << job
78
+ end
79
+ end
80
+ builds << ruby_primary_block
81
+ if ruby_secondary_block["task"]["jobs"].count.nonzero?
82
+ builds << ruby_secondary_block
44
83
  end
45
84
  end
46
- travis = yaml["travis"]
47
- travis["matrix"]["include"] = travis["matrix"]["include"] + builds
85
+ semaphore["blocks"] += builds
48
86
 
49
87
  header = "# DO NOT EDIT\n" \
50
- "# This is a generated file by the `rake build_matrix:travis:generate` task.\n" \
88
+ "# This is a generated file by the `rake build_matrix:semaphore:generate` task.\n" \
51
89
  "# 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}"
90
+ "# Generate this file with `rake build_matrix:semaphore:generate`.\n"
91
+ generated_yaml = header + YAML.dump(semaphore)
92
+ File.write(".semaphore/semaphore.yml", generated_yaml)
93
+ puts "Generated `.semaphore/semaphore.yml`"
94
+ puts "Task count: #{builds.length}"
95
+ puts "Job count: #{builds.sum { |block| block["task"]["jobs"].count }}"
57
96
  end
58
97
 
59
98
  task :validate => :generate do
60
- `git status | grep .travis.yml 2>&1`
99
+ `git status | grep .semaphore/semaphore.yml 2>&1`
61
100
  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."
101
+ puts "The `.semaphore/semaphore.yml` is modified. The changes were not committed."
102
+ puts "Please run `rake build_matrix:semaphore:generate` and commit the changes."
64
103
  exit 1
65
104
  end
66
105
  end
@@ -318,7 +357,7 @@ namespace :extension do
318
357
  appsignal.version \
319
358
  Makefile \
320
359
  mkmf.log
321
- COMMAND
360
+ COMMAND
322
361
  end
323
362
  end
324
363
 
@@ -1,42 +1,74 @@
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-$(checksum $BUNDLE_GEMFILE),$_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-$(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: BUNDLE_GEMFILE
57
+ value: gemfiles/no_dependencies.gemfile
58
+ commands:
59
+ - ./support/bundler_wrapper exec rake build_matrix:semaphore:validate
60
+ - name: Linters
61
+ dependencies: []
62
+ task:
63
+ jobs:
64
+ - name: RuboCop
65
+ env_vars:
66
+ - name: RUBY_VERSION
67
+ value: 2.6.5
68
+ - name: BUNDLE_GEMFILE
69
+ value: gemfiles/no_dependencies.gemfile
70
+ commands:
71
+ - ./support/bundler_wrapper exec rubocop
40
72
 
41
73
  matrix:
42
74
  defaults:
@@ -51,23 +83,26 @@ matrix:
51
83
  - "rails-5.2"
52
84
 
53
85
  ruby:
54
- - ruby: "2.0.0"
86
+ - ruby: "2.0.0-p648"
55
87
  rubygems: "2.7.8"
56
- - ruby: "2.1.8"
88
+ bundler: "1.17.3"
89
+ - ruby: "2.1.10"
57
90
  rubygems: "2.7.8"
91
+ bundler: "1.17.3"
58
92
  gems: "none"
59
- - ruby: "2.2.4"
93
+ - ruby: "2.2.10"
60
94
  rubygems: "2.7.8"
95
+ bundler: "1.17.3"
61
96
  gems: "none"
62
97
  - ruby: "2.3.8"
63
98
  gems: "none"
64
- - ruby: "2.4.5"
99
+ - ruby: "2.4.9"
65
100
  gems: "none"
66
- - ruby: "2.5.3"
101
+ - ruby: "2.5.7"
67
102
  gems: "minimal"
68
103
  - ruby: "2.6.5"
69
104
  - ruby: "2.7.0"
70
- - ruby: "jruby-19mode"
105
+ - ruby: "jruby-9.1.17.0"
71
106
  gems: "minimal"
72
107
  gems:
73
108
  - gem: "no_dependencies"
@@ -80,7 +115,7 @@ matrix:
80
115
  - gem: "que_beta"
81
116
  exclude:
82
117
  ruby:
83
- - "2.0.0"
118
+ - "2.0.0-p648"
84
119
  - gem: "rails-3.2"
85
120
  bundler: "1.17.3"
86
121
  exclude:
@@ -96,23 +131,23 @@ matrix:
96
131
  - gem: "rails-5.0"
97
132
  exclude:
98
133
  ruby:
99
- - "2.0.0"
134
+ - "2.0.0-p648"
100
135
  - gem: "rails-5.1"
101
136
  exclude:
102
137
  ruby:
103
- - "2.0.0"
138
+ - "2.0.0-p648"
104
139
  - gem: "rails-5.2"
105
140
  exclude:
106
141
  ruby:
107
- - "2.0.0"
142
+ - "2.0.0-p648"
108
143
  - gem: "rails-6.0"
109
144
  exclude:
110
145
  ruby:
111
- - "2.0.0"
112
- - "2.1.8"
113
- - "2.2.4"
146
+ - "2.0.0-p648"
147
+ - "2.1.10"
148
+ - "2.2.10"
114
149
  - "2.3.8"
115
- - "2.4.5"
150
+ - "2.4.9"
116
151
  - gem: "resque"
117
152
  bundler: "1.17.3"
118
153
  - 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 => '../'
@@ -2,10 +2,5 @@ source 'https://rubygems.org'
2
2
 
3
3
  gem 'rails', '~> 3.2.14'
4
4
  gem 'test-unit'
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 => '../'
@@ -2,10 +2,5 @@ source 'https://rubygems.org'
2
2
 
3
3
  gem 'rails', '~> 4.0.0'
4
4
  gem 'mime-types', '~> 2.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 => '../'
@@ -2,10 +2,5 @@ source 'https://rubygems.org'
2
2
 
3
3
  gem 'rails', '~> 4.1.0'
4
4
  gem 'mime-types', '~> 2.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 => '../'
@@ -8,8 +8,3 @@ gemspec :path => '../'
8
8
  if Gem::Version.new(RUBY_VERSION) < Gem::Version.new("2.1.0")
9
9
  gem 'nokogiri', '~> 1.6.0'
10
10
  end
11
- if Gem::Version.new(RUBY_VERSION) <= Gem::Version.new("2.1.0")
12
- gem 'public_suffix', "~> 2.0.0"
13
- else
14
- gem 'public_suffix'
15
- end