appsignal 0.12.beta.0 → 0.12.beta.1

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.
@@ -1,6 +1,7 @@
1
1
  #include<ruby.h>
2
2
 
3
3
  void appsignal_start(void);
4
+ void appsignal_stop(void);
4
5
  void appsignal_start_transaction(char *);
5
6
  void appsignal_start_event(char *);
6
7
  void appsignal_finish_event(char *, char *, char *, char *);
@@ -26,6 +27,12 @@ static VALUE start(VALUE self) {
26
27
  return Qnil;
27
28
  }
28
29
 
30
+ static VALUE stop(VALUE self) {
31
+ appsignal_stop();
32
+
33
+ return Qnil;
34
+ }
35
+
29
36
  static VALUE start_transaction(VALUE self, VALUE transaction_id) {
30
37
  Check_Type(transaction_id, T_STRING);
31
38
 
@@ -166,6 +173,7 @@ void Init_appsignal_extension(void) {
166
173
 
167
174
  // Transaction monitoring
168
175
  rb_define_singleton_method(Extension, "start", start, 0);
176
+ rb_define_singleton_method(Extension, "stop", stop, 0);
169
177
  rb_define_singleton_method(Extension, "start_transaction", start_transaction, 1);
170
178
  rb_define_singleton_method(Extension, "start_event", start_event, 1);
171
179
  rb_define_singleton_method(Extension, "finish_event", finish_event, 4);
@@ -59,6 +59,10 @@ module Appsignal
59
59
  end
60
60
  end
61
61
 
62
+ def stop
63
+ Appsignal::Extension.stop
64
+ end
65
+
62
66
  def monitor_transaction(name, payload={})
63
67
  unless active?
64
68
  yield
@@ -1,4 +1,4 @@
1
1
  module Appsignal
2
- VERSION = '0.12.beta.0'
3
- AGENT_VERSION = 'eea0fcb'
2
+ VERSION = '0.12.beta.1'
3
+ AGENT_VERSION = 'adf86ee'
4
4
  end
@@ -135,6 +135,14 @@ describe Appsignal do
135
135
  end
136
136
  end
137
137
 
138
+ describe ".stop" do
139
+ it "should call stop on the extension" do
140
+ Appsignal::Extension.should_receive(:stop)
141
+ Appsignal.stop
142
+ Appsignal.active?.should be_false
143
+ end
144
+ end
145
+
138
146
  describe '.active?' do
139
147
  subject { Appsignal.active? }
140
148
 
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.12.beta.0
4
+ version: 0.12.beta.1
5
5
  prerelease: 5
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ authors:
13
13
  autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
- date: 2015-05-21 00:00:00.000000000 Z
16
+ date: 2015-06-03 00:00:00.000000000 Z
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency
19
19
  name: rack