exception_gateway 0.1.0 → 0.2.1

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 CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- YjMyZWY2MTlkNzBmN2JiYzk2MzY1OGM1ZmZmZGJlNzUwN2Q0MjczYQ==
4
+ MGNiYTlkOWRjMzI4ODkwZjQ0Y2M5ODRlNzM0Y2U2OGRiYzc0Mzc1MQ==
5
5
  data.tar.gz: !binary |-
6
- MWQ3NjcwMTIzNjM5N2EzZDA0YTJjNTc2MTdkMGNlZTBhNjg2ZWZkZA==
6
+ Y2YyNTA2YzBhNGNhMDYyMGU5OTQ0ZjZhZTU3MzJkYmI3MDA2MTkwOA==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NTg1YzE5YjNhNDY4ZTQ5MmUzYjZkNWU2YjA3Zjc0YWNiMzE3Yjg2ZWIyYTA1
10
- M2ZmMDkxNjNhYWRjMjkzNDJmYWM4Y2EyNmQ5ZWM3YzhjYjAyNzBmMGQ4YjFm
11
- OTkzNjBhMzJhMzIxMTRlOGQzNWFjNTNiM2YyOTI5ZTFmNWRmODY=
9
+ YWQ0MzMzODJmY2UwMzhkM2E2MTAyYmY3ZTgzMDgzZmMyMDk0YWJhZWZiOTdh
10
+ MDYxOTEwNDFiMzFlNTZkZjk3YzgwY2EyNGYwYjE0MjM3ODFhOWM5NGQ4MTZm
11
+ NTAzM2YyZGI2ZjQwOTY5Nzg4OGQ4YTE1OWNlYWQ0ZDMwNzdmYzc=
12
12
  data.tar.gz: !binary |-
13
- MTA4NmQyOTM3Zjg2MWUwMTBkYmIxZjZlM2UzOTdhZDY2ZTJiMmI0OGU5MDE5
14
- M2RjMjNiN2I1YzQ5ZDUwNTE5ODFkZmQ3NDc4YTc1YzFlMzE2NWE5NmNiMWY2
15
- OTVlMGM1YmZiZjFkZjFmMjYzMzViNmI3ODZkY2Q3OTA0OTU1ZjI=
13
+ Mzg0NDU0MmY3ZTIxMGYwZGI3YzZkM2Y1OWQ3ZDRmNTk0ODA5M2QxZjgwYzM4
14
+ YjY3YTc1ZGRhMWE5MWEyOWM0ZGQ4ZDUxYTFjMjhkNDIwNDg5NWUzYmZlMDA2
15
+ ZjhiZTFjMTkwYjIwZDViNGZmZjY1MTMxNmQ2YTY3ZDc2MDk2MGE=
data/Gemfile.lock ADDED
@@ -0,0 +1,27 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ exception_gateway (0.2.0)
5
+
6
+ GEM
7
+ remote: https://rubygems.org/
8
+ specs:
9
+ diff-lcs (1.2.5)
10
+ rake (0.9.2.2)
11
+ rspec (2.14.1)
12
+ rspec-core (~> 2.14.0)
13
+ rspec-expectations (~> 2.14.0)
14
+ rspec-mocks (~> 2.14.0)
15
+ rspec-core (2.14.7)
16
+ rspec-expectations (2.14.4)
17
+ diff-lcs (>= 1.1.3, < 2.0)
18
+ rspec-mocks (2.14.4)
19
+
20
+ PLATFORMS
21
+ ruby
22
+
23
+ DEPENDENCIES
24
+ bundler (~> 1.3)
25
+ exception_gateway!
26
+ rake (~> 0)
27
+ rspec (~> 2.6)
data/LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2014 Strikingly.com
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
6
+ this software and associated documentation files (the "Software"), to deal in
7
+ the Software without restriction, including without limitation the rights to
8
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9
+ the Software, and to permit persons to whom the Software is furnished to do so,
10
+ subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17
+ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18
+ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19
+ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20
+ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
10
10
  spec.email = ["leezhenchao@gmail.com"]
11
11
  spec.description = %q{A wrapper for error reporting services}
12
12
  spec.summary = %q{A wrapper for error reporting services, currently only bugsnag is supported}
13
- spec.homepage = "https://github.com/fantasticsid/exception_gateway"
13
+ spec.homepage = "https://github.com/strikingly/exception_gateway"
14
14
  spec.license = "MIT"
15
15
 
16
16
  spec.files = `git ls-files`.split($/)
@@ -20,4 +20,5 @@ Gem::Specification.new do |spec|
20
20
 
21
21
  spec.add_development_dependency "bundler", "~> 1.3"
22
22
  spec.add_development_dependency "rake", "~> 0"
