errplane 1.0.13 → 1.0.14

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- NzMxZDYxN2MxY2Q1YjQxNTZjNWM1ZjExNWU4NzdlZTU5OGZlZGJkOQ==
4
+ YjkxNjk0MmM5ZWUyMWE2MDE0YWYwMWYyOGQ5OTBkN2EyMWQ1MTU0Mw==
5
5
  data.tar.gz: !binary |-
6
- ZDIyNjdkNzJmN2E0YTI0MGRkYjY4MDIyMjExZTkxMTFhMTM0MWNhNg==
6
+ YTEwOTdjMjU5NjQ0ODZmZDhjMDAyOTE1NGYwZGZiNWE0OWIyYzY5Yg==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- YzJiNTlmMGUzODFiMjc0Y2U5MjUzOTM3ODVhMjQ0ZGM4OWM3YTU0ZGVhYjBh
10
- M2QzY2NhZWNmMzMzYTJjY2NiY2YwZjY4OGFmZTIwNGFkNmEyZTE3MWI5M2Zi
11
- ODQ1MDgzN2U4MWRlOTcyZDAyOTFiZWU5NGVlZGU2ODVhNjY4OWI=
9
+ Y2Y1NzZlOGU2MWEyNTE1YzFlNGRkYjg3ZTg2MmUzNjZlMjQyNDIxYjM4ZmZh
10
+ Y2Q2YjIxNTA1MmQ5NDEwMGQ5NWY4NGYwMTNlNDdlNDhhZjQzMTRhNDBhYmZi
11
+ NDI2ZjFkNTVjMWJkOGNmZWNiOTAxMTI2YjI0ZmQxZjU5Y2MyMmE=
12
12
  data.tar.gz: !binary |-
13
- ZDhlMTQ5ZjM2YjNjYzg3NWZkYjk1NDE4MjU5Y2YyNzkwNjUzNjU3NDA2N2Fi
14
- YjhlMmQyY2ZjMTM2ODQ3ODFmZDg0ZjI4MWY5MThjYThmZWI5MmIxM2U1ZmU5
15
- NGM0NWJmMzVlODkyNGE5MzdmMGE4YjM2ZTQyYjc0OTE2YzdjZWY=
13
+ MWZjZGQ2NjMzZWE2NWI2MTM4MDA1NmNiMGUyMTU3NGUyMzE5MGM3MzdjYTZh
14
+ NDBjNDdjOTQ1NWQ3MTgyNmY4OTEzNmMxOTBjNzk3MWYxMmNjYzg5MDAwZDFm
15
+ NGE1MDE1ODdlYTc4MThiZmFlZWY3MzQ2NDdlMjU4ZjBlMTdjNzQ=
@@ -55,8 +55,18 @@ module Errplane
55
55
  Errplane.api.send generate_data(name, params), "c"
56
56
  end
57
57
 
58
+ def destringify_value(value)
59
+ if value.is_a?(String)
60
+ return value.to_f if value =~ /\./
61
+ return value.to_i
62
+ else
63
+ return value
64
+ end
65
+ end
66
+
58
67
  def generate_data(name, params)
59
- point = {:v => params[:value] || 1}
68
+ value = destringify_value(params[:value])
69
+ point = {:v => value || 1}
60
70
  point[:t] = params[:timestamp] unless params[:timestamp].nil?
61
71
 
62
72
  if context = params[:context]
@@ -3,10 +3,14 @@ module Errplane
3
3
  module Middleware
4
4
  module HijackRenderException
5
5
  def self.included(base)
6
+ ::Rails.logger.info("INSTALLING MIDDLEWARE 1")
6
7
  base.send(:alias_method_chain, :render_exception, :errplane)
8
+ ::Rails.logger.info base.inspect
9
+ ::Rails.logger.info("DONE 1")
7
10
  end
8
11
 
9
12
  def render_exception_with_errplane(env, e)
13
+ ::Rails.logger.info("MIDDLEWARE 1 IS GETTING CALLED")
10
14
  controller = env["action_controller.instance"]
11
15
  request_data = controller.try(:errplane_request_data) || {}
12
16
  unless Errplane.configuration.ignore_user_agent?(request_data[:user_agent])
@@ -3,6 +3,7 @@ module Errplane
3
3
  module Middleware
4
4
  module HijackRescueActionEverywhere
5
5
  def self.included(base)
6
+ ::Rails.logger.info("INSTALLING MIDDLEWARE 2")
6
7
  base.send(:alias_method_chain, :rescue_action_in_public, :errplane)
7
8
  base.send(:alias_method_chain, :rescue_action_locally, :errplane)
8
9
  end
@@ -1,3 +1,3 @@
1
1
  module Errplane
2
- VERSION = "1.0.13"
2
+ VERSION = "1.0.14"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: errplane
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.13
4
+ version: 1.0.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - Todd Persen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-09-11 00:00:00.000000000 Z
11
+ date: 2013-10-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json