bugsnag-ext 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 2c61439aaad6fb20b8b32ca7b22b7e127d9a69d6
4
+ data.tar.gz: 43865da610b79522bdc76c44e73ef44711fd7266
5
+ SHA512:
6
+ metadata.gz: 17329394b6571764d986971afef86154858fe5032edf11cd9bfa415f037caa5160a69e4cd7b1cd8389781efea76dd6fc579dcf621b013213bed469cb6b668287
7
+ data.tar.gz: cdc1d1df0e01d970db6da797e8351f004acee36f04a18b773b832cc4066e0b22277c33cfdf8b30d3464c08e90fbb8c7264d72cc34847d234f38ae7ec6b6a2229
@@ -0,0 +1,9 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --format documentation
2
+ --color
@@ -0,0 +1,4 @@
1
+ language: ruby
2
+ rvm:
3
+ - 2.2.2
4
+ before_install: gem install bundler -v 1.10.5
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in bugsnag-ruby-ext.gemspec
4
+ gemspec
data/LICENSE ADDED
@@ -0,0 +1,22 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2015 dtaniwaki
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, 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,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
22
+
@@ -0,0 +1,59 @@
1
+ # bugsnag-ext
2
+
3
+ [![Gem Version][gem-image]][gem-link]
4
+ [![Dependency Status][deps-image]][deps-link]
5
+ [![Build Status][build-image]][build-link]
6
+ [![Coverage Status][cov-image]][cov-link]
7
+ [![Code Climate][gpa-image]][gpa-link]
8
+
9
+ Useful extensions of Bugsnag.
10
+
11
+ ## Installation
12
+
13
+ Add this line to your application's Gemfile:
14
+
15
+ ```ruby
16
+ gem 'bugsnag-ext'
17
+ ```
18
+
19
+ And then execute:
20
+
21
+ $ bundle
22
+
23
+ Or install it yourself as:
24
+
25
+ $ gem install bugsnag-ext
26
+
27
+ ## Usage
28
+
29
+ ### `Bugsnag::Ext::ResqueRetry`
30
+
31
+ ```ruby
32
+ class SomeResqueJob
33
+ include Bugsnag::Ext::ResqueRetry
34
+ end
35
+ ```
36
+
37
+ ## Contributing
38
+
39
+ 1. Fork it
40
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
41
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
42
+ 4. Push to the branch (`git push origin my-new-feature`)
43
+ 5. Create new [Pull Request](../../pull/new/master)
44
+
45
+ ## Copyright
46
+
47
+ Copyright (c) 2015 Daisuke Taniwaki. See [LICENSE](LICENSE) for details.
48
+
49
+ [gem-image]: https://badge.fury.io/rb/bugsnag-ext.svg
50
+ [gem-link]: http://badge.fury.io/rb/bugsnag-ext
51
+ [build-image]: https://secure.travis-ci.org/dtaniwaki/bugsnag-ext.png
52
+ [build-link]: http://travis-ci.org/dtaniwaki/bugsnag-ext
53
+ [deps-image]: https://gemnasium.com/dtaniwaki/bugsnag-ext.svg
54
+ [deps-link]: https://gemnasium.com/dtaniwaki/bugsnag-ext
55
+ [cov-image]: https://coveralls.io/repos/dtaniwaki/bugsnag-ext/badge.png
56
+ [cov-link]: https://coveralls.io/r/dtaniwaki/bugsnag-ext
57
+ [gpa-image]: https://codeclimate.com/github/dtaniwaki/bugsnag-ext.png
58
+ [gpa-link]: https://codeclimate.com/github/dtaniwaki/bugsnag-ext
59
+
@@ -0,0 +1,6 @@
1
+ require "bundler/gem_tasks"
2
+ require "rspec/core/rake_task"
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+
6
+ task :default => :spec
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "bugsnag/ruby/ext"
5
+
6
+ # You can add fixtures and/or initialization code here to make experimenting
7
+ # with your gem easier. You can also use a different console, if you like.
8
+
9
+ # (If you use this, don't forget to add pry to your Gemfile!)
10
+ # require "pry"
11
+ # Pry.start
12
+
13
+ require "irb"
14
+ IRB.start
@@ -0,0 +1,7 @@
1
+ #!/bin/bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+
5
+ bundle install
6
+
7
+ # Do any other automated setup that you need to do here
@@ -0,0 +1,22 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'bugsnag/ext/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "bugsnag-ext"
8
+ spec.version = Bugsnag::Ext::VERSION
9
+ spec.authors = ["Daisuke Taniwaki"]
10
+ spec.email = ["daisuketaniwaki@gmail.com"]
11
+
12
+ spec.summary = %q{Extensions of Bugsnag.}
13
+ spec.description = %q{Extensions of Bugsnag.}
14
+ spec.homepage = "https://github.com/dtaniwaki/bugsnag-ext"
15
+
16
+ spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
17
+ spec.require_paths = ["lib"]
18
+
19
+ spec.add_development_dependency "bundler", "~> 1.10"
20
+ spec.add_development_dependency "rake", "~> 10.0"
21
+ spec.add_development_dependency "rspec"
22
+ end
@@ -0,0 +1,6 @@
1
+ require "bugsnag/ext/version"
2
+
3
+ module Bugsnag
4
+ module Ext
5
+ end
6
+ end
@@ -0,0 +1,25 @@
1
+ module Bugsnag::Ext
2
+ module ResqueRetry
3
+ def self.included(base)
4
+ base.extend ClassMethods
5
+ end
6
+
7
+ module ClassMethods
8
+ def before_perform_bugsnag(*args)
9
+ attempt = @retry_attempt
10
+ limit = @retry_limit
11
+ puts attempt.inspect
12
+ Bugsnag.before_notify_callbacks << lambda { |notif|
13
+ notif.add_tab(:retry, {
14
+ attempt: attempt,
15
+ limit: limit
16
+ })
17
+ }
18
+ end
19
+
20
+ def after_perform_bugsnag(*args)
21
+ Bugsnag.before_notify_callbacks.clear
22
+ end
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,5 @@
1
+ module Bugsnag
2
+ module Ext
3
+ VERSION = "0.0.1"
4
+ end
5
+ end
metadata ADDED
@@ -0,0 +1,99 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: bugsnag-ext
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Daisuke Taniwaki
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-08-06 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.10'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.10'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '10.0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '10.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: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ description: Extensions of Bugsnag.
56
+ email:
57
+ - daisuketaniwaki@gmail.com
58
+ executables: []
59
+ extensions: []
60
+ extra_rdoc_files: []
61
+ files:
62
+ - ".gitignore"
63
+ - ".rspec"
64
+ - ".travis.yml"
65
+ - Gemfile
66
+ - LICENSE
67
+ - README.md
68
+ - Rakefile
69
+ - bin/console
70
+ - bin/setup
71
+ - bugsnag-ext.gemspec
72
+ - lib/bugsnag/ext.rb
73
+ - lib/bugsnag/ext/resque_retry.rb
74
+ - lib/bugsnag/ext/version.rb
75
+ homepage: https://github.com/dtaniwaki/bugsnag-ext
76
+ licenses: []
77
+ metadata: {}
78
+ post_install_message:
79
+ rdoc_options: []
80
+ require_paths:
81
+ - lib
82
+ required_ruby_version: !ruby/object:Gem::Requirement
83
+ requirements:
84
+ - - ">="
85
+ - !ruby/object:Gem::Version
86
+ version: '0'
87
+ required_rubygems_version: !ruby/object:Gem::Requirement
88
+ requirements:
89
+ - - ">="
90
+ - !ruby/object:Gem::Version
91
+ version: '0'
92
+ requirements: []
93
+ rubyforge_project:
94
+ rubygems_version: 2.4.5
95
+ signing_key:
96
+ specification_version: 4
97
+ summary: Extensions of Bugsnag.
98
+ test_files: []
99
+ has_rdoc: