blabbermouth-librato 0.0.2 → 0.0.4

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,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 932c5b50bdea069e844d6cc71dad6dbb280bbbda
4
- data.tar.gz: 44f75a4bd74278e527255120a6a98f16bfd7147d
3
+ metadata.gz: ce6ad84bfd9ed54cad38dff993de86b13b2aaf8a
4
+ data.tar.gz: d77fa528c47fd088adc470214c0683cc3269bca0
5
5
  SHA512:
6
- metadata.gz: 9b2568b9a7b3da52da085bb67ae4418291a270c8d7afc5972b5673832275e25d1302ef975e0b2d15bfd560b4b1baa6a9a6eb8d4d8697489548ce8bc83f603672
7
- data.tar.gz: 174e1d79628e528a6f51a673dc177c03d1a9047ab94ddb234ca3bcfc2934abdd00b899942c38af51f5b7d9aaa2b79af68b1e90fe78f51dbc5ecef7ae5efd216d
6
+ metadata.gz: 4875997d03acc28f52a786e3f2a4d023e45c9945f11e94d966c272e89f15fbd8e2d4320ed59939e473cf2175da430e02ae8f5e56e8af35f6201b0941a6e84dc3
7
+ data.tar.gz: 55c71f8261f1e0bef19a439f670a5f9d0350f0c35542bfabe6fd19baced9d25e5da2340bb80ecc2b83f1a7f6ae70c7d81c3f9b9e313cf78087a150468993ff0f
@@ -1,5 +1,5 @@
1
1
  module Blabbermouth
2
- module Gawkers
2
+ module Bystanders
3
3
  class Librato < Base
4
4
  def error(key, e, *args)
5
5
  data, opts, args = parse_args(*args)
@@ -56,11 +56,11 @@ module Blabbermouth
56
56
  end
57
57
 
58
58
  def librato!
59
- raise "You must require and configure the librato-metrics gem to use it as a gawker" unless librato?
59
+ raise "You must require and configure the librato-metrics gem to use it as a bystander" unless librato?
60
60
  end
61
61
 
62
62
  def librato_metrics!
63
- raise "You must require and configure the librato-metrics gem to use it as a gawker" unless librato_metrics?
63
+ raise "You must require and configure the librato-metrics gem to use it as a bystander" unless librato_metrics?
64
64
  end
65
65
  end
66
66
  end
@@ -0,0 +1,5 @@
1
+ module Blabbermouth
2
+ module Librato
3
+ VERSION = '0.0.4'
4
+ end
5
+ end
@@ -1,2 +1,7 @@
1
1
  require 'blabbermouth'
2
- require 'blabbermouth/gawkers/librato'
2
+ module Blabbermouth
3
+ module Librato
4
+ end
5
+ end
6
+ require 'blabbermouth/librato/version'
7
+ require 'blabbermouth/librato/bystander'
@@ -0,0 +1,39 @@
1
+ require 'blabbermouth-librato'
2
+ require 'spec_helper'
3
+
4
+ RSpec.describe Blabbermouth::Bystanders::Librato do
5
+ describe '#error' do
6
+ it 'posts to librato' do
7
+ subject.error('test.error', StandardError.new)
8
+ expect(Librato.increments['test.error']).to eql(1)
9
+ end
10
+ end
11
+
12
+ describe '#info' do
13
+ it 'posts to librato' do
14
+ subject.info('test.info', 'test')
15
+ expect(Librato::Metrics.annotations['test.info']).to include('test')
16
+ end
17
+ end
18
+
19
+ describe '#increment' do
20
+ it 'posts to librato' do
21
+ subject.increment('test.increment', 1)
22
+ expect(Librato.increments['test.increment']).to eql(1)
23
+ end
24
+ end
25
+
26
+ describe '#count' do
27
+ it 'posts to librato' do
28
+ subject.count('test.count', 1)
29
+ expect(Librato.measurements['test.count']).to include(1)
30
+ end
31
+ end
32
+
33
+ describe '#time' do
34
+ it 'posts to librato' do
35
+ subject.time('test.time', 1)
36
+ expect(Librato.timings['test.time']).to include(1)
37
+ end
38
+ end
39
+ 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-librato
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 Librato
69
+ description: Bystander for Blabbermouth that posts to Librato
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-librato.rb
77
- - lib/blabbermouth/gawkers/librato.rb
77
+ - lib/blabbermouth/librato/bystander.rb
78
+ - lib/blabbermouth/librato/version.rb
79
+ - spec/blabbermouth/librato/bystander_spec.rb
80
+ - spec/spec_helper.rb
78
81
  - spec/support/librato.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: Librato gawker for Blabbermouth
104
+ summary: Librato bystander for Blabbermouth
102
105
  test_files:
106
+ - spec/spec_helper.rb
103
107
  - spec/support/librato.rb
108
+ - spec/blabbermouth/librato/bystander_spec.rb