airbrake-ruby 5.0.0.rc.2-java → 5.0.1-java
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-ruby/backtrace.rb +6 -5
- data/lib/airbrake-ruby/config.rb +8 -36
- data/lib/airbrake-ruby/config/processor.rb +7 -3
- data/lib/airbrake-ruby/config/validator.rb +2 -0
- data/lib/airbrake-ruby/file_cache.rb +1 -1
- data/lib/airbrake-ruby/filter_chain.rb +1 -0
- data/lib/airbrake-ruby/filters/dependency_filter.rb +1 -0
- data/lib/airbrake-ruby/filters/gem_root_filter.rb +1 -0
- data/lib/airbrake-ruby/filters/git_last_checkout_filter.rb +1 -2
- data/lib/airbrake-ruby/filters/git_repository_filter.rb +3 -0
- data/lib/airbrake-ruby/filters/git_revision_filter.rb +2 -0
- data/lib/airbrake-ruby/filters/keys_filter.rb +21 -13
- data/lib/airbrake-ruby/filters/root_directory_filter.rb +1 -0
- data/lib/airbrake-ruby/filters/sql_filter.rb +4 -4
- data/lib/airbrake-ruby/filters/system_exit_filter.rb +1 -0
- data/lib/airbrake-ruby/filters/thread_filter.rb +2 -0
- data/lib/airbrake-ruby/ignorable.rb +1 -0
- data/lib/airbrake-ruby/notice_notifier.rb +1 -0
- data/lib/airbrake-ruby/performance_breakdown.rb +1 -6
- data/lib/airbrake-ruby/performance_notifier.rb +1 -14
- data/lib/airbrake-ruby/promise.rb +1 -0
- data/lib/airbrake-ruby/query.rb +1 -6
- data/lib/airbrake-ruby/queue.rb +1 -8
- data/lib/airbrake-ruby/remote_settings.rb +7 -5
- data/lib/airbrake-ruby/remote_settings/settings_data.rb +15 -10
- data/lib/airbrake-ruby/request.rb +1 -8
- data/lib/airbrake-ruby/stat.rb +1 -12
- data/lib/airbrake-ruby/sync_sender.rb +1 -0
- data/lib/airbrake-ruby/tdigest.rb +2 -0
- data/lib/airbrake-ruby/thread_pool.rb +1 -0
- data/lib/airbrake-ruby/truncator.rb +8 -2
- data/lib/airbrake-ruby/version.rb +2 -2
- data/spec/backtrace_spec.rb +26 -26
- data/spec/code_hunk_spec.rb +2 -2
- data/spec/config/processor_spec.rb +5 -19
- data/spec/config_spec.rb +4 -29
- data/spec/filters/gem_root_filter_spec.rb +4 -4
- data/spec/filters/keys_allowlist_spec.rb +1 -0
- data/spec/filters/keys_blocklist_spec.rb +10 -0
- data/spec/filters/root_directory_filter_spec.rb +4 -4
- data/spec/filters/sql_filter_spec.rb +2 -2
- data/spec/notice_notifier/options_spec.rb +2 -2
- data/spec/notice_notifier_spec.rb +2 -2
- data/spec/notice_spec.rb +1 -1
- data/spec/performance_breakdown_spec.rb +0 -12
- data/spec/performance_notifier_spec.rb +0 -25
- data/spec/query_spec.rb +1 -11
- data/spec/queue_spec.rb +1 -13
- data/spec/remote_settings/settings_data_spec.rb +64 -13
- data/spec/remote_settings_spec.rb +14 -14
- data/spec/request_spec.rb +1 -13
- data/spec/spec_helper.rb +4 -4
- data/spec/stat_spec.rb +0 -9
- metadata +5 -5
| @@ -1,9 +1,9 @@ | |
| 1 1 | 
             
            RSpec.describe Airbrake::RemoteSettings do
         | 
| 2 2 | 
             
              let(:project_id) { 123 }
         | 
| 3 | 
            +
              let(:host) { 'https://v1-production-notifier-configs.s3.amazonaws.com' }
         | 
| 3 4 |  | 
| 4 5 | 
             
              let(:endpoint) do
         | 
| 5 | 
            -
                " | 
| 6 | 
            -
                "#{project_id}/config.json"
         | 
| 6 | 
            +
                "#{host}/2020-06-18/config/#{project_id}/config.json"
         | 
| 7 7 | 
             
              end
         | 
| 8 8 |  | 
| 9 9 | 
             
              let(:body) do
         | 
| @@ -51,7 +51,7 @@ RSpec.describe Airbrake::RemoteSettings do | |
| 51 51 | 
             
                    expect(File).to receive(:read).with(config_path)
         | 
| 52 52 | 
             
                    expect(settings_data).to receive(:merge!).with(body).twice
         | 
| 53 53 |  | 
| 54 | 
            -
                    remote_settings = described_class.poll(project_id) {}
         | 
| 54 | 
            +
                    remote_settings = described_class.poll(project_id, host) {}
         | 
| 55 55 | 
             
                    sleep(0.2)
         | 
| 56 56 | 
             
                    remote_settings.stop_polling
         | 
| 57 57 |  | 
| @@ -62,7 +62,7 @@ RSpec.describe Airbrake::RemoteSettings do | |
| 62 62 | 
             
                    block = proc {}
         | 
| 63 63 | 
             
                    expect(block).to receive(:call).twice
         | 
| 64 64 |  | 
| 65 | 
            -
                    remote_settings = described_class.poll(project_id, &block)
         | 
| 65 | 
            +
                    remote_settings = described_class.poll(project_id, host, &block)
         | 
| 66 66 | 
             
                    sleep(0.2)
         | 
| 67 67 | 
             
                    remote_settings.stop_polling
         | 
| 68 68 |  | 
| @@ -76,7 +76,7 @@ RSpec.describe Airbrake::RemoteSettings do | |
| 76 76 | 
             
                        '**Airbrake: config loading failed: StandardError',
         | 
| 77 77 | 
             
                      )
         | 
| 78 78 |  | 
| 79 | 
            -
                      remote_settings = described_class.poll(project_id) {}
         | 
| 79 | 
            +
                      remote_settings = described_class.poll(project_id, host) {}
         | 
| 80 80 | 
             
                      sleep(0.2)
         | 
| 81 81 | 
             
                      remote_settings.stop_polling
         | 
| 82 82 |  | 
| @@ -87,7 +87,7 @@ RSpec.describe Airbrake::RemoteSettings do | |
| 87 87 |  | 
| 88 88 | 
             
                context "when no errors are raised" do
         | 
| 89 89 | 
             
                  it "makes a request to AWS S3" do
         | 
| 90 | 
            -
                    remote_settings = described_class.poll(project_id) {}
         | 
| 90 | 
            +
                    remote_settings = described_class.poll(project_id, host) {}
         | 
| 91 91 | 
             
                    sleep(0.1)
         | 
| 92 92 | 
             
                    remote_settings.stop_polling
         | 
| 93 93 |  | 
| @@ -95,7 +95,7 @@ RSpec.describe Airbrake::RemoteSettings do | |
| 95 95 | 
             
                  end
         | 
| 96 96 |  | 
| 97 97 | 
             
                  it "sends params about the environment with the request" do
         | 
| 98 | 
            -
                    remote_settings = described_class.poll(project_id) {}
         | 
| 98 | 
            +
                    remote_settings = described_class.poll(project_id, host) {}
         | 
| 99 99 | 
             
                    sleep(0.1)
         | 
| 100 100 | 
             
                    remote_settings.stop_polling
         | 
| 101 101 |  | 
| @@ -107,7 +107,7 @@ RSpec.describe Airbrake::RemoteSettings do | |
| 107 107 |  | 
| 108 108 | 
             
                  it "fetches remote settings" do
         | 
| 109 109 | 
             
                    settings = nil
         | 
| 110 | 
            -
                    remote_settings = described_class.poll(project_id) do |data|
         | 
| 110 | 
            +
                    remote_settings = described_class.poll(project_id, host) do |data|
         | 
| 111 111 | 
             
                      settings = data
         | 
| 112 112 | 
             
                    end
         | 
| 113 113 | 
             
                    sleep(0.1)
         | 
| @@ -126,7 +126,7 @@ RSpec.describe Airbrake::RemoteSettings do | |
| 126 126 |  | 
| 127 127 | 
             
                  it "doesn't fetch remote settings" do
         | 
| 128 128 | 
             
                    settings = nil
         | 
| 129 | 
            -
                    remote_settings = described_class.poll(project_id) do |data|
         | 
| 129 | 
            +
                    remote_settings = described_class.poll(project_id, host) do |data|
         | 
| 130 130 | 
             
                      settings = data
         | 
| 131 131 | 
             
                    end
         | 
| 132 132 | 
             
                    sleep(0.1)
         | 
| @@ -144,7 +144,7 @@ RSpec.describe Airbrake::RemoteSettings do | |
| 144 144 |  | 
| 145 145 | 
             
                  it "doesn't update settings data" do
         | 
| 146 146 | 
             
                    settings = nil
         | 
| 147 | 
            -
                    remote_settings = described_class.poll(project_id) do |data|
         | 
| 147 | 
            +
                    remote_settings = described_class.poll(project_id, host) do |data|
         | 
| 148 148 | 
             
                      settings = data
         | 
| 149 149 | 
             
                    end
         | 
| 150 150 | 
             
                    sleep(0.1)
         | 
| @@ -163,7 +163,7 @@ RSpec.describe Airbrake::RemoteSettings do | |
| 163 163 |  | 
| 164 164 | 
             
                  it "doesn't update settings data" do
         | 
| 165 165 | 
             
                    settings = nil
         | 
| 166 | 
            -
                    remote_settings = described_class.poll(project_id) do |data|
         | 
| 166 | 
            +
                    remote_settings = described_class.poll(project_id, host) do |data|
         | 
| 167 167 | 
             
                      settings = data
         | 
| 168 168 | 
             
                    end
         | 
| 169 169 | 
             
                    sleep(0.1)
         | 
| @@ -189,7 +189,7 @@ RSpec.describe Airbrake::RemoteSettings do | |
| 189 189 | 
             
                  end
         | 
| 190 190 |  | 
| 191 191 | 
             
                  it "makes the next request to the specified config route" do
         | 
| 192 | 
            -
                    remote_settings = described_class.poll(project_id) {}
         | 
| 192 | 
            +
                    remote_settings = described_class.poll(project_id, host) {}
         | 
| 193 193 | 
             
                    sleep(0.2)
         | 
| 194 194 |  | 
| 195 195 | 
             
                    remote_settings.stop_polling
         | 
| @@ -205,7 +205,7 @@ RSpec.describe Airbrake::RemoteSettings do | |
| 205 205 | 
             
                  expect(Dir).to receive(:mkdir).with(config_dir)
         | 
| 206 206 | 
             
                  expect(File).to receive(:write).with(config_path, body.to_json)
         | 
| 207 207 |  | 
| 208 | 
            -
                  remote_settings = described_class.poll(project_id) {}
         | 
| 208 | 
            +
                  remote_settings = described_class.poll(project_id, host) {}
         | 
| 209 209 | 
             
                  sleep(0.2)
         | 
| 210 210 | 
             
                  remote_settings.stop_polling
         | 
| 211 211 |  | 
| @@ -219,7 +219,7 @@ RSpec.describe Airbrake::RemoteSettings do | |
| 219 219 | 
             
                      '**Airbrake: config dumping failed: StandardError',
         | 
| 220 220 | 
             
                    )
         | 
| 221 221 |  | 
| 222 | 
            -
                    remote_settings = described_class.poll(project_id) {}
         | 
| 222 | 
            +
                    remote_settings = described_class.poll(project_id, host) {}
         | 
| 223 223 | 
             
                    sleep(0.2)
         | 
| 224 224 | 
             
                    remote_settings.stop_polling
         | 
| 225 225 |  | 
    
        data/spec/request_spec.rb
    CHANGED
    
    | @@ -1,21 +1,9 @@ | |
| 1 1 | 
             
            RSpec.describe Airbrake::Request do
         | 
| 2 2 | 
             
              describe "#stash" do
         | 
| 3 3 | 
             
                subject do
         | 
| 4 | 
            -
                  described_class.new(
         | 
| 5 | 
            -
                    method: 'GET', route: '/', status_code: 200, start_time: Time.now,
         | 
| 6 | 
            -
                  )
         | 
| 4 | 
            +
                  described_class.new(method: 'GET', route: '/', status_code: 200)
         | 
| 7 5 | 
             
                end
         | 
| 8 6 |  | 
| 9 7 | 
             
                it { is_expected.to respond_to(:stash) }
         | 
| 10 8 | 
             
              end
         | 
| 11 | 
            -
             | 
| 12 | 
            -
              describe "#end_time" do
         | 
| 13 | 
            -
                it "is always equal to start_time + 1 second by default" do
         | 
| 14 | 
            -
                  time = Time.now
         | 
| 15 | 
            -
                  request = described_class.new(
         | 
| 16 | 
            -
                    method: 'GET', route: '/', status_code: 200, start_time: time,
         | 
| 17 | 
            -
                  )
         | 
| 18 | 
            -
                  expect(request.end_time).to eq(time + 1)
         | 
| 19 | 
            -
                end
         | 
| 20 | 
            -
              end
         | 
| 21 9 | 
             
            end
         | 
    
        data/spec/spec_helper.rb
    CHANGED
    
    | @@ -33,7 +33,7 @@ class AirbrakeTestError < RuntimeError | |
| 33 33 |  | 
| 34 34 | 
             
              def initialize(*)
         | 
| 35 35 | 
             
                super
         | 
| 36 | 
            -
                # rubocop:disable  | 
| 36 | 
            +
                # rubocop:disable Layout/LineLength
         | 
