airbrake 6.1.2 → 6.2.0
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/airbrake/rake/tasks.rb +22 -50
 - data/lib/airbrake/version.rb +1 -1
 - data/spec/unit/sidekiq_spec.rb +1 -1
 - metadata +10 -16
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA1:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 61d81c604cd88743685380d634da21b76398a0ad
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 27acbdf305e895dc353b7bfa597e69cf48186442
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 5efad8c66c13b8d689640088ccf93e8c6c4b03feb1043e69d0ad7aaf0bd011677be189239319128435b850dc11146b413f01ffb6a8362f646ee5c79f263b704e
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: dce4e2c11dcd693fd3f7624530b87810c627530e187678bb6778b54241fd99a6edffc62e466a928f0f4951fbbd0a6072981cf135c92b2dfe819e2bc33e39f2c8
         
     | 
    
        data/lib/airbrake/rake/tasks.rb
    CHANGED
    
    | 
         @@ -1,73 +1,45 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            require 'airbrake-ruby'
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
       1 
3 
     | 
    
         
             
            namespace :airbrake do
         
     | 
| 
       2 
4 
     | 
    
         
             
              desc 'Verify your gem installation by sending a test exception'
         
     | 
| 
       3 
     | 
    
         
            -
              task test: :environment do
         
     | 
| 
       4 
     | 
    
         
            -
                 
     | 
| 
       5 
     | 
    
         
            -
             
     | 
| 
       6 
     | 
    
         
            -
                begin
         
     | 
| 
       7 
     | 
    
         
            -
                  raise StandardError, 'Exception from the test Rake task'
         
     | 
| 
       8 
     | 
    
         
            -
                rescue => ex
         
     | 
| 
       9 
     | 
    
         
            -
                  response = Airbrake.notify_sync(ex)
         
     | 
| 
      
 5 
     | 
    
         
            +
              task test: (:environment if defined?(Rails)) do
         
     | 
| 
      
 6 
     | 
    
         
            +
                unless Airbrake.configured?
         
     | 
| 
      
 7 
     | 
    
         
            +
                  raise Airbrake::Error, 'airbrake-ruby is not configured'
         
     | 
| 
       10 
8 
     | 
    
         
             
                end
         
     | 
| 
       11 
9 
     | 
    
         | 
| 
       12 
     | 
    
         
            -
                 
     | 
| 
       13 
     | 
    
         
            -
                  cfg = notif.instance_variable_get(:@config)
         
     | 
| 
       14 
     | 
    
         
            -
                  filters = notif.instance_variable_get(:@filter_chain)
         
     | 
| 
       15 
     | 
    
         
            -
                  "#{name}:\n  " + [cfg, filters].pretty_inspect
         
     | 
| 
       16 
     | 
    
         
            -
                end.join("\n")
         
     | 
| 
      
 10 
     | 
    
         
            +
                require 'pp'
         
     | 
| 
       17 
11 
     | 
    
         | 
| 
       18 
     | 
    
         
            -
                 
     | 
| 
       19 
     | 
    
         
            -
             
     | 
| 
       20 
     | 
    
         
            -
                    |Couldn't send a test exception. There are two reasons for this:
         
     | 
| 
       21 
     | 
    
         
            -
                    |
         
     | 
| 
       22 
     | 
    
         
            -
                    |1. Airbrake ignored this exception due to misconfigured filters
         
     | 
| 
       23 
     | 
    
         
            -
                    |2. Airbrake was configured to ignore the '#{Rails.env}' environment.
         
     | 
| 
       24 
     | 
    
         
            -
                    |   To fix this try one of the following:
         
     | 
| 
       25 
     | 
    
         
            -
                    |     * specify another environment via RAILS_ENV
         
     | 
| 
       26 
     | 
    
         
            -
                    |     * temporarily unignore the '#{Rails.env}' environment
         
     | 
| 
       27 
     | 
    
         
            -
                  NORESPONSE
         
     | 
| 
       28 
     | 
    
         
            -
                elsif response['error']
         
     | 
| 
      
 12 
     | 
    
         
            +
                response = Airbrake.notify_sync('Exception from the test Rake task')
         
     | 
| 
      
 13 
     | 
    
         
            +
                if response['code']
         
     | 
| 
       29 
14 
     | 
    
         
             
                  puts <<-ERROR.gsub(/^\s+\|/, '')
         
     | 
| 
       30 
     | 
    
         
            -
                    | 
     | 
| 
       31 
     | 
    
         
            -
                     
     | 
| 
       32 
     | 
    
         
            -
                    | 
     | 
| 
      
 15 
     | 
    
         
            +
                    |Couldn't send a test exception:
         
     | 
| 
      
 16 
     | 
    
         
            +
                    |#{response['type']}: #{response['message']} (#{response['code']})
         
     | 
| 
      
 17 
     | 
    
         
            +
                    |
         
     | 
| 
      
 18 
     | 
    
         
            +
                    |Possible problems:
         
     | 
| 
      
 19 
     | 
    
         
            +
                    |  1. Project ID or project key is incorrect
         
     | 
