appsignal 1.3.1 → 1.3.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (36) hide show
  1. checksums.yaml +4 -4
  2. data/.rspec +1 -1
  3. data/CHANGELOG.md +5 -1
  4. data/README.md +21 -6
  5. data/Rakefile +7 -3
  6. data/ext/extconf.rb +3 -3
  7. data/lib/appsignal.rb +15 -4
  8. data/lib/appsignal/cli.rb +2 -1
  9. data/lib/appsignal/cli/diagnose.rb +2 -2
  10. data/lib/appsignal/cli/install.rb +1 -1
  11. data/lib/appsignal/config.rb +1 -1
  12. data/lib/appsignal/hooks.rb +5 -1
  13. data/lib/appsignal/transaction.rb +18 -1
  14. data/lib/appsignal/version.rb +1 -1
  15. data/spec/lib/appsignal/auth_check_spec.rb +3 -6
  16. data/spec/lib/appsignal/cli/install_spec.rb +4 -4
  17. data/spec/lib/appsignal/config_spec.rb +37 -37
  18. data/spec/lib/appsignal/event_formatter/action_view/render_formatter_spec.rb +3 -3
  19. data/spec/lib/appsignal/event_formatter/active_record/instantiation_formatter_spec.rb +1 -1
  20. data/spec/lib/appsignal/event_formatter/active_record/sql_formatter_spec.rb +1 -1
  21. data/spec/lib/appsignal/event_formatter/faraday/request_formatter_spec.rb +1 -1
  22. data/spec/lib/appsignal/event_formatter/moped/query_formatter_spec.rb +7 -7
  23. data/spec/lib/appsignal/event_formatter_spec.rb +4 -4
  24. data/spec/lib/appsignal/hooks/redis_spec.rb +1 -1
  25. data/spec/lib/appsignal/hooks/sidekiq_spec.rb +1 -1
  26. data/spec/lib/appsignal/hooks_spec.rb +13 -13
  27. data/spec/lib/appsignal/integrations/mongo_ruby_driver_spec.rb +1 -1
  28. data/spec/lib/appsignal/integrations/railtie_spec.rb +6 -6
  29. data/spec/lib/appsignal/integrations/webmachine_spec.rb +1 -1
  30. data/spec/lib/appsignal/rack/rails_instrumentation_spec.rb +2 -2
  31. data/spec/lib/appsignal/subscriber_spec.rb +4 -4
  32. data/spec/lib/appsignal/transaction_spec.rb +44 -25
  33. data/spec/lib/appsignal/transmitter_spec.rb +9 -9
  34. data/spec/lib/appsignal/utils_spec.rb +2 -2
  35. data/spec/lib/appsignal_spec.rb +14 -15
  36. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 784e01920b654bb8c9e2417134582ef21318e6c6
4
- data.tar.gz: 6da2c1a6e0bd86121685e79c486a51e0fd70dbc1
3
+ metadata.gz: ec2efb96b788112eddc36f06d1a5b08ded6102ec
4
+ data.tar.gz: 14c8aea711a79ad90ce04ffce963fe19546f2b84
5
5
  SHA512:
6
- metadata.gz: d9fa11753a999fd738c89cbd339a8cfde6c1a7dacdb99ba393845048fe2c2862f573853075d7f9bd5a7b6aff191fc403b23d12f162c667b216c7ebf6720b729f
7
- data.tar.gz: a6faa33fdb59c8d5485d0fd20aa1d1924b78b60042cbbc822993b203791b3230c3af8c632049944af0fe0a45752ebd9891511be2c75f8e891e5ec4e7c031d13c
6
+ metadata.gz: c452757e1ac4c4db326810f1b2ed014fd5d185edde76eab088bd5ca761a90b1de532fde1807cd46bb9eba7c431ea3c2f3a0201a43644b4f966d0e934971d0b05
7
+ data.tar.gz: 513c9907c8be8a26f07ef98d34f5840567e7bfdf4243f3dab6fdc88cea9e9b247ec6949459bca60cb9c6509544c95763f7347193532360f149872386f35eabd4
data/.rspec CHANGED
@@ -1 +1 @@
1
- --order default
1
+ --order default --warnings
@@ -1,4 +1,8 @@
1
- # 1.3.0
1
+ # 1.3.2
2
+ * Add method to discard a transaction
3
+ * Run spec suite with warnings, fixes for warnings
4
+
5
+ # 1.3.1
2
6
  * Bugfix for problem when requiring config from installer
