blabbermouth-rollbar 0.0.2 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6588824d19bf59c434ab4f01943a792e647f0b59
4
- data.tar.gz: 24eb328e3f7fc5bd0494353b2f3616ef9f1170ad
3
+ metadata.gz: 7fa12defb50ce55af2f6db6c1b2b8a5013874ac9
4
+ data.tar.gz: 705729a2e05b7ba063d7022ba173e2ddd64f64de
5
5
  SHA512:
6
- metadata.gz: 0941d8d9d785938137177e74db021449d376309e7f3d90ce2f43166cb7cb219d42f2a174ca0505e5adaa61aa4c2adab183b0b8ac29b4edb2e9c509f629d28cba
7
- data.tar.gz: 02e119ffd64d93dcfd4b7f139788d0147f552fbbaa9dda06123274617a1b83c5b4b68acd879c6746f26ccc0594bf38c3c54dbe05ef2af0391607a91e8244755a
6
+ metadata.gz: 9cdab157fd1824ab43b3a267b54502cfe40c2380826c2744b8ca99f3c18cda12178bb1ad74c731272c69bc5983ce14e033615d9030c9db5adcb82423ac9d3186
7
+ data.tar.gz: 1c15110e05082c6e63d36730329c3658112dd581e83d83fac4b9978910809ae0220426ff88cabaef2221e0692fc040f7e434df2d09929d6e929db1e1d872cb2c
@@ -1,2 +1,7 @@
1
1
  require 'blabbermouth'
2
- require 'blabbermouth/gawkers/rollbar'
2
+ module Blabbermouth
3
+ module Rollbar
4
+ end
5
+ end
6
+ require 'blabbermouth/rollbar/version'
7
+ require 'blabbermouth/rollbar/bystander'
@@ -1,7 +1,7 @@
1
1
  require 'blabbermouth/exceptions'
2
2
 
3
3
  module Blabbermouth
4
- module Gawkers
4
+ module Bystanders
5
5
  class Rollbar < Base
6
6
  def error(key, e, *args)
7
7
  data, opts, args = parse_args(*args)
@@ -40,7 +40,7 @@ module Blabbermouth
40
40
  end
41
41
 
42
42
  def rollbar!
43
- raise "You must require and configure the rollbar gem to use it as a gawker" unless rollbar?
43
+ raise "You must require and configure the rollbar gem to use it as a bystander" unless rollbar?
44
44
  end
45
45
  end
46
46
  end