23
+ spec.add_development_dependency "rspec", "~> 2.6"
23
24
  end
@@ -1,3 +1,3 @@
1
1
  module ExceptionGateway
2
- VERSION = "0.1.0"
2
+ VERSION = "0.2.1"
3
3
  end
@@ -1,5 +1,5 @@
1
1
  require "exception_gateway/version"
2
- require "exception_gateway/bugsnag"
2
+ require "exception_gateway/vendors/bugsnag"
3
3
 
4
4
  module ExceptionGateway
5
5
  class Config
@@ -0,0 +1,53 @@
1
+ require 'spec_helper'
2
+
3
+ module Bugsnag
4
+ end
5
+
6
+ describe ExceptionGateway do
7
+ describe "the module" do
8
+ it "responds to alert" do
9
+ expect(ExceptionGateway).to respond_to(:configure)
10
+ end
11
+
12
+ it "responds to configure" do
13
+ expect(ExceptionGateway).to respond_to(:alert)
14
+ end
15
+
16
+ it "responds to transmit" do
17
+ expect(ExceptionGateway).to respond_to(:transmit)
18
+ end
19
+
20
+ it "responds to time" do
21
+ expect(ExceptionGateway).to respond_to(:time)
22
+ end
23
+ end
24
+
25
+ describe "configure" do
26
+ before(:all) do
27
+ ExceptionGateway.configure do |config|
28
+ config.backend = :bugsnag
29
+ end
30
+ end
31
+
32
+ it "hooks call to alert to bugsnag backend" do
33
+ Bugsnag.stub(:notify)
34
+ expect(Bugsnag).to receive(:notify).with(RuntimeError.new("test"), {:details => {:msg => "hello"}})
35
+ ExceptionGateway.alert("test", :msg => "hello")
36
+ end
37
+
38
+ it "hooks call to transmit to bugsnag backend" do
39
+ Bugsnag.stub(:notify)
40
+ e = RuntimeError.new("test exception")
41
+ expect(Bugsnag).to receive(:notify).with(e)
42
+ ExceptionGateway.transmit(e)
43
+ end
44
+
45
+ it "hooks call to time to bugsnag backend, and reports time" do
46
+ Bugsnag.stub(:notify)
47
+ expect(Bugsnag).to receive(:notify)
48
+ ExceptionGateway.time("test timer") do
49
+ sleep 3
50
+ end
51
+ end
52
+ end
53
+ end
@@ -0,0 +1,2 @@
1
+ require 'exception_gateway'
2
+
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: exception_gateway
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Li Zhenchao
@@ -38,6 +38,20 @@ dependencies:
38
38
  - - ~>
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rspec
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ~>
46
+ - !ruby/object:Gem::Version
47
+ version: '2.6'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ~>
53
+ - !ruby/object:Gem::Version
54
+ version: '2.6'
41
55
  description: A wrapper for error reporting services
42
56
  email:
43
57
  - leezhenchao@gmail.com
@@ -45,16 +59,19 @@ executables: []
45
59
  extensions: []
46
60
  extra_rdoc_files: []
47
61
  files:
48
- - .gitignore
49
62
  - Gemfile
63
+ - Gemfile.lock
64
+ - LICENSE
50
65
  - LICENSE.txt
51
66
  - README.md
52
67
  - Rakefile
53
68
  - exception_gateway.gemspec
54
69
  - lib/exception_gateway.rb
55
- - lib/exception_gateway/bugsnag.rb
70
+ - lib/exception_gateway/vendors/bugsnag.rb
56
71
  - lib/exception_gateway/version.rb
57
- homepage: https://github.com/fantasticsid/exception_gateway
72
+ - spec/exception_gateway_spec.rb
73
+ - spec/spec_helper.rb
74
+ homepage: https://github.com/strikingly/exception_gateway
58
75
  licenses:
59
76
  - MIT
60
77
  metadata: {}
@@ -78,4 +95,6 @@ rubygems_version: 2.2.1
78
95
  signing_key:
79
96
  specification_version: 4
80
97
  summary: A wrapper for error reporting services, currently only bugsnag is supported
81
- test_files: []
98
+ test_files:
99
+ - spec/exception_gateway_spec.rb
100
+ - spec/spec_helper.rb
data/.gitignore DELETED
@@ -1,17 +0,0 @@
1
- *.gem
2
- *.rbc
3
- .bundle
4
- .config
5
- .yardoc
6
- Gemfile.lock
7
- InstalledFiles
8
- _yardoc
9
- coverage
10
- doc/
11
- lib/bundler/man
12
- pkg
13
- rdoc
14
- spec/reports
15
- test/tmp
16
- test/version_tmp
17
- tmp