appsignal 0.9.4 → 0.9.5

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 87281056af89689a3f66010e44c4f3a2791f137b
4
- data.tar.gz: 2c0011b3c7b98bcf39ed208ad14036ed964606c4
3
+ metadata.gz: 548376adc60aed0084092d6088e3949df194190c
4
+ data.tar.gz: fba4858b4cb9603946311dcc244c47f6bbf26b0a
5
5
  SHA512:
6
- metadata.gz: 6c220755d2e9ea83500fa489db7d95bf446cfaf9b15d781f3043d3bbe6208041ef46a528a5d42fe55ccc3526e4acbaacd6783ece791f7b261f9b83cab8127b16
7
- data.tar.gz: 78ca1bcc64361c136879c5f1ae7f136e8718f166abd39a453b90ca274b3c5722b582dd527d0dc5f642d1292beb50777aa20aae4abe91826d4055e10c902b74cf
6
+ metadata.gz: 3f6f27716d46a3b8f3a17046bca5b4415406aefc6af0d6810f934abf646b2148c59b968a00225ad2aa224f6673d33492eb94e3e358ee1670d43be9a54241e9e2
7
+ data.tar.gz: c491d2e9401ea8c68436f3f770d22a36cd45cd32c4b8ccba5b9f43921622f0b64cc5d08bbb2a6589ef28c0bb3642d1b61c1e6693e1e441866ac1c324ad0e8152
@@ -1,3 +1,6 @@
1
+ # 0.9.5
2
+ * Convert to primitives before sending through pipe
3
+
1
4
  # 0.9.4
2
5
  * Log Rails and Sinatra version
3
6
  * Resubscribe to notifications after fork
@@ -126,7 +126,7 @@ module Appsignal
126
126
  def shutdown(send_current_queue=false, reason=nil)
127
127
  Appsignal.logger.info("Shutting down agent (#{reason})")
128
128
  unsubscribe
129
- Thread.kill(thread) if thread
129
+ stop_thread
130
130
  send_queue if send_current_queue && @aggregator.has_transactions?
131
131
  end
132
132
 
@@ -1,3 +1,3 @@
1
1
  module Appsignal
2
- VERSION = '0.9.4'
2
+ VERSION = '0.9.5'
3
3
  end
@@ -55,7 +55,7 @@ describe Appsignal::Agent do
55
55
  subject.should_receive(:send_queue).at_least(:twice)
56
56
 
57
57
  subject.start_thread
58
- sleep 1
58
+ sleep 2
59
59
  end
60
60
  end
61
61
 
@@ -40,25 +40,18 @@ describe Appsignal::Transmitter do
40
40
  end
41
41
 
42
42
  describe "#http_post" do
43
- it "calls Net::HTTP.post_form with the correct params" do
44
- post = double(:post)
45
- post.should_receive(:[]=).with(
46
- 'Content-Type',
47
- 'application/json; charset=UTF-8'
48
- )
49
- post.should_receive(:[]=).with(
50
- 'Content-Encoding',
51
- 'gzip'
52
- )
53
- post.should_receive(:body=).with(
54
- Zlib::Deflate.deflate("{\"the\":\"payload\"}", Zlib::BEST_SPEED)
55
- )
43
+ before do
56
44
  Socket.stub(:gethostname => 'app1.local')
45
+ end
46
+
47
+ subject { instance.send(:http_post, 'the' => 'payload') }
48
+
49
+ its(:body) { should == Zlib::Deflate.deflate("{\"the\":\"payload\"}", Zlib::BEST_SPEED) }
50
+ its(:path) { should == instance.uri.request_uri }
57
51
 
58
- Net::HTTP::Post.should_receive(:new).with(
59
- instance.uri.request_uri
60
- ).and_return(post)
61
- instance.send(:http_post, :the => :payload)
52
+ it "should have the correct headers" do
53
+ subject['Content-Type'].should == 'application/json; charset=UTF-8'
54
+ subject['Content-Encoding'].should == 'gzip'
62
55
  end
63
56
  end
64
57
 
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: 0.9.4
4
+ version: 0.9.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robert Beekman
@@ -12,7 +12,7 @@ authors:
12
12
  autorequire:
13
13
  bindir: bin
14
14
  cert_chain: []
15
- date: 2014-08-05 00:00:00.000000000 Z
15
+ date: 2014-08-06 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: activesupport