appsignal 3.0.0.rc.1 → 3.0.4.alpha.1

Sign up to get free protection for your applications and to get access to all the features.
data/spec/spec_helper.rb CHANGED
@@ -117,6 +117,28 @@ RSpec.configure do |config|
117
117
  allow(Appsignal::Config).to receive(:system_tmp_dir).and_return(spec_system_tmp_dir)
118
118
  end
119
119
 
120
+ # These tests are not run by default. They require a failed extension
121
+ # installation. See the `rake test:failure` task. If a test with this tag was
122
+ # run, run `rake extension:install` again to fix the extension installation
123
+ # before running other tests.
124
+ config.before :extension_installation_failure => true do
125
+ next unless Appsignal.extension_loaded?
126
+
127
+ raise "Extension is loaded, please run the following task and rerun the test." \
128
+ "\n\n rake test:prepare_failure"
129
+ end
130
+
131
+ # Check to see if the extension is loaded before running the specs. If the
132
+ # extension is not loaded it can result in unexpected behavior.
133
+ config.before do |example|
134
+ next if Appsignal.extension_loaded?
135
+ next if example.metadata[:extension_installation_failure]
136
+
137
+ puts "\nWARNING: The AppSignal extension is not loaded, please run the "\
138
+ "following task and rerun the test." \
139
+ "\n\n rake extension:install\n"
140
+ end
141
+
120
142
  config.after do
121
143
  Appsignal::Testing.clear!
122
144
  clear_current_transaction!
@@ -1,16 +1,26 @@
1
1
  module Appsignal
2
2
  class << self
3
+ attr_writer :testing
3
4
  remove_method :testing?
4
5
 
5
6
  # @api private
6
7
  def testing?
7
- true
8
+ @testing = true unless defined?(@testing)
9
+ @testing
8
10
  end
9
11
  end
10
12
 
11
13
  # @api private
12
14
  module Testing
13
15
  class << self
16
+ def without_testing
17
+ original_testing = Appsignal.testing?
18
+ Appsignal.testing = false
19
+ yield
20
+ ensure
21
+ Appsignal.testing = original_testing
22
+ end
23
+
14
24
  def transactions
15
25
  @transactions ||= []
16
26
  end
data/support/install_deps CHANGED
@@ -2,25 +2,26 @@
2
2
 
3
3
  set -eu
4
4
 
5
- gem_args="--no-verbose"
6
- if [[ $(ruby --version) != "ruby 1.9.3"* ]]; then
7
- gem_args+=" --no-document"
8
- fi
5
+ gem_args="--no-verbose --no-document"
9
6
 
10
7
  case "${_RUBYGEMS_VERSION-"latest"}" in
11
8
  "latest")
12
- gem update $gem_args --system
9
+ echo "Updating rubygems"
10
+ retry --times 5 --sleep 5 gem update $gem_args --system
13
11
  ;;
14
12
  *)
15
- gem update $gem_args --system $_RUBYGEMS_VERSION
13
+ echo "Updating rubygems to $_RUBYGEMS_VERSION}"
14
+ retry --times 5 --sleep 5 gem update $gem_args --system $_RUBYGEMS_VERSION
16
15
  ;;
17
16
  esac
18
17
 
19
18
  case "${_BUNDLER_VERSION-"latest"}" in
20
19
  "latest")
21
- gem update bundler $gem_args
20
+ echo "Updating bundler"
21
+ retry --times 5 --sleep 5 gem update bundler $gem_args
22
22
  ;;
23
23
  *)
24
- gem install bundler $gem_args --version $_BUNDLER_VERSION
24
+ echo "Updating bundler to $_BUNDLER_VERSION"
25
+ retry --times 5 --sleep 5 gem install bundler $gem_args --version $_BUNDLER_VERSION
25
26
  ;;
26
27
  esac
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: appsignal
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0.rc.1
4
+ version: 3.0.4.alpha.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robert Beekman
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2021-02-23 00:00:00.000000000 Z
13
+ date: 2021-04-23 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rack
@@ -165,8 +165,6 @@ files:
165
165
  - gemfiles/que.gemfile
166
166
  - gemfiles/que_beta.gemfile
167
167
  - gemfiles/rails-3.2.gemfile
168
- - gemfiles/rails-4.0.gemfile
169
- - gemfiles/rails-4.1.gemfile
170
168
  - gemfiles/rails-4.2.gemfile
171
169
  - gemfiles/rails-5.0.gemfile
172
170
  - gemfiles/rails-5.1.gemfile
@@ -413,7 +411,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
413
411
  - !ruby/object:Gem::Version
414
412
  version: 1.3.1
415
413
  requirements: []
416
- rubygems_version: 3.2.8
414
+ rubygems_version: 3.2.16
417
415
  signing_key:
418
416
  specification_version: 4
419
417
  summary: Logs performance and exception data from your app to appsignal.com
@@ -1,6 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- gem 'rails', '~> 4.0.0'
4
- gem 'mime-types', '~> 2.6'
5
-
6
- gemspec :path => '../'
@@ -1,6 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- gem 'rails', '~> 4.1.0'
4
- gem 'mime-types', '~> 2.6'
5
-
6
- gemspec :path => '../'