Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: adambird/hatchet-airbrake
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: cronofy/hatchet-airbrake
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Able to merge. These branches can be automatically merged.
  • 2 commits
  • 4 files changed
  • 2 contributors

Commits on Jun 2, 2020

  1. Update dependencies

    Key updates are:
    Rspec 2 -> 3
    Hatchet 0.2.7 -> 0.2.13
    AdamWhittingham committed Jun 2, 2020
    Copy the full SHA
    9faf46a View commit details

Commits on Apr 9, 2021

  1. Merge pull request #1 from cronofy/update-dependencies

    Update dependencies
    AdamWhittingham authored Apr 9, 2021
    Copy the full SHA
    7dfbc65 View commit details
Showing with 74 additions and 63 deletions.
  1. +59 −45 Gemfile.lock
  2. +3 −3 hatchet-airbrake.gemspec
  3. +11 −10 spec/airbrake_appender_spec.rb
  4. +1 −5 spec/spec_helper.rb
104 changes: 59 additions & 45 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -2,59 +2,70 @@ PATH
remote: .
specs:
hatchet-airbrake (0.0.4)
airbrake (~> 3.1)
hatchet (~> 0.2)
airbrake (> 3.1)
hatchet (> 0.2.13)

GEM
remote: http://rubygems.org/
specs:
airbrake (3.1.14)
builder
json
builder (3.2.2)
celluloid (0.15.2)
timers (~> 1.1.0)
coderay (1.0.9)
diff-lcs (1.2.4)
ffi (1.9.3)
formatador (0.2.4)
airbrake (10.0.4)
airbrake-ruby (~> 4.13)
airbrake-ruby (4.14.1)
rbtree3 (~> 0.5)
coderay (1.1.3)
diff-lcs (1.3)
ffi (1.13.0)
formatador (0.2.5)
growl (1.0.3)
guard (2.2.2)
guard (2.16.2)
formatador (>= 0.2.4)
listen (~> 2.1)
lumberjack (~> 1.0)
listen (>= 2.7, < 4.0)
lumberjack (>= 1.0.12, < 2.0)
nenv (~> 0.1)
notiffany (~> 0.0)
pry (>= 0.9.12)
shellany (~> 0.0)
thor (>= 0.18.1)
guard-rspec (4.0.3)
guard (>= 2.1.1)
rspec (~> 2.14)
hatchet (0.2.7)
json (1.8.1)
listen (2.2.0)
celluloid (>= 0.15.2)
rb-fsevent (>= 0.9.3)
rb-inotify (>= 0.9)
lumberjack (1.0.4)
method_source (0.8.2)
pry (0.9.12.2)
coderay (~> 1.0.5)
method_source (~> 0.8)
slop (~> 3.4)
rake (10.1.0)
rb-fsevent (0.9.3)
rb-inotify (0.9.2)
ffi (>= 0.5.0)
rspec (2.14.1)
rspec-core (~> 2.14.0)
rspec-expectations (~> 2.14.0)
rspec-mocks (~> 2.14.0)
rspec-core (2.14.7)
rspec-expectations (2.14.3)
diff-lcs (>= 1.1.3, < 2.0)
rspec-mocks (2.14.4)
slop (3.4.6)
thor (0.18.1)
timers (1.1.0)
guard-compat (1.2.1)
guard-rspec (4.7.3)
guard (~> 2.1)
guard-compat (~> 1.1)
rspec (>= 2.99.0, < 4.0)
hatchet (0.2.14)
listen (3.1.5)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
ruby_dep (~> 1.2)
lumberjack (1.2.5)
method_source (1.0.0)
nenv (0.3.0)
notiffany (0.1.3)
nenv (~> 0.1)
shellany (~> 0.0)
pry (0.13.1)
coderay (~> 1.1)
method_source (~> 1.0)
rake (13.0.1)
rb-fsevent (0.9.8)
rb-inotify (0.10.1)
ffi (~> 1.0)
rbtree3 (0.6.0)
rspec (3.9.0)
rspec-core (~> 3.9.0)
rspec-expectations (~> 3.9.0)
rspec-mocks (~> 3.9.0)
rspec-core (3.9.2)
rspec-support (~> 3.9.3)
rspec-expectations (3.9.2)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.9.0)
rspec-mocks (3.9.1)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.9.0)
rspec-support (3.9.3)
ruby_dep (1.5.0)
shellany (0.0.1)
thor (1.0.1)

PLATFORMS
ruby
@@ -66,3 +77,6 @@ DEPENDENCIES
rake
rb-fsevent (~> 0.9.1)
rspec

BUNDLED WITH
2.1.4
6 changes: 3 additions & 3 deletions hatchet-airbrake.gemspec
Original file line number Diff line number Diff line change
@@ -16,6 +16,6 @@ Gem::Specification.new do |s|
s.test_files = Dir["spec/**/*"]
s.require_paths = ["lib"]

s.add_dependency('airbrake', '~> 3.1')
s.add_dependency('hatchet', '~> 0.2')
end
s.add_dependency('airbrake', '> 3.1')
s.add_dependency('hatchet', '> 0.2.13')
end
21 changes: 11 additions & 10 deletions spec/airbrake_appender_spec.rb
Original file line number Diff line number Diff line change
@@ -9,29 +9,30 @@
@error = StandardError.new
@backtrace = [random_string, random_string]
@error.stub(:backtrace) { @backtrace }
@error_message = random_string

@message = Hatchet::Message.new(@error_message = random_string, @error)
@message = Hatchet::Message.new(message: @error_message, error: @error)
end

subject { @appender.add(@level, @context, @message) }
let(:message) { Hatchet::Message.new(message: @error_message, error: @error) }
subject { @appender.add(@level, @context, message) }

it "should notify airbrake" do
it "notifies airbrake" do
expected_options = {
:error_message => @error_message,
:backtrace => @backtrace
}
::Airbrake.should_receive(:notify).with(@error, expected_options)
expect(::Airbrake).to receive(:notify).with(@error, expected_options)
subject
end

context "when error is not present" do
before(:each) do
@message = Hatchet::Message.new(random_string)
end
it "should not notify airbrake" do
::Airbrake.should_not_receive(:notify)
let(:message) { Hatchet::Message.new(random_string) }

it "does not notify airbrake" do
expect(::Airbrake).to_not receive(:notify)
subject
end
end
end
end
end
6 changes: 1 addition & 5 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
require_relative '../lib/hatchet_airbrake'
require 'rspec'

RSpec.configure do |config|
config.color_enabled = true
end

def random_string
(0...24).map{ ('a'..'z').to_a[rand(26)] }.join
end
end