trackets 0.0.6 → 0.0.7
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.
- checksums.yaml +4 -4
 - data/lib/trackets.rb +2 -2
 - data/lib/trackets/client.rb +7 -4
 - data/lib/trackets/jobs/notice_job.rb +2 -2
 - data/lib/trackets/params.rb +3 -2
 - data/lib/trackets/plugins/loader.rb +4 -4
 - data/lib/trackets/plugins/sidekiq.rb +1 -1
 - data/lib/trackets/version.rb +1 -1
 - 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: 39b324faf07a639b3c18221aec426ab4e89127a1
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 6c991c9f52bf05c7cb3e8a3fc5e3444231ed17f4
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 47662ce7e9357418172562eaa1202d5722bc12e6bd316da244e583b3e7b76c3b019c33c9d78c63753a9b0ac5a0493f766156482f8016b7aa04a1a8343756603f
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: dffe23ccec78042c164029e10b9815990881459b3cbdfe2e6b7ec0049a509eb280bcc28d554796b3f681961fb836e20adcbed3d8e356be96d6f2c29de637df5b
         
     | 
    
        data/lib/trackets.rb
    CHANGED
    
    | 
         @@ -18,13 +18,13 @@ module Trackets 
     | 
|
| 
       18 
18 
     | 
    
         
             
                  @configuration ||= Configuration.new
         
     | 
| 
       19 
19 
     | 
    
         
             
                end
         
     | 
| 
       20 
20 
     | 
    
         | 
| 
       21 
     | 
    
         
            -
                def notify(exception, env = nil)
         
     | 
| 
      
 21 
     | 
    
         
            +
                def notify(exception, env = nil, additional_info = nil)
         
     | 
| 
       22 
22 
     | 
    
         
             
                  return unless Trackets.configuration.enabled?
         
     | 
| 
       23 
23 
     | 
    
         | 
| 
       24 
24 
     | 
    
         
             
                  job = NoticeJob.new
         
     | 
| 
       25 
25 
     | 
    
         
             
                  job = job.async if Trackets.configuration.async?
         
     | 
| 
       26 
26 
     | 
    
         | 
| 
       27 
     | 
    
         
            -
                  job.perform(exception, env)
         
     | 
| 
      
 27 
     | 
    
         
            +
                  job.perform(exception, env, additional_info)
         
     | 
| 
       28 
28 
     | 
    
         
             
                end
         
     | 
| 
       29 
29 
     | 
    
         | 
| 
       30 
30 
     | 
    
         
             
                class TracketsCustomException < StandardError; end
         
     | 
    
        data/lib/trackets/client.rb
    CHANGED
    
    | 
         @@ -11,17 +11,19 @@ module Trackets 
     | 
|
| 
       11 
11 
     | 
    
         | 
| 
       12 
12 
     | 
    
         
             
                class << self
         
     | 
| 
       13 
13 
     | 
    
         | 
| 
       14 
     | 
    
         
            -
                  def notify(exception, env)
         
     | 
| 
       15 
     | 
    
         
            -
                    new(exception, env).send
         
     | 
| 
      
 14 
     | 
    
         
            +
                  def notify(exception, env, additional_info = {})
         
     | 
| 
      
 15 
     | 
    
         
            +
                    new(exception, env, additional_info).send
         
     | 
| 
       16 
16 
     | 
    
         
             
                  end
         
     | 
| 
       17 
17 
     | 
    
         | 
| 
       18 
18 
     | 
    
         
             
                end
         
     | 
| 
       19 
19 
     | 
    
         | 
| 
       20 
20 
     | 
    
         
             
                attr_reader :exception, :env
         
     | 
| 
      
 21 
     | 
    
         
            +
                attr_accessor :additional_info
         
     | 
| 
       21 
22 
     | 
    
         | 
| 
       22 
     | 
    
         
            -
                def initialize(exception, env)
         
     | 
| 
      
 23 
     | 
    
         
            +
                def initialize(exception, env, additional_info)
         
     | 
| 
       23 
24 
     | 
    
         
             
                  @exception = exception
         
     | 
| 
       24 
25 
     | 
    
         
             
                  @env = env
         
     | 
| 
      
 26 
     | 
    
         
            +
                  @additional_info = additional_info
         
     | 
| 
       25 
27 
     | 
    
         
             
                end
         
     | 
| 
       26 
28 
     | 
    
         | 
| 
       27 
29 
     | 
    
         
             
                def backtrace
         
     | 
| 
         @@ -46,7 +48,8 @@ module Trackets 
     | 
|
| 
       46 
48 
     | 
    
         
             
                    environment_name: config.environment_name,
         
     | 
| 
       47 
49 
     | 
    
         
             
                    project_root:     config.project_root,
         
     | 
| 
       48 
50 
     | 
    
         
             
                    framework:        config.framework,
         
     | 
| 
       49 
     | 
    
         
            -
                    params:           params.filtered
         
     | 
| 
      
 51 
     | 
    
         
            +
                    params:           params.filtered,
         
     | 
| 
      
 52 
     | 
    
         
            +
                    additional_info:  additional_info
         
     | 
| 
       50 
53 
     | 
    
         
             
                  }
         
     | 
| 
       51 
54 
     | 
    
         
             
                end
         
     | 
