validation_tracker_client 2.4.11 → 2.4.12

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.
@@ -107,7 +107,6 @@ module ValidationTrackerClient
107
107
  result = {}
108
108
  result[:action] = notice.action rescue nil
109
109
  result[:component] = notice.component rescue nil
110
- result[:error_class] = notice.error_class if notice.error_class
111
110
  result[:environment_name] = 'production'
112
111
 
113
112
  unless notice.backtrace.lines.empty?
@@ -106,7 +106,7 @@ module ValidationTrackerClient
106
106
  @http_read_timeout = 5
107
107
  @params_filters = DEFAULT_PARAMS_FILTERS.dup
108
108
  @ignore_user_agent = []
109
- @development_environments = %w(development test cucumber)
109
+ @development_environments = %w(test cucumber)
110
110
  @development_lookup = true
111
111
  @notifier_name = 'Validation Tracker Notifier'
112
112
  @notifier_version = VERSION
@@ -55,6 +55,10 @@ module ValidationTrackerClient
55
55
  # The host name where this error occurred (if any)
56
56
  attr_reader :hostname
57
57
 
58
+ attr_accessor :request_url
59
+
60
+ attr_accessor :error_type
61
+
58
62
  def initialize(args)
59
63
  self.args = args
60
64
  self.exception = args[:exception]
@@ -76,9 +80,10 @@ module ValidationTrackerClient
76
80
 
77
81
  self.environment_name = args[:environment_name]
78
82
  self.cgi_data = args[:cgi_data] || args[:rack_env]
79
- self.error_message = exception_attribute(:error_message, 'Notification') do |exception|
80
- "#{exception.class.name}: #{exception.message}"
81
- end
83
+
84
+ self.error_message = args[:error_message]
85
+ self.error_type = args[:error_type]
86
+ self.request_url = args[:request_url]
82
87
 
83
88
  self.hostname = local_hostname
84
89
 
@@ -100,15 +105,9 @@ module ValidationTrackerClient
100
105
  notifier.url(notifier_url)
101
106
  end
102
107
  notice.error do |error|
103
- error.tag!('class', error_class)
104
108
  error.message(error_message)
105
- error.backtrace do |backtrace|
106
- self.backtrace.lines.each do |line|
107
- backtrace.line(:number => line.number,
108
- :file => line.file,
109
- :method => line.method)
110
- end
111
- end
109
+ error.error_type(error_type)
110
+ error.request_url(request_url)
112
111
  end
113
112
  if url ||
114
113
  controller ||
@@ -143,15 +142,10 @@ module ValidationTrackerClient
143
142
  env.tag!("hostname", hostname)
144
143
  end
145
144
  end
145
+ puts xml.to_s
146
146
  xml.to_s
147
147
  end
148
148
 
149
- # Determines if this notice should be ignored
150
- def ignore?
151
- ignored_class_names.include?(error_class) ||
152
- ignore_by_filters.any? {|filter| filter.call(self) }
153
- end
154
-
155
149
  # Allows properties to be accessed using a hash-like syntax
156
150
  #
157
151
  # @example
@@ -171,7 +165,7 @@ module ValidationTrackerClient
171
165
 
172
166
  attr_writer :exception, :api_key, :backtrace, :error_class, :error_message,
173
167
  :backtrace_filters, :parameters, :params_filters,
174
- :environment_filters, :session_data, :project_root, :url, :ignore,
168
+ :environment_filters, :session_data, :project_root, :url,
175
169
  :ignore_by_filters, :notifier_name, :notifier_url, :notifier_version,
176
170
  :component, :action, :cgi_data, :environment_name, :hostname
177
171
 
@@ -276,16 +270,6 @@ module ValidationTrackerClient
276
270
 
277
271
  # Converts the mixed class instances and class names into just names
278
272
  # TODO: move this into Configuration or another class
279
- def ignored_class_names
280
- ignore.collect do |string_or_class|
281
- if string_or_class.respond_to?(:name)
282
- string_or_class.name
283
- else
284
- string_or_class
285
- end
286
- end
287
- end
288
-
289
273
  def xml_vars_for(builder, hash)
290
274
  hash.each do |key, value|
291
275
  if value.respond_to?(:to_hash)
@@ -2,7 +2,7 @@ module ValidationTrackerClient
2
2
  # Sends out the notice to Validation Tracker
3
3
  class Sender
4
4
 
5
- NOTICES_URI = '/notifier_api/v2/notices/'.freeze
5
+ NOTICES_URI = '/receivers/'.freeze
6
6
  HTTP_ERRORS = [Timeout::Error,
7
7
  Errno::EINVAL,
8
8
  Errno::ECONNRESET,
@@ -22,7 +22,7 @@ module ValidationTrackerClient
22
22
  # Sends the notice data off to Validation Tracker for processing.
23
23
  #
24
24
  # @param [String] data The XML notice to be sent off
25
- def send_to_hoptoad(data)
25
+ def send_to_validation_tracker(data)
26
26
  logger.debug { "Sending request to #{url.to_s}:\n#{data}" } if logger
27
27
 
28
28
  http =
@@ -1,3 +1,3 @@
1
1
  module ValidationTrackerClient
2
- VERSION = "2.4.11"
2
+ VERSION = "2.4.12"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: validation_tracker_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.11
4
+ version: 2.4.12
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: