blabbermouth 0.0.5 → 0.0.6
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ad1e79c1edd1784dd175e9055349da4b78f89724
|
4
|
+
data.tar.gz: 9524e884b0393542c4f54df3957c24684e8e97de
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 42f08b0dbf4b7c8d8e1706fa8efefd6c71757596ea57358db7c7d8c5187416a4a83713e0b67d9d8a9ca2ed2b1d664adb35be64315a22e5c3fffa510451c59e2a
|
7
|
+
data.tar.gz: 2c96cbd6e40b89eaed59d4d4546481a61cfecd8c20696d62453ba4e45e2e9f8d6103262e586ce413b9735a3adc763f15f6a4861f38f0fb468b0dcb2e286fa168
|
@@ -0,0 +1,18 @@
|
|
1
|
+
module Blabbermouth
|
2
|
+
module Bystanders
|
3
|
+
module DynamicEvents
|
4
|
+
|
5
|
+
def method_missing(meth, *args)
|
6
|
+
data = args.extract_options![:data] || {}
|
7
|
+
key = args.slice!(0,1).first
|
8
|
+
value = args.slice!(0,1).first
|
9
|
+
data.merge!({args: args}) unless args.empty?
|
10
|
+
blab meth, key, value, data
|
11
|
+
end
|
12
|
+
|
13
|
+
def respond_to_missing?(meth, include_private=false)
|
14
|
+
true
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
data/lib/blabbermouth/version.rb
CHANGED
@@ -1,6 +1,10 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
3
|
RSpec.describe Blabbermouth::Bystanders::Stdout do
|
4
|
+
it 'responds to dynamic event methods' do
|
5
|
+
expect(capture_stdout { subject.custom('blabbermouth.test.custom') }).to eql(subject.send(:log_message, :custom, 'blabbermouth.test.custom', nil))
|
6
|
+
end
|
7
|
+
|
4
8
|
describe '#error' do
|
5
9
|
it 'outputs to STDOUT' do
|
6
10
|
expect(capture_stdout { subject.error('key', StandardError.new) }).to eql(subject.send(:log_message, :error, 'key', StandardError.new))
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: blabbermouth
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
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-
|
11
|
+
date: 2015-05-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -65,6 +65,7 @@ files:
|
|
65
65
|
- lib/blabbermouth/blabber.rb
|
66
66
|
- lib/blabbermouth/bystanders.rb
|
67
67
|
- lib/blabbermouth/bystanders/base.rb
|
68
|
+
- lib/blabbermouth/bystanders/dynamic_events.rb
|
68
69
|
- lib/blabbermouth/bystanders/formatter.rb
|
69
70
|
- lib/blabbermouth/bystanders/new_relic.rb
|
70
71
|
- lib/blabbermouth/bystanders/stdout.rb
|