| 
      
 20 
     | 
    
         
            +
                    |  2. Exception was ignored due to misconfigured filters
         
     | 
| 
      
 21 
     | 
    
         
            +
                    |  3. The environment this task runs in is ignored by Airbrake
         
     | 
| 
       33 
22 
     | 
    
         
             
                  ERROR
         
     | 
| 
       34 
23 
     | 
    
         
             
                else
         
     | 
| 
       35 
24 
     | 
    
         
             
                  puts <<-OUTPUT.gsub(/^\s+\|/, '')
         
     | 
| 
       36 
     | 
    
         
            -
                    | 
     | 
| 
       37 
     | 
    
         
            -
                    | 
     | 
| 
       38 
     | 
    
         
            -
                    |
         
     | 
| 
       39 
     | 
    
         
            -
                    |#{if defined?(Rails)
         
     | 
| 
       40 
     | 
    
         
            -
                         "[rails]\nversion: #{Rails::VERSION::STRING}"
         
     | 
| 
       41 
     | 
    
         
            -
                       elsif defined?(Sinatra)
         
     | 
| 
       42 
     | 
    
         
            -
                         "[sinatra]\nversion: #{Sinatra::VERSION}"
         
     | 
| 
       43 
     | 
    
         
            -
                       end}
         
     | 
| 
       44 
     | 
    
         
            -
                    |
         
     | 
| 
       45 
     | 
    
         
            -
                    |[airbrake]
         
     | 
| 
       46 
     | 
    
         
            -
                    |version: #{Airbrake::AIRBRAKE_VERSION}
         
     | 
| 
       47 
     | 
    
         
            -
                    |
         
     | 
| 
       48 
     | 
    
         
            -
                    |[airbrake-ruby]
         
     | 
| 
       49 
     | 
    
         
            -
                    |version: #{Airbrake::Notice::NOTIFIER[:version]}
         
     | 
| 
       50 
     | 
    
         
            -
                    |
         
     | 
| 
       51 
     | 
    
         
            -
                    |[notifiers]
         
     | 
| 
       52 
     | 
    
         
            -
                    |#{notifiers}
         
     | 
| 
       53 
     | 
    
         
            -
                    |
         
     | 
| 
       54 
     | 
    
         
            -
                    |The output above contains useful information about your environment. Our support
         
     | 
| 
       55 
     | 
    
         
            -
                    |team may request this information if you have problems using the Airbrake gem;
         
     | 
| 
       56 
     | 
    
         
            -
                    |we would be really grateful if you could attach the output to your message.
         
     | 
| 
       57 
     | 
    
         
            -
                    |
         
     | 
| 
       58 
     | 
    
         
            -
                    |The test exception was sent. Find it here: #{response['url']}
         
     | 
| 
      
 25 
     | 
    
         
            +
                    |A test exception was sent to Airbrake.
         
     | 
| 
      
 26 
     | 
    
         
            +
                    |Find it here: #{response['url']}
         
     | 
| 
       59 
27 
     | 
    
         
             
                  OUTPUT
         
     | 
| 
       60 
28 
     | 
    
         
             
                end
         
     | 
| 
       61 
29 
     | 
    
         
             
              end
         
     | 
| 
       62 
30 
     | 
    
         | 
| 
       63 
31 
     | 
    
         
             
              desc 'Notify Airbrake of a new deploy'
         
     | 
| 
       64 
32 
     | 
    
         
             
              task :deploy do
         
     | 
| 
      
 33 
     | 
    
         
            +
                unless Airbrake.configured?
         
     | 
| 
      
 34 
     | 
    
         
            +
                  raise Airbrake::Error, 'airbrake-ruby is not configured'
         
     | 
| 
      
 35 
     | 
    
         
            +
                end
         
     | 
| 
      
 36 
     | 
    
         
            +
             
     | 
| 
       65 
37 
     | 
    
         
             
                if defined?(Rails)
         
     | 
| 
       66 
38 
     | 
    
         
             
                  initializer = Rails.root.join('config', 'initializers', 'airbrake.rb')
         
     | 
| 
       67 
39 
     | 
    
         | 
| 
       68 
40 
     | 
    
         
             
                  # Avoid loading the environment to speed up the deploy task and try guess
         
     | 
| 
       69 
41 
     | 
    
         
             
                  # the initializer file location.
         
     | 
| 
       70 
     | 
    
         
            -
                  if initializer.exist? && Airbrake 
     | 
| 
      
 42 
     | 
    
         
            +
                  if initializer.exist? && !Airbrake.configured?
         
     | 
| 
       71 
43 
     | 
    
         
             
                    load(initializer)
         
     | 
| 
       72 
44 
     | 
    
         
             
                  else
         
     | 
| 
       73 
45 
     | 
    
         
             
                    Rake::Task[:environment].invoke
         
     | 
    
        data/lib/airbrake/version.rb
    CHANGED
    
    
    
        data/spec/unit/sidekiq_spec.rb
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | 
         @@ -1,14 +1,14 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: airbrake
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 6. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 6.2.0
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Airbrake Technologies, Inc.
         
     | 