@@ -0,0 +1,5 @@
1
+ module Blabbermouth
2
+ module Rollbar
3
+ VERSION = '0.0.4'
4
+ end
5
+ end
@@ -0,0 +1,44 @@
1
+ require 'blabbermouth-rollbar'
2
+ require 'spec_helper'
3
+
4
+ RSpec.describe Blabbermouth::Bystanders::Rollbar do
5
+ describe '#error' do
6
+ it 'reports to rollbar' do
7
+ subject.error('key', StandardError.new)
8
+ error = ::Rollbar.errors.last
9
+ expect(error[0]).to be_an_instance_of(Blabbermouth::Error)
10
+ end
11
+ end
12
+
13
+ describe '#info' do
14
+ it 'reports to rollbar' do
15
+ subject.info('key', 'test')
16
+ info = ::Rollbar.infos.last
17
+ expect(info[0]).to be_an_instance_of(Blabbermouth::Info)
18
+ end
19
+ end
20
+
21
+ describe '#increment' do
22
+ it 'reports to rollbar' do
23
+ subject.increment('key', 1)
24
+ info = ::Rollbar.infos.last
25
+ expect(info[0]).to be_an_instance_of(Blabbermouth::Increment)
26
+ end
27
+ end
28
+
29
+ describe '#count' do
30
+ it 'reports to rollbar' do
31
+ subject.count('key', 1)
32
+ info = ::Rollbar.infos.last
33
+ expect(info[0]).to be_an_instance_of(Blabbermouth::Count)
34
+ end
35
+ end
36
+
37
+ describe '#time' do
38
+ it 'reports to rollbar' do
39
+ subject.time('key', 1)
40
+ info = ::Rollbar.infos.last
41
+ expect(info[0]).to be_an_instance_of(Blabbermouth::Time)
42
+ end
43
+ end
44
+ end
@@ -0,0 +1,101 @@
1
+ require 'blabbermouth'
2
+ require 'rspec'
3
+
4
+ Dir[File.join(File.dirname(__FILE__), '..', "spec/support/**/*.rb")].each { |f| require f }
5
+
6
+ Blabbermouth.configure do |config|
7
+ config.bystanders = []
8
+ end
9
+
10
+ RSpec.configure do |config|
11
+ #config.before(:suite) do
12
+ # ActiveRecord::Base.establish_connection adapter: "sqlite3", database: ":memory:"
13
+ # capture_stdout { load "db/schema.rb" }
14
+ # load 'support/models.rb'
15
+ #end
16
+
17
+ # rspec-expectations config goes here. You can use an alternate
18
+ # assertion/expectation library such as wrong or the stdlib/minitest
19
+ # assertions if you prefer.
20
+ config.expect_with :rspec do |expectations|
21
+ # This option will default to `true` in RSpec 4. It makes the `description`
22
+ # and `failure_message` of custom matchers include text for helper methods
23
+ # defined using `chain`, e.g.:
24
+ # be_bigger_than(2).and_smaller_than(4).description
25
+ # # => "be bigger than 2 and smaller than 4"
26
+ # ...rather than:
27
+ # # => "be bigger than 2"
28
+ expectations.include_chain_clauses_in_custom_matcher_descriptions = true
29
+ end
30
+
31
+ # rspec-mocks config goes here. You can use an alternate test double
32
+ # library (such as bogus or mocha) by changing the `mock_with` option here.
33
+ config.mock_with :rspec do |mocks|
34
+ # Prevents you from mocking or stubbing a method that does not exist on
35
+ # a real object. This is generally recommended, and will default to
36
+ # `true` in RSpec 4.
37
+ mocks.verify_partial_doubles = true
38
+ end
39
+
40
+ # Many RSpec users commonly either run the entire suite or an individual
41
+ # file, and it's useful to allow more verbose output when running an
42
+ # individual spec file.
43
+ if config.files_to_run.one?
44
+ # Use the documentation formatter for detailed output,
45
+ # unless a formatter has already been configured
46
+ # (e.g. via a command-line flag).
47
+ config.default_formatter = 'doc'
48
+ end
49
+
50
+ # Limits the available syntax to the non-monkey patched syntax that is recommended.
51
+ # For more details, see:
52
+ # - http://myronmars.to/n/dev-blog/2012/06/rspecs-new-expectation-syntax
53
+ # - http://teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
54
+ # - http://myronmars.to/n/dev-blog/2014/05/notable-changes-in-rspec-3#new__config_option_to_disable_rspeccore_monkey_patching
55
+ config.disable_monkey_patching!
56
+
57
+ # Run specs in random order to surface order dependencies. If you find an
58
+ # order dependency and want to debug it, you can fix the order by providing
59
+ # the seed, which is printed after each run.
60
+ # --seed 1234
61
+ config.order = :random
62
+
63
+ # Seed global randomization in this process using the `--seed` CLI option.
64
+ # Setting this allows you to use `--seed` to deterministically reproduce
65
+ # test failures related to randomization by passing the same `--seed` value
66
+ # as the one that triggered the failure.
67
+ Kernel.srand config.seed
68
+
69
+ # Print the 10 slowest examples and example groups at the
70
+ # end of the spec run, to help surface which specs are running
71
+ # particularly slow.
72
+ #config.profile_examples = 10
73
+
74
+ # These two settings work together to allow you to limit a spec run
75
+ # to individual examples or groups you care about by tagging them with
76
+ # `:focus` metadata. When nothing is tagged with `:focus`, all examples
77
+ # get run.
78
+ #config.filter_run :focus
79
+ #config.run_all_when_everything_filtered = true
80
+ end
81
+
82
+ # TODO look into why I need to patch these to work with default behavior?
83
+ class FalseClass
84
+ def false?
85
+ true
86
+ end
87
+
88
+ def true?
89
+ false
90
+ end
91
+ end
92
+
93
+ class TrueClass
94
+ def false?
95
+ false
96
+ end
97
+
98
+ def true?
99
+ true
100
+ end
101
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: blabbermouth-rollbar
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mark Rebec
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-05-05 00:00:00.000000000 Z
11
+ date: 2015-05-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: blabbermouth
@@ -66,7 +66,7 @@ dependencies:
66
66
  - - ">="
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
- description: Gawker for Blabbermouth that posts to Rollbar
69
+ description: Bystander for Blabbermouth that posts to Rollbar
70
70
  email:
71
71
  - mark@markrebec.com
72
72
  executables: []
@@ -74,7 +74,10 @@ extensions: []
74
74
  extra_rdoc_files: []
75
75
  files:
76
76
  - lib/blabbermouth-rollbar.rb
77
- - lib/blabbermouth/gawkers/rollbar.rb
77
+ - lib/blabbermouth/rollbar/bystander.rb
78
+ - lib/blabbermouth/rollbar/version.rb
79
+ - spec/blabbermouth/rollbar/bystander_spec.rb
80
+ - spec/spec_helper.rb
78
81
  - spec/support/rollbar.rb
79
82
  homepage: http://github.com/markrebec/blabbermouth
80
83
  licenses: []
@@ -98,6 +101,8 @@ rubyforge_project:
98
101
  rubygems_version: 2.2.2
99
102
  signing_key:
100
103
  specification_version: 4
101
- summary: Rollbar gawker for Blabbermouth
104
+ summary: Rollbar bystander for Blabbermouth
102
105
  test_files:
106
+ - spec/spec_helper.rb
103
107
  - spec/support/rollbar.rb
108
+ - spec/blabbermouth/rollbar/bystander_spec.rb