| 37 37 | 
             
                @backtrace = [
         | 
| 38 38 | 
             
                  "/home/kyrylo/code/airbrake/ruby/spec/spec_helper.rb:23:in `<top (required)>'",
         | 
| 39 39 | 
             
                  "/opt/rubies/ruby-2.2.2/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'",
         | 
| @@ -49,7 +49,7 @@ class AirbrakeTestError < RuntimeError | |
| 49 49 | 
             
                  "/home/kyrylo/.gem/ruby/2.2.2/gems/rspec-core-3.3.2/lib/rspec/core/runner.rb:41:in `invoke'",
         | 
| 50 50 | 
             
                  "/home/kyrylo/.gem/ruby/2.2.2/gems/rspec-core-3.3.2/exe/rspec:4:in `<main>'",
         | 
| 51 51 | 
             
                ]
         | 
| 52 | 
            -
                # rubocop:enable  | 
| 52 | 
            +
                # rubocop:enable Layout/LineLength
         | 
| 53 53 | 
             
              end
         | 
| 54 54 |  | 
| 55 55 | 
             
              # rubocop:disable Naming/AccessorMethodName
         | 
| @@ -66,7 +66,7 @@ end | |
| 66 66 | 
             
            class JavaAirbrakeTestError < AirbrakeTestError
         | 
| 67 67 | 
             
              def initialize(*)
         | 
| 68 68 | 
             
                super
         | 
| 69 | 
            -
                # rubocop:disable  | 
| 69 | 
            +
                # rubocop:disable Layout/LineLength
         | 
| 70 70 | 
             
                @backtrace = [
         | 
| 71 71 | 
             
                  "org.jruby.java.invokers.InstanceMethodInvoker.call(InstanceMethodInvoker.java:26)",
         | 
| 72 72 | 
             
                  "org.jruby.ir.interpreter.Interpreter.INTERPRET_EVAL(Interpreter.java:126)",
         | 
| @@ -80,7 +80,7 @@ class JavaAirbrakeTestError < AirbrakeTestError | |
| 80 80 | 
             
                  "org.jruby.Main.run(Main.java:225)",
         | 
| 81 81 | 
             
                  "org.jruby.Main.main(Main.java:197)",
         | 
| 82 82 | 
             
                ]
         | 
| 83 | 
            -
                # rubocop:enable  | 
| 83 | 
            +
                # rubocop:enable Layout/LineLength
         | 
| 84 84 | 
             
              end
         | 
| 85 85 |  | 
| 86 86 | 
             
              def is_a?(*)
         | 
    
        data/spec/stat_spec.rb
    CHANGED
    
    | @@ -10,15 +10,6 @@ RSpec.describe Airbrake::Stat do | |
| 10 10 | 
             
                end
         | 
| 11 11 | 
             
              end
         | 
| 12 12 |  | 
| 13 | 
            -
              describe "#increment" do
         | 
| 14 | 
            -
                let(:start_time) { Time.new(2018, 1, 1, 0, 0, 20, 0) }
         | 
| 15 | 
            -
                let(:end_time) { Time.new(2018, 1, 1, 0, 0, 22, 0) }
         | 
| 16 | 
            -
             | 
| 17 | 
            -
                before { subject.increment(start_time, end_time) }
         | 
| 18 | 
            -
             | 
| 19 | 
            -
                its(:sum) { is_expected.to eq(2000) }
         | 
| 20 | 
            -
              end
         | 
| 21 | 
            -
             | 
| 22 13 | 
             
              describe "#increment_ms" do
         | 
| 23 14 | 
             
                before { subject.increment_ms(1000) }
         | 
| 24 15 |  | 
    
        metadata
    CHANGED
    
    | @@ -1,14 +1,14 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: airbrake-ruby
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 5.0. | 
| 4 | 
            +
              version: 5.0.1
         | 
| 5 5 | 
             
            platform: java
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Airbrake Technologies, Inc.
         | 
| 8 8 | 
             
            autorequire:
         | 
| 9 9 | 
             
            bindir: bin
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date: 2020- | 
| 11 | 
            +
            date: 2020-08-17 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: rbtree-jruby
         | 
| @@ -160,12 +160,12 @@ required_ruby_version: !ruby/object:Gem::Requirement | |
| 160 160 | 
             
              requirements:
         | 
| 161 161 | 
             
              - - ">="
         | 
| 162 162 | 
             
                - !ruby/object:Gem::Version
         | 
| 163 | 
            -
                  version: '2. | 
| 163 | 
            +
                  version: '2.3'
         | 
| 164 164 | 
             
            required_rubygems_version: !ruby/object:Gem::Requirement
         | 
| 165 165 | 
             
              requirements:
         | 
| 166 | 
            -
              - - " | 
| 166 | 
            +
              - - ">="
         | 
| 167 167 | 
             
                - !ruby/object:Gem::Version
         | 
| 168 | 
            -
                  version:  | 
| 168 | 
            +
                  version: '0'
         | 
| 169 169 | 
             
            requirements: []
         | 
| 170 170 | 
             
            rubygems_version: 3.1.2
         | 
| 171 171 | 
             
            signing_key:
         |