trackets 0.0.7 → 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 39b324faf07a639b3c18221aec426ab4e89127a1
4
- data.tar.gz: 6c991c9f52bf05c7cb3e8a3fc5e3444231ed17f4
3
+ metadata.gz: 98193364f1e33659e9070b586b5f4a0806cadc7b
4
+ data.tar.gz: 59578ac3678e2d21e72eeca0a7bbb39b21984436
5
5
  SHA512:
6
- metadata.gz: 47662ce7e9357418172562eaa1202d5722bc12e6bd316da244e583b3e7b76c3b019c33c9d78c63753a9b0ac5a0493f766156482f8016b7aa04a1a8343756603f
7
- data.tar.gz: dffe23ccec78042c164029e10b9815990881459b3cbdfe2e6b7ec0049a509eb280bcc28d554796b3f681961fb836e20adcbed3d8e356be96d6f2c29de637df5b
6
+ metadata.gz: 5e0123cd90f8b3131972a24fd429938ee35a0f81944a0e602303d68713c35250e8b3beb655d16afd9f4e0538de50ecc272a7bc569d3591397bc8a481ba016937
7
+ data.tar.gz: 467b4fbcfe49ca4cd83cf7e32e6df42c7581d3e3cc738eb98d24852e2369300a90f1260f3e56e5926125f51e145f4a3b352be74512cec6091df43ff0d47e0b13
data/lib/trackets.rb CHANGED
@@ -33,9 +33,18 @@ module Trackets
33
33
  begin
34
34
  raise TracketsCustomException, message
35
35
  rescue TracketsCustomException => e
36
- Trackets.notify(e)
36
+ force { Trackets.notify(e) }
37
37
  end
38
38
  end
39
39
 
40
+ def force(&block)
41
+ original = configuration.force?
42
+ configuration.force = true
43
+
44
+ yield
45
+
46
+ configuration.force = original
47
+ end
48
+
40
49
  end
41
50
  end
@@ -40,7 +40,7 @@ module Trackets
40
40
 
41
41
  def payload
42
42
  {
43
- language: "ruby",
43
+ type: "ruby",
44
44
  message: exception.message,
45
45
  class_name: exception.class.to_s,
46
46
  stacktrace: backtrace.parse.join("\n"),
@@ -29,8 +29,9 @@ module Trackets
29
29
  DEFAULT_ENABLED_ENV = [:production]
30
30
 
31
31
  attr_accessor :api_url, :api_key, :environment_name, :project_root, :framework, :whitelisted_env, :blacklisted_params, :async,
32
- :load_plugins, :enabled_env
32
+ :load_plugins, :enabled_env, :force
33
33
  alias_method :async?, :async
34
+ alias_method :force?, :force
34
35
 
35
36
  def initialize
36
37
  @api_url = DEFAULT_API_URL
@@ -39,6 +40,7 @@ module Trackets
39
40
  @async = false
40
41
  @load_plugins = DEFAULT_LOAD_PLUGINS
41
42
  @enabled_env = DEFAULT_ENABLED_ENV
43
+ @force = false
42
44
  end
43
45
 
44
46
  def rack_filter_keys(rack_env = nil)
@@ -54,7 +56,7 @@ module Trackets
54
56
  end
55
57
 
56
58
  def enabled?
57
- enabled_env.include?(environment_name.to_sym)
59
+ enabled_env.include?(environment_name.to_sym) || force?
58
60
  end
59
61
 
60
62
  end
@@ -1,3 +1,3 @@
1
1
  module Trackets
2
- VERSION = "0.0.7"
2
+ VERSION = "0.0.8"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trackets
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Trackets
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-07-09 00:00:00.000000000 Z
11
+ date: 2014-08-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json