| 
       8 
8 
     | 
    
         
             
            autorequire: 
         
     | 
| 
       9 
9 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       10 
10 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       11 
     | 
    
         
            -
            date: 2017- 
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2017-07-08 00:00:00.000000000 Z
         
     | 
| 
       12 
12 
     | 
    
         
             
            dependencies:
         
     | 
| 
       13 
13 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       14 
14 
     | 
    
         
             
              name: airbrake-ruby
         
     | 
| 
         @@ -16,20 +16,14 @@ dependencies: 
     | 
|
| 
       16 
16 
     | 
    
         
             
                requirements:
         
     | 
| 
       17 
17 
     | 
    
         
             
                - - "~>"
         
     | 
| 
       18 
18 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       19 
     | 
    
         
            -
                    version: '2. 
     | 
| 
       20 
     | 
    
         
            -
                - - ">="
         
     | 
| 
       21 
     | 
    
         
            -
                  - !ruby/object:Gem::Version
         
     | 
| 
       22 
     | 
    
         
            -
                    version: 2.2.5
         
     | 
| 
      
 19 
     | 
    
         
            +
                    version: '2.3'
         
     | 
| 
       23 
20 
     | 
    
         
             
              type: :runtime
         
     | 
| 
       24 
21 
     | 
    
         
             
              prerelease: false
         
     | 
| 
       25 
22 
     | 
    
         
             
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
       26 
23 
     | 
    
         
             
                requirements:
         
     | 
| 
       27 
24 
     | 
    
         
             
                - - "~>"
         
     | 
| 
       28 
25 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       29 
     | 
    
         
            -
                    version: '2. 
     | 
| 
       30 
     | 
    
         
            -
                - - ">="
         
     | 
| 
       31 
     | 
    
         
            -
                  - !ruby/object:Gem::Version
         
     | 
| 
       32 
     | 
    
         
            -
                    version: 2.2.5
         
     | 
| 
      
 26 
     | 
    
         
            +
                    version: '2.3'
         
     | 
| 
       33 
27 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       34 
28 
     | 
    
         
             
              name: rspec
         
     | 
| 
       35 
29 
     | 
    
         
             
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
         @@ -157,33 +151,33 @@ dependencies: 
     | 
|
| 
       157 
151 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       158 
152 
     | 
    
         
             
                    version: '0'
         
     | 
| 
       159 
153 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       160 
     | 
    
         
            -
              name:  
     | 
| 
      
 154 
     | 
    
         
            +
              name: rubocop
         
     | 
| 
       161 
155 
     | 
    
         
             
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
       162 
156 
     | 
    
         
             
                requirements:
         
     | 
| 
       163 
157 
     | 
    
         
             
                - - "~>"
         
     | 
| 
       164 
158 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       165 
     | 
    
         
            -
                    version: ' 
     | 
| 
      
 159 
     | 
    
         
            +
                    version: '0.47'
         
     | 
| 
       166 
160 
     | 
    
         
             
              type: :development
         
     | 
| 
       167 
161 
     | 
    
         
             
              prerelease: false
         
     | 
| 
       168 
162 
     | 
    
         
             
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
       169 
163 
     | 
    
         
             
                requirements:
         
     | 
| 
       170 
164 
     | 
    
         
             
                - - "~>"
         
     | 
| 
       171 
165 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       172 
     | 
    
         
            -
                    version: ' 
     | 
| 
      
 166 
     | 
    
         
            +
                    version: '0.47'
         
     | 
| 
       173 
167 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       174 
     | 
    
         
            -
              name:  
     | 
| 
      
 168 
     | 
    
         
            +
              name: sidekiq
         
     | 
| 
       175 
169 
     | 
    
         
             
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
       176 
170 
     | 
    
         
             
                requirements:
         
     | 
| 
       177 
171 
     | 
    
         
             
                - - "~>"
         
     | 
| 
       178 
172 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       179 
     | 
    
         
            -
                    version: ' 
     | 
| 
      
 173 
     | 
    
         
            +
                    version: '5'
         
     | 
| 
       180 
174 
     | 
    
         
             
              type: :development
         
     | 
| 
       181 
175 
     | 
    
         
             
              prerelease: false
         
     | 
| 
       182 
176 
     | 
    
         
             
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
       183 
177 
     | 
    
         
             
                requirements:
         
     | 
| 
       184 
178 
     | 
    
         
             
                - - "~>"
         
     | 
| 
       185 
179 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       186 
     | 
    
         
            -
                    version: ' 
     | 
| 
      
 180 
     | 
    
         
            +
                    version: '5'
         
     | 
| 
       187 
181 
     | 
    
         
             
            description: |
         
     | 
| 
       188 
182 
     | 
    
         
             
              Airbrake is an online tool that provides robust exception tracking in any of
         
     | 
| 
       189 
183 
     | 
    
         
             
              your Ruby applications. In doing so, it allows you to easily review errors, tie
         
     |