| 
       52 
55 
     | 
    
         | 
    
        data/lib/trackets/params.rb
    CHANGED
    
    | 
         @@ -3,8 +3,9 @@ module Trackets 
     | 
|
| 
       3 
3 
     | 
    
         | 
| 
       4 
4 
     | 
    
         
             
                attr_reader :rack_env
         
     | 
| 
       5 
5 
     | 
    
         | 
| 
       6 
     | 
    
         
            -
                def initialize(rack_env)
         
     | 
| 
      
 6 
     | 
    
         
            +
                def initialize(rack_env, hash = nil)
         
     | 
| 
       7 
7 
     | 
    
         
             
                  @rack_env = rack_env
         
     | 
| 
      
 8 
     | 
    
         
            +
                  @hash = hash
         
     | 
| 
       8 
9 
     | 
    
         
             
                end
         
     | 
| 
       9 
10 
     | 
    
         | 
| 
       10 
11 
     | 
    
         
             
                def request
         
     | 
| 
         @@ -18,7 +19,7 @@ module Trackets 
     | 
|
| 
       18 
19 
     | 
    
         
             
                def filtered
         
     | 
| 
       19 
20 
     | 
    
         
             
                  hash.inject({}) do |ret, (key, value)|
         
     | 
| 
       20 
21 
     | 
    
         
             
                    ret[key] = if value.kind_of?(Hash)
         
     | 
| 
       21 
     | 
    
         
            -
                      self.class.new(value).filtered
         
     | 
| 
      
 22 
     | 
    
         
            +
                      self.class.new(nil, value).filtered
         
     | 
| 
       22 
23 
     | 
    
         
             
                    else
         
     | 
| 
       23 
24 
     | 
    
         
             
                      Trackets.configuration.blacklisted_key?(key, rack_env) ? "[FILTERED]" : value
         
     | 
| 
       24 
25 
     | 
    
         
             
                    end
         
     | 
| 
         @@ -4,10 +4,10 @@ module Trackets 
     | 
|
| 
       4 
4 
     | 
    
         | 
| 
       5 
5 
     | 
    
         
             
                  def initialize
         
     | 
| 
       6 
6 
     | 
    
         
             
                    Trackets.configuration.load_plugins.each do |plugin_name|
         
     | 
| 
       7 
     | 
    
         
            -
                      require "trackets/plugins/#{plugin_name}"
         
     | 
| 
       8 
     | 
    
         
            -
             
     | 
| 
       9 
     | 
    
         
            -
             
     | 
| 
       10 
     | 
    
         
            -
                       
     | 
| 
      
 7 
     | 
    
         
            +
                      if require "trackets/plugins/#{plugin_name}"
         
     | 
| 
      
 8 
     | 
    
         
            +
                        class_name = plugin_name.to_s.split('_').map{|e| e.capitalize}.join
         
     | 
| 
      
 9 
     | 
    
         
            +
                        Trackets::Plugins.const_get(class_name).new
         
     | 
| 
      
 10 
     | 
    
         
            +
                      end
         
     | 
| 
       11 
11 
     | 
    
         
             
                    end
         
     | 
| 
       12 
12 
     | 
    
         
             
                  end
         
     | 
| 
       13 
13 
     | 
    
         | 
| 
         @@ -5,7 +5,7 @@ module Trackets 
     | 
|
| 
       5 
5 
     | 
    
         
             
                  def initialize
         
     | 
| 
       6 
6 
     | 
    
         
             
                    if defined?(::Sidekiq)
         
     | 
| 
       7 
7 
     | 
    
         
             
                      ::Sidekiq.configure_server do |config|
         
     | 
| 
       8 
     | 
    
         
            -
                        config.error_handlers << Proc.new {|ex,ctx_hash| Trackets.notify(ex) }
         
     | 
| 
      
 8 
     | 
    
         
            +
                        config.error_handlers << Proc.new {|ex,ctx_hash| Trackets.notify(ex, nil, sidekiq_context: ctx_hash) }
         
     | 
| 
       9 
9 
     | 
    
         
             
                      end
         
     | 
| 
       10 
10 
     | 
    
         
             
                    end
         
     | 
| 
       11 
11 
     | 
    
         
             
                  end
         
     | 
    
        data/lib/trackets/version.rb
    CHANGED
    
    
    
        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. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 0.0.7
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Trackets
         
     | 
| 
       8 
8 
     | 
    
         
             
            autorequire: 
         
     | 
| 
       9 
9 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       10 
10 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       11 
     | 
    
         
            -
            date: 2014- 
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2014-07-09 00:00:00.000000000 Z
         
     | 
| 
       12 
12 
     | 
    
         
             
            dependencies:
         
     | 
| 
       13 
13 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       14 
14 
     | 
    
         
             
              name: json
         
     | 
| 
         @@ -205,3 +205,4 @@ test_files: 
     | 
|
| 
       205 
205 
     | 
    
         
             
            - features/support/env.rb
         
     | 
| 
       206 
206 
     | 
    
         
             
            - features/support/rails.rb
         
     | 
| 
       207 
207 
     | 
    
         
             
            - features/support/templates/trackets_interceptor.rb
         
     | 
| 
      
 208 
     | 
    
         
            +
            has_rdoc: 
         
     |