appsignal 1.3.1 → 1.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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
@@ -36,7 +36,7 @@ describe Appsignal::Transmitter do
36
36
 
37
37
  subject { instance.transmit(:the => :payload) }
38
38
 
39
- it { should == '200' }
39
+ it { should eq '200' }
40
40
  end
41
41
 
42
42
  describe "#http_post" do
@@ -46,12 +46,12 @@ describe Appsignal::Transmitter do
46
46
 
47
47
  subject { instance.send(:http_post, 'the' => 'payload') }
48
48
 
49
- its(:body) { should == Zlib::Deflate.deflate("{\"the\":\"payload\"}", Zlib::BEST_SPEED) }
50
- its(:path) { should == instance.uri.request_uri }
49
+ its(:body) { should eq Zlib::Deflate.deflate("{\"the\":\"payload\"}", Zlib::BEST_SPEED) }
50
+ its(:path) { should eq instance.uri.request_uri }
51
51
 
52
52
  it "should have the correct headers" do
53
- subject['Content-Type'].should == 'application/json; charset=UTF-8'
54
- subject['Content-Encoding'].should == 'gzip'
53
+ subject['Content-Type'].should eq 'application/json; charset=UTF-8'
54
+ subject['Content-Encoding'].should eq 'gzip'
55
55
  end
56
56
  end
57
57
 
@@ -59,7 +59,7 @@ describe Appsignal::Transmitter do
59
59
  subject { Appsignal::Transmitter::CA_FILE_PATH }
60
60
 
61
61
  it { should include('resources/cacert.pem') }
62
- it("should exist") { File.exists?(subject).should be_true }
62
+ it("should exist") { File.exist?(subject).should be_true }
63
63
  end
64
64
 
65
65
  describe "#http_client" do
@@ -79,7 +79,7 @@ describe Appsignal::Transmitter do
79
79
  it { should be_instance_of(Net::HTTP) }
80
80
  its(:proxy?) { should be_false }
81
81
  its(:use_ssl?) { should be_true }
82
- its(:verify_mode) { should == OpenSSL::SSL::VERIFY_PEER }
82
+ its(:verify_mode) { should eq OpenSSL::SSL::VERIFY_PEER }
83
83
  its(:ca_file) { Appsignal::Transmitter::CA_FILE_PATH }
84
84
  end
85
85
 
@@ -87,8 +87,8 @@ describe Appsignal::Transmitter do
87
87
  let(:config) { project_fixture_config('production', :http_proxy => 'http://localhost:8080') }
88
88
 
89
89
  its(:proxy?) { should be_true }
90
- its(:proxy_address) { should == 'localhost' }
91
- its(:proxy_port) { should == 8080 }
90
+ its(:proxy_address) { should eq 'localhost' }
91
+ its(:proxy_port) { should eq 8080 }
92
92
  end
93
93
  end
94
94
  end
@@ -18,7 +18,7 @@ describe Appsignal::Utils do
18
18
  }
19
19
  end
20
20
 
21
- it { should == %({"the":"payload","1":true,"":"test","foo":[1,2,"three"],"bar":null,"baz":{"foo":"bar"}}) }
21
+ it { should eq %({"the":"payload","1":true,"":"test","foo":[1,2,"three"],"bar":null,"baz":{"foo":"bar"}}) }
22
22
  end
23
23
 
24
24
  context "with a body that contains strings with invalid utf-8 content" do
@@ -34,7 +34,7 @@ describe Appsignal::Utils do
34
34
  }
35
35
  } }
36
36
 
37
- it { should == %({"field_one":"aa","field_two":"aa�","field_three":["one","aa�"],"field_four":{"one":"aa�"}}) }
37
+ it { should eq %({"field_one":"aa","field_two":"aa�","field_three":["one","aa�"],"field_four":{"one":"aa�"}}) }
38
38
  end
39
39
  end
40
40
  end
@@ -17,7 +17,7 @@ describe Appsignal do
17
17
  Appsignal.logger.should_not_receive(:level=)
18
18
 
19
19
  Appsignal.config = config
20
- Appsignal.config.should == config
20
+ Appsignal.config.should eq config
21
21
  end
22
22
  end
23
23
 
@@ -54,7 +54,7 @@ describe Appsignal do
54
54
 
55
55
  it "should initialize logging" do
56
56
  Appsignal.start
57
- Appsignal.logger.level.should == Logger::INFO
57
+ Appsignal.logger.level.should eq Logger::INFO
58
58
  end
59
59
 
60
60
  it "should start native" do
@@ -154,7 +154,7 @@ describe Appsignal do
154
154
 
