yeller_ruby 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/yeller/configuration.rb +11 -1
- data/lib/yeller/ignoring_client.rb +6 -0
- data/lib/yeller/version.rb +1 -1
- data/lib/yeller.rb +12 -7
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fd6aa5fa6208ebd1b16791b49ef819b386499d07
|
4
|
+
data.tar.gz: 62a009475578a506ffa64294861663a59f2cd23d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6ae37a2e4041c17eba040a3fea4a56167d4996f5139a35e2a8a7d690f91b02343638c802914af33c9bbbca7e9f9c6e31649497a614fed4847dc52cc4f49ec404
|
7
|
+
data.tar.gz: 3f5b20b1ce20899da40e6f4000e2e6d5df03fa032adfce607a9f315651f6c6d7efe5d49d1ed4d033d4d4cdb2ef362f718492e389e2a1ea12ee0c0908b2a41f3b
|
data/lib/yeller/configuration.rb
CHANGED
@@ -2,7 +2,7 @@ require_relative 'server'
|
|
2
2
|
|
3
3
|
module Yeller
|
4
4
|
class Configuration
|
5
|
-
attr_reader :token, :servers, :startup_params, :error_handler, :project_root
|
5
|
+
attr_reader :token, :servers, :startup_params, :error_handler, :project_root, :development_environments
|
6
6
|
DEFAULT_SERVERS = [
|
7
7
|
Yeller::SecureServer.new("collector1.yellerapp.com", 443),
|
8
8
|
Yeller::SecureServer.new("collector2.yellerapp.com", 443),
|
@@ -15,6 +15,7 @@ module Yeller
|
|
15
15
|
@servers = DEFAULT_SERVERS
|
16
16
|
@startup_params = {}
|
17
17
|
@error_handler = Yeller::LogErrorHandler.new
|
18
|
+
@development_environments = Set.new(['development', 'test'])
|
18
19
|
end
|
19
20
|
|
20
21
|
def remove_default_servers
|
@@ -67,6 +68,15 @@ module Yeller
|
|
67
68
|
end
|
68
69
|
end
|
69
70
|
|
71
|
+
def development_environments=(new_development_environments)
|
72
|
+
@development_environments = new_development_environments
|
73
|
+
end
|
74
|
+
|
75
|
+
def ignore_exceptions?
|
76
|
+
development_environments.include?(
|
77
|
+
@startup_params[:"application-environment"])
|
78
|
+
end
|
79
|
+
|
70
80
|
def token=(token)
|
71
81
|
@token = token
|
72
82
|
end
|
data/lib/yeller/version.rb
CHANGED
data/lib/yeller.rb
CHANGED
@@ -3,6 +3,7 @@ require 'yajl/json_gem'
|
|
3
3
|
|
4
4
|
require_relative 'yeller/backtrace_filter'
|
5
5
|
require_relative 'yeller/client'
|
6
|
+
require_relative 'yeller/ignoring_client'
|
6
7
|
require_relative 'yeller/configuration'
|
7
8
|
require_relative 'yeller/exception_formatter'
|
8
9
|
require_relative 'yeller/server'
|
@@ -18,12 +19,16 @@ module Yeller
|
|
18
19
|
end
|
19
20
|
|
20
21
|
def self.build_client(config)
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
Yeller::
|
25
|
-
|
26
|
-
|
27
|
-
|
22
|
+
if config.ignore_exceptions?
|
23
|
+
Yeller::IgnoringClient.new
|
24
|
+
else
|
25
|
+
Yeller::Client.new(
|
26
|
+
config.servers,
|
27
|
+
config.token,
|
28
|
+
Yeller::StartupParams.defaults(config.startup_params),
|
29
|
+
Yeller::BacktraceFilter.new(config.backtrace_filters),
|
30
|
+
config.error_handler
|
31
|
+
)
|
32
|
+
end
|
28
33
|
end
|
29
34
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: yeller_ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tom Crayford
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-07-
|
11
|
+
date: 2014-07-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -64,6 +64,7 @@ files:
|
|
64
64
|
- lib/yeller/client.rb
|
65
65
|
- lib/yeller/configuration.rb
|
66
66
|
- lib/yeller/exception_formatter.rb
|
67
|
+
- lib/yeller/ignoring_client.rb
|
67
68
|
- lib/yeller/log_error_handler.rb
|
68
69
|
- lib/yeller/rack.rb
|
69
70
|
- lib/yeller/rails.rb
|