3
7
 
4
8
  # 1.3.0
data/README.md CHANGED
@@ -10,26 +10,41 @@ applications and sends it to [AppSignal](https://appsignal.com)
10
10
 
11
11
  ## Development
12
12
 
13
- Run `rake install`, then run the spec suite with a specific Gemfile:
13
+ Make sure you have Bundler installed and then use the Rake install task to
14
+ install all other dependencies.
15
+
16
+ ```
17
+ gem install bundler
18
+ rake install
19
+ ```
20
+
21
+ AppSignal runs in many different configurations. To replicate these
22
+ configurations you need to run the spec suite with a specific Gemfile.
14
23
 
15
24
  ```
16
25
  BUNDLE_GEMFILE=gemfiles/capistrano2.gemfile bundle exec rspec
17
26
  BUNDLE_GEMFILE=gemfiles/capistrano3.gemfile bundle exec rspec
27
+ BUNDLE_GEMFILE=gemfiles/grape.gemfile bundle exec rspec
18
28
  BUNDLE_GEMFILE=gemfiles/no_dependencies.gemfile bundle exec rspec
19
29
  BUNDLE_GEMFILE=gemfiles/padrino.gemfile bundle exec rspec
20
- BUNDLE_GEMFILE=gemfiles/rails-3.0.gemfile bundle exec rspec
21
- BUNDLE_GEMFILE=gemfiles/rails-3.1.gemfile bundle exec rspec
22
30
  BUNDLE_GEMFILE=gemfiles/rails-3.2.gemfile bundle exec rspec
23
31
  BUNDLE_GEMFILE=gemfiles/rails-4.0.gemfile bundle exec rspec
24
32
  BUNDLE_GEMFILE=gemfiles/rails-4.1.gemfile bundle exec rspec
25
33
  BUNDLE_GEMFILE=gemfiles/rails-4.2.gemfile bundle exec rspec
34
+ BUNDLE_GEMFILE=gemfiles/rails-5.0.gemfile bundle exec rspec
35
+ BUNDLE_GEMFILE=gemfiles/resque.gemfile bundle exec rspec
36
+ BUNDLE_GEMFILE=gemfiles/sequel-435.gemfile bundle exec rspec
26
37
  BUNDLE_GEMFILE=gemfiles/sequel.gemfile bundle exec rspec
27
38
  BUNDLE_GEMFILE=gemfiles/sinatra.gemfile bundle exec rspec
39
+ BUNDLE_GEMFILE=gemfiles/webmachine.gemfile bundle exec rspec
28
40
  ```
29
41
 
30
- Or run `rake generate_bundle_and_spec_all` to generate a script that runs specs for all
31
- Ruby versions and gem combinations we support.
32
- You need Rvm or Rbenv to do this. Travis will run specs for these combinations as well.
42
+ If you have either Rvm or Rbenv installed you can also use
43
+ `rake generate_bundle_and_spec_all` to generate a script that runs specs for
44
+ all Ruby versions and gem combinations we support.
45
+
46
+ On Travis we run the suite against all of the Gemfiles mentioned above and on
47
+ a number of different Ruby versions.
33
48
 
34
49
  ## Branches and versions
35
50
 
data/Rakefile CHANGED
@@ -1,5 +1,4 @@
1
1
  require 'bundler'
2
- require 'rspec/core/rake_task'
3
2
 
4
3
  GEMFILES = %w(
5
4
  capistrano2
@@ -174,8 +173,13 @@ task :install_extension do
174
173
  `cd ext && rm -f libappsignal.a && ruby extconf.rb && make clean && make`
175
174
  end
176
175
 
177
- RSpec::Core::RakeTask.new(:rspec) do |t|
178
- t.pattern = Dir.glob('spec/**/*_spec.rb')
176
+ begin
177
+ require 'rspec/core/rake_task'
178
+ RSpec::Core::RakeTask.new(:rspec) do |t|
179
+ t.pattern = Dir.glob('spec/**/*_spec.rb')
180
+ end
181
+ rescue LoadError
182
+ # When running rake install, there is no RSpec yet.
179
183
  end
180
184
 
181
185
  task :travis => [:install_extension, :rspec]
@@ -47,9 +47,9 @@ def install
47
47
 
48
48
  arch_config = AGENT_CONFIG['triples'][ARCH]
49
49
 
50
- unless File.exists?(ext_path('appsignal-agent')) &&
51
- File.exists?(ext_path('libappsignal.a')) &&
52
- File.exists?(ext_path('appsignal_extension.h'))
50
+ unless File.exist?(ext_path('appsignal-agent')) &&
51
+ File.exist?(ext_path('libappsignal.a')) &&
52
+ File.exist?(ext_path('appsignal_extension.h'))
53
53
  logger.info "Downloading agent release from #{arch_config['download_url']}"
54
54
 
55
55
  archive = open(arch_config['download_url'], :ssl_ca_cert => CA_CERT_PATH)
@@ -15,7 +15,8 @@ end
15
15
 
16
16
  module Appsignal
17
17
  class << self
18
- attr_accessor :config, :subscriber, :logger, :agent, :in_memory_log, :extension_loaded
18
+ attr_accessor :config, :subscriber, :agent, :extension_loaded
19
+ attr_writer :logger, :in_memory_log
19
20
 
20
21
  def extensions
21
22
  @extensions ||= []
@@ -72,6 +73,14 @@ module Appsignal
72
73
  end
73
74
  end
74
75
 
76
+ def in_memory_log
77
+ if defined?(@in_memory_log) && @in_memory_log
78
+ @in_memory_log
79
+ else
80
+ @in_memory_log = StringIO.new
81
+ end
82
+ end
83
+
75
84
  def stop(called_by=nil)
76
85
  if called_by
77
86
  logger.debug("Stopping appsignal (#{called_by})")
@@ -219,8 +228,7 @@ module Appsignal
219
228
  end
220
229
 
221
230
  def logger
222
- @in_memory_log = StringIO.new unless @in_memory_log
223
- @logger ||= Logger.new(@in_memory_log).tap do |l|
231
+ @logger ||= Logger.new(in_memory_log).tap do |l|
224
232
  l.level = Logger::INFO
225
233
  l.formatter = log_formatter
226
234
  end
@@ -248,7 +256,10 @@ module Appsignal
248
256
  else
249
257
  @logger.level = Logger::INFO
250
258
  end
251
- @logger << @in_memory_log.string if @in_memory_log
259
+
260
+ if in_memory_log
261
+ @logger << in_memory_log.string
262
+ end
252
263
 
253
264
  if path_arg
254
265
  @logger.info('Setting the path in start_logger has no effect anymore, set it in the config instead')
@@ -11,7 +11,8 @@ module Appsignal
11
11
  AVAILABLE_COMMANDS = %w(diagnose install notify_of_deploy).freeze
12
12
 
13
13
  class << self
14
- attr_accessor :options, :config, :initial_config
14
+ attr_accessor :options, :initial_config
15
+ attr_writer :config
15
16
 
16
17
  def run(argv=ARGV)
17
18
  @options = {}
@@ -49,7 +49,7 @@ module Appsignal
49
49
  def check_api_key
50
50
  start_appsignal
51
51
  auth_check = ::Appsignal::AuthCheck.new(Appsignal.config, Appsignal.logger)
52
- status, result = auth_check.perform_with_result
52
+ status, _ = auth_check.perform_with_result
53
53
  if status == '200'
54
54
  puts "Checking API key: Ok"
55
55
  else
@@ -66,7 +66,7 @@ module Appsignal
66
66
  puts File.read(install_log_path)
67
67
  puts "\n"
68
68
  mkmf_log_path = "#{path.strip}/ext/mkmf.log"
69
- if File.exists?(mkmf_log_path)
69
+ if File.exist?(mkmf_log_path)
70
70
  puts "Showing last lines of extension compilation log: #{mkmf_log_path}"
71
71
  puts File.read(mkmf_log_path)
72
72
  puts "\n"
@@ -188,7 +188,7 @@ module Appsignal
188
188
 
189
189
  def configure(config, environments, name_overwritten)
190
190
  deploy_rb_file = File.join(Dir.pwd, 'config/deploy.rb')
191
- if File.exists?(deploy_rb_file) && (File.read(deploy_rb_file) =~ /require (\'|\").\/appsignal\/capistrano/).nil?
191
+ if File.exist?(deploy_rb_file) && (File.read(deploy_rb_file) =~ /require (\'|\").\/appsignal\/capistrano/).nil?
192
192
  print 'Adding AppSignal integration to deploy.rb'
193
193
  File.open(deploy_rb_file, 'a') do |f|
194
194
  f.write "\nrequire 'appsignal/capistrano'\n"
@@ -70,7 +70,7 @@ module Appsignal
70
70
  load_from_environment
71
71
 
72
72
  # Load the config file if it exists
73
- if config_file && File.exists?(config_file)
73
+ if config_file && File.exist?(config_file)
74
74
  load_from_disk
75
75
  end
76
76
 
@@ -21,6 +21,10 @@ module Appsignal
21
21
  Appsignal::Hooks.register(name, hook.new)
22
22
  end
23
23
 
24
+ def initialize
25
+ @installed = false
26
+ end
27
+
24
28
  def try_to_install(name)
25
29
  if dependencies_present? && !installed?
26
30
  Appsignal.logger.info("Installing #{name} hook")
@@ -34,7 +38,7 @@ module Appsignal
34
38
  end
35
39
 
36
40
  def installed?
37
- !! @installed
41
+ @installed
38
42
  end
39
43
 
40
44
  def dependencies_present?
@@ -59,13 +59,14 @@ module Appsignal
59
59
  end
60
60
  end
61
61
 
62
- attr_reader :ext, :transaction_id, :namespace, :request, :paused, :tags, :options
62
+ attr_reader :ext, :transaction_id, :namespace, :request, :paused, :tags, :options, :discarded
63
63
 
64
64
  def initialize(transaction_id, namespace, request, options={})
65
65
  @transaction_id = transaction_id
66
66
  @namespace = namespace
67
67
  @request = request
68
68
  @paused = false
69
+ @discarded = false
69
70
  @tags = {}
70
71
  @store = Hash.new({})
71
72
  @options = options
@@ -79,6 +80,10 @@ module Appsignal
79
80
  end
80
81
 
81
82
  def complete
83
+ if discarded?
84
+ Appsignal.logger.debug('Skipping transaction because it was manually discarded.'.freeze)
85
+ return
86
+ end
82
87
  if @ext.finish
83
88
  sample_data
84
89
  end
@@ -97,6 +102,18 @@ module Appsignal
97
102
  @paused == true
98
103
  end
99
104
 
105
+ def discard!
106
+ @discarded = true
107
+ end
108
+
109
+ def restore!
110
+ @discarded = false
111
+ end
112
+
113
+ def discarded?
114
+ @discarded == true
115
+ end
116
+
100
117
  def store(key)
101
118
  @store[key]
102
119
  end
@@ -1,5 +1,5 @@
1
1
  require 'yaml'
2
2
 
3
3
  module Appsignal
4
- VERSION = '1.3.1'
4
+ VERSION = '1.3.2'
5
5
  end
@@ -8,20 +8,17 @@ describe Appsignal::AuthCheck do
8
8
  describe "#perform_with_result" do
9
9
  it "should give success message" do
10
10
  auth_check.should_receive(:perform).and_return('200')
11
- auth_check.perform_with_result.should ==
12
- ['200', 'AppSignal has confirmed authorization!']
11
+ auth_check.perform_with_result.should eq ['200', 'AppSignal has confirmed authorization!']
13
12
  end
14
13
 
15
14
  it "should give 401 message" do
16
15
  auth_check.should_receive(:perform).and_return('401')
17
- auth_check.perform_with_result.should ==
18
- ['401', 'API key not valid with AppSignal...']
16
+ auth_check.perform_with_result.should eq ['401', 'API key not valid with AppSignal...']
19
17
  end
20
18
 
21
19
  it "should give an error message" do
22
20
  auth_check.should_receive(:perform).and_return('402')
23
- auth_check.perform_with_result.should ==
24
- ['402', 'Could not confirm authorization: 402']
21
+ auth_check.perform_with_result.should eq ['402', 'Could not confirm authorization: 402']
25
22
  end
26
23
  end
27
24
 
@@ -118,7 +118,7 @@ describe Appsignal::CLI::Install do
118
118
 
119
119
  subject { cli.rails_environments }
120
120
 
121
- it { should == ['development', 'production'] }
121
+ it { should eq ['development', 'production'] }
122
122
  end
123
123
 
124
124
  describe ".installed_frameworks" do
@@ -271,7 +271,7 @@ describe Appsignal::CLI::Install do
271
271
  Gem.stub(:win_platform? => true)
272
272
  end
273
273
 
274
- it { should == 'text' }
274
+ it { should eq 'text' }
275
275
  end
276
276
 
277
277
  context "not on windows" do
@@ -279,7 +279,7 @@ describe Appsignal::CLI::Install do
279
279
  Gem.stub(:win_platform? => false)
280
280
  end
281
281
 
282
- it { should == "\e[32mtext\e[0m" }
282
+ it { should eq "\e[32mtext\e[0m" }
283
283
  end
284
284
  end
285
285
 
@@ -325,7 +325,7 @@ describe Appsignal::CLI::Install do
325
325
  cli.should_receive(:gets).once.and_return('')
326
326
  cli.should_receive(:gets).once.and_return('value')
327
327
 
328
- cli.required_input('provide: ').should == 'value'
328
+ cli.required_input('provide: ').should eq 'value'
329
329
  end
330
330
  end
331
331
 
@@ -16,7 +16,7 @@ describe Appsignal::Config do
16
16
  its(:log_file_path) { should end_with('spec/support/project_fixture/appsignal.log') }
17
17
 
18
18
  it "should merge with the default config and fill the config hash" do
19
- subject.config_hash.should == {
19
+ subject.config_hash.should eq({
20
20
  :debug => false,
21
21
  :ignore_errors => [],
22
22
  :ignore_actions => [],
@@ -38,7 +38,7 @@ describe Appsignal::Config do
38
38
  :enable_host_metrics => true,
39
39
  :enable_minutely_probes => false,
40
40
  :hostname => Socket.gethostname
41
- }
41
+ })
42
42
  end
43
43
 
44
44
  context "if a log file path is set" do
@@ -51,13 +51,13 @@ describe Appsignal::Config do
51
51
 
52
52
  let(:config) { project_fixture_config('production', :log_path => '/tmp/not-writable') }
53
53
 
54
- its(:log_file_path) { should == '/tmp/appsignal.log' }
54
+ its(:log_file_path) { should eq '/tmp/appsignal.log' }
55
55
  end
56
56
 
57
57
  context "if it does not exist" do
58
58
  let(:config) { project_fixture_config('production', :log_path => '/non-existing') }
59
59
 
60
- its(:log_file_path) { should == '/tmp/appsignal.log' }
60
+ its(:log_file_path) { should eq '/tmp/appsignal.log' }
61
61
  end
62
62
 
63
63
  context "if it is nil" do
@@ -65,7 +65,7 @@ describe Appsignal::Config do
65
65
 
66
66
  before { config.stub(:root_path => nil) }
67
67
 
68
- its(:log_file_path) { should == '/tmp/appsignal.log' }
68
+ its(:log_file_path) { should eq '/tmp/appsignal.log' }
69
69
  end
70
70
  end
71
71
 
@@ -73,7 +73,7 @@ describe Appsignal::Config do
73
73
  let(:config) { project_fixture_config('production', :endpoint => 'https://push.appsignal.com/1') }
74
74
 
75
75
  it "should strip the path" do
76
- subject[:endpoint].should == 'https://push.appsignal.com'
76
+ subject[:endpoint].should eq 'https://push.appsignal.com'
77
77
  end
78
78
  end
79
79
 
@@ -81,18 +81,18 @@ describe Appsignal::Config do
81
81
  let(:config) { project_fixture_config('production', :endpoint => 'http://localhost:4567') }
82
82
 
83
83
  it "should keep the port" do
84
- subject[:endpoint].should == 'http://localhost:4567'
84
+ subject[:endpoint].should eq 'http://localhost:4567'
85
85
  end
86
86
  end
87
87
 
88
88
  describe "#[]= and #[]" do
89
89
  it "should get the value for an existing key" do
90
- subject[:push_api_key].should == 'abc'
90
+ subject[:push_api_key].should eq 'abc'
91
91
  end
92
92
 
93
93
  it "should change and get the value for an existing key" do
94
94
  subject[:push_api_key] = 'abcde'
95
- subject[:push_api_key].should == 'abcde'
95
+ subject[:push_api_key].should eq 'abcde'
96
96
  end
97
97
 
98
98
  it "should return nil for a non-existing key" do
@@ -111,26 +111,26 @@ describe Appsignal::Config do
111
111
  end
112
112
 
113
113
  it "should write the current config to env vars" do
114
- ENV['APPSIGNAL_ACTIVE'].should == 'true'
114
+ ENV['APPSIGNAL_ACTIVE'].should eq 'true'
115
115
  ENV['APPSIGNAL_APP_PATH'].should end_with('spec/support/project_fixture')
116
116
  ENV['APPSIGNAL_AGENT_PATH'].should end_with('/ext')
117
- ENV['APPSIGNAL_DEBUG_LOGGING'].should == 'false'
117
+ ENV['APPSIGNAL_DEBUG_LOGGING'].should eq 'false'
118
118
  ENV['APPSIGNAL_LOG_FILE_PATH'].should end_with('/tmp/appsignal.log')
119
- ENV['APPSIGNAL_PUSH_API_ENDPOINT'].should == 'https://push.appsignal.com'
120
- ENV['APPSIGNAL_PUSH_API_KEY'].should == 'abc'
121
- ENV['APPSIGNAL_APP_NAME'].should == 'TestApp'
122
- ENV['APPSIGNAL_ENVIRONMENT'].should == 'production'
123
- ENV['APPSIGNAL_AGENT_VERSION'].should == Appsignal::Extension.agent_version
124
- ENV['APPSIGNAL_LANGUAGE_INTEGRATION_VERSION'].should == Appsignal::VERSION
125
- ENV['APPSIGNAL_HTTP_PROXY'].should == 'http://localhost'
126
- ENV['APPSIGNAL_IGNORE_ACTIONS'].should == 'action1,action2'
127
- ENV['APPSIGNAL_FILTER_PARAMETERS'].should == 'password,confirm_password'
128
- ENV['APPSIGNAL_SEND_PARAMS'].should == 'true'
129
- ENV['APPSIGNAL_RUNNING_IN_CONTAINER'].should == 'false'
119
+ ENV['APPSIGNAL_PUSH_API_ENDPOINT'].should eq 'https://push.appsignal.com'
120
+ ENV['APPSIGNAL_PUSH_API_KEY'].should eq 'abc'
121
+ ENV['APPSIGNAL_APP_NAME'].should eq 'TestApp'
122
+ ENV['APPSIGNAL_ENVIRONMENT'].should eq 'production'
123
+ ENV['APPSIGNAL_AGENT_VERSION'].should eq Appsignal::Extension.agent_version
124
+ ENV['APPSIGNAL_LANGUAGE_INTEGRATION_VERSION'].should eq Appsignal::VERSION
125
+ ENV['APPSIGNAL_HTTP_PROXY'].should eq 'http://localhost'
126
+ ENV['APPSIGNAL_IGNORE_ACTIONS'].should eq 'action1,action2'
127
+ ENV['APPSIGNAL_FILTER_PARAMETERS'].should eq 'password,confirm_password'
128
+ ENV['APPSIGNAL_SEND_PARAMS'].should eq 'true'
129
+ ENV['APPSIGNAL_RUNNING_IN_CONTAINER'].should eq 'false'
130
130
  ENV['APPSIGNAL_WORKING_DIR_PATH'].should be_nil
131
- ENV['APPSIGNAL_ENABLE_HOST_METRICS'].should == 'true'
132
- ENV['APPSIGNAL_ENABLE_MINUTELY_PROBES'].should == 'false'
133
- ENV['APPSIGNAL_HOSTNAME'].should == 'app1.local'
131
+ ENV['APPSIGNAL_ENABLE_HOST_METRICS'].should eq 'true'
132
+ ENV['APPSIGNAL_ENABLE_MINUTELY_PROBES'].should eq 'false'
133
+ ENV['APPSIGNAL_HOSTNAME'].should eq 'app1.local'
134
134
  ENV['APPSIGNAL_PROCESS_NAME'].should include 'rspec'
135
135
  end
136
136
 
@@ -141,7 +141,7 @@ describe Appsignal::Config do
141
141
  end
142
142
 
143
143
  it "should write the current config to env vars" do
144
- ENV['APPSIGNAL_WORKING_DIR_PATH'].should == '/tmp/appsignal2'
144
+ ENV['APPSIGNAL_WORKING_DIR_PATH'].should eq '/tmp/appsignal2'
145
145
  end
146
146
  end
147
147
  end
@@ -159,11 +159,11 @@ describe Appsignal::Config do
159
159
  end
160
160
 
161
161
  it "should ignore env vars that are present in the config file" do
162
- subject[:push_api_key].should == 'abc'
162
+ subject[:push_api_key].should eq 'abc'
163
163
  end
164
164
 
165
165
  it "should use env vars that are not present in the config file" do
166
- subject[:debug].should == true
166
+ subject[:debug].should eq true
167
167
  end
168
168
 
169
169
  context "running on Heroku" do
@@ -184,8 +184,8 @@ describe Appsignal::Config do
184
184
  let(:config) { project_fixture_config('production', :name => 'Initial name', :initial_key => 'value') }
185
185
 
186
186
  it "should merge with the config" do
187
- subject[:name].should == 'TestApp'
188
- subject[:initial_key].should == 'value'
187
+ subject[:name].should eq 'TestApp'
188
+ subject[:initial_key].should eq 'value'
189
189
  end
190
190
  end
191
191
 
@@ -193,11 +193,11 @@ describe Appsignal::Config do
193
193
  let(:config) { project_fixture_config('old_api_key') }
194
194
 
195
195
  it "should fill the push_api_key with the old style key" do
196
- subject[:push_api_key].should == 'def'
196
+ subject[:push_api_key].should eq 'def'
197
197
  end
198
198
 
199
199
  it "should fill ignore_errors with the old style ignore exceptions" do
200
- subject[:ignore_errors].should == ['StandardError']
200
+ subject[:ignore_errors].should eq ['StandardError']
201
201
  end
202
202
  end
203
203
  end
@@ -239,11 +239,11 @@ describe Appsignal::Config do
239
239
  its(:valid?) { should be_true }
240
240
  its(:active?) { should be_true }
241
241
 
242
- its([:push_api_key]) { should == 'aaa-bbb-ccc' }
243
- its([:active]) { should == true }
244
- its([:name]) { should == 'App name' }
245
- its([:debug]) { should == true }
246
- its([:ignore_actions]) { should == ['action1', 'action2'] }
242
+ its([:push_api_key]) { should eq 'aaa-bbb-ccc' }
243
+ its([:active]) { should eq true }
244
+ its([:name]) { should eq 'App name' }
245
+ its([:debug]) { should eq true }
246
+ its([:ignore_actions]) { should eq ['action1', 'action2'] }
247
247
  end
248
248
  end
249
249