155
155
  it "should change the log level" do
156
156
  Appsignal.start
157
- Appsignal.logger.level.should == Logger::DEBUG
157
+ Appsignal.logger.level.should eq Logger::DEBUG
158
158
  end
159
159
  end
160
160
  end
@@ -259,7 +259,7 @@ describe Appsignal do
259
259
  lambda {
260
260
  Appsignal.monitor_transaction('perform_job.nothing') do
261
261
  object.some_method
262
- end.should == 1
262
+ end.should eq 1
263
263
  }.should_not raise_error
264
264
  end
265
265
  end
@@ -334,10 +334,10 @@ describe Appsignal do
334
334
  background_env_with_data
335
335
  ) do
336
336
  current = Appsignal::Transaction.current
337
- current.namespace.should == Appsignal::Transaction::BACKGROUND_JOB
337
+ current.namespace.should eq Appsignal::Transaction::BACKGROUND_JOB
338
338
  current.request.should be_a(Appsignal::Transaction::GenericRequest)
339
339
  object.some_method
340
- end.should == 1
340
+ end.should eq 1
341
341
  end
342
342
 
343
343
  it "should instrument and complete for a http request" do
@@ -353,7 +353,7 @@ describe Appsignal do
353
353
  http_request_env_with_data
354
354
  ) do
355
355
  current = Appsignal::Transaction.current
356
- current.namespace.should == Appsignal::Transaction::HTTP_REQUEST
356
+ current.namespace.should eq Appsignal::Transaction::HTTP_REQUEST
357
357
  current.request.should be_a(::Rack::Request)
358
358
  object.some_method
359
359
  end
@@ -571,9 +571,9 @@ describe Appsignal do
571
571
  context "when the log path is writable" do
572
572
  it "should log to file" do
573
573
  Appsignal.start_logger
574
- Appsignal.logger.level.should == Logger::INFO
574
+ Appsignal.logger.level.should eq Logger::INFO
575
575
  Appsignal.logger.error('Log to file')
576
- File.exists?(log_file).should be_true
576
+ File.exist?(log_file).should be_true
577
577
  File.open(log_file).read.should include 'Log to file'
578
578
  File.open(log_file).read.should include 'Log something'
579
579
  end
@@ -587,7 +587,7 @@ describe Appsignal do
587
587
 
588
588
  it "should log to stdout" do
589
589
  Appsignal.start_logger
590
- Appsignal.logger.level.should == Logger::INFO
590
+ Appsignal.logger.level.should eq Logger::INFO
591
591
  Appsignal.logger.error('Log to stdout')
592
592
  out_stream.string.should include 'appsignal: Log to stdout'
593
593
  out_stream.string.should include 'Log something'
@@ -605,7 +605,7 @@ describe Appsignal do
605
605
  it "should set the log level to info" do
606
606
  Appsignal.config = nil
607
607
  Appsignal.start_logger
608
- Appsignal.logger.level.should == Logger::INFO
608
+ Appsignal.logger.level.should eq Logger::INFO
609
609
  end
610
610
  end
611
611
 
@@ -613,7 +613,7 @@ describe Appsignal do
613
613
  it "should set the log level to debug" do
614
614
  Appsignal.config.config_hash[:debug] = true
615
615
  Appsignal.start_logger
616
- Appsignal.logger.level.should == Logger::DEBUG
616
+ Appsignal.logger.level.should eq Logger::DEBUG
617
617
  end
618
618
  end
619
619
  end
@@ -623,8 +623,7 @@ describe Appsignal do
623
623
 
624
624
  it "should format a log line" do
625
625
  Process.stub(:pid => 100)
626
- subject.call('Debug', Time.parse('2015-07-08'), nil, 'log line').should ==
627
- "[2015-07-08T00:00:00 (process) #100][Debug] log line\n"
626
+ subject.call('Debug', Time.parse('2015-07-08'), nil, 'log line').should eq "[2015-07-08T00:00:00 (process) #100][Debug] log line\n"
628
627
  end
629
628
  end
630
629
 
@@ -633,7 +632,7 @@ describe Appsignal do
633
632
 
634
633
  it { should be_a Appsignal::Config }
635
634
  it 'should return configuration' do
636
- subject[:endpoint].should == 'https://push.appsignal.com'
635
+ subject[:endpoint].should eq 'https://push.appsignal.com'
637
636
  end
638
637
  end
639
638
 
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: 1.3.1
4
+ version: 1.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robert Beekman
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-08-31 00:00:00.000000000 Z
12
+ date: 2016-09-01 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rack