blabbermouth 0.0.7 → 0.0.8

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: 2fd1dec0c62ca9440c8dc8b74105aaf5b4f11b50
4
- data.tar.gz: 51f2b9bd738c62891f54fba40deb8f03b58e8001
3
+ metadata.gz: 2f8cb1c408b36723e237f714d54d49ff20360b55
4
+ data.tar.gz: 5168452e9248a9de95d65d09fc3375cc349775e9
5
5
  SHA512:
6
- metadata.gz: 61e3731039179f50952636f56a89e5ca12b6cc952493c0e2348d6e36611648d230455d3a25dff5d8b7e76f44ac36f1433041ba16bf1c0ad8d973e4d51772d7fd
7
- data.tar.gz: 16a8b7f5361f7ecb3e19dcb4766c4ef5992cc5ba39d79737817def37b3ddcbbecf6640fa29a29b722072aeade8640531ac3678189c1e56eabe42088ce12a8264
6
+ metadata.gz: b323b3bec6a44c4cf62a5fabd26129ed7ce3655616731dfb6ff3dcbb58bb98112e887ddb451eb6227966b8749224839b4e386d341d26f54d316e03ae96c94a53
7
+ data.tar.gz: 90a45baffb26eb2336bae067b686949f34d3b78cab4687294bfedb9d5b9edcacdf347d8c949bee376a3c78ea1a980e3a45e9ac9efc39fbe7f3093d3f2aee7a90
@@ -93,7 +93,8 @@ module Blabbermouth
93
93
  opts = args.extract_options!
94
94
  bystanders.map do |bystander|
95
95
  next unless bystander.respond_to?(meth)
96
- bystander.send meth, key, *args.concat([bystander_options(bystander, opts)]), &block
96
+ bystander_args = args.dup.push(bystander_options(bystander, opts))
97
+ bystander.send meth, key, *bystander_args, &block
97
98
  end
98
99
  end
99
100
 
@@ -3,11 +3,7 @@ module Blabbermouth
3
3
  module DynamicEvents
4
4
 
5
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: data
6
+ blab meth, *args
11
7
  end
12
8
 
13
9
  def respond_to_missing?(meth, include_private=false)
@@ -1,8 +1,12 @@
1
1
  module Blabbermouth
2
2
  module Bystanders
3
3
  module Formatter
4
+ def timestamp
5
+ ::Time.now.strftime('%Y/%m/%d %H:%M:%S %Z')
6
+ end
7
+
4
8
  def log_message(event, key, msg, data={})
5
- message = "[#{::Time.now.strftime('%Y/%m/%d %H:%M:%S %Z')}] Blabbermouth.#{event.to_s}: #{key.to_s}"
9
+ message = "[#{timestamp}] Blabbermouth.#{event.to_s}: #{key.to_s}"
6
10
  message += ": #{msg.to_s}" unless msg.to_s.blank?
7
11
  message += " #{data.to_s}"
8
12
  message
@@ -24,9 +24,9 @@ module Blabbermouth
24
24
  blab :time, key, duration, *args
25
25
  end
26
26
 
27
- def blab(meth, key, value, *args)
27
+ def blab(meth, key, *args)
28
28
  data, opts, args = parse_args(*args)
29
- puts meth, key, value, data
29
+ puts meth, key, args.first, data
30
30
  end
31
31
 
32
32
  protected
@@ -1,3 +1,3 @@
1
1
  module Blabbermouth
2
- VERSION = '0.0.7'
2
+ VERSION = '0.0.8'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: blabbermouth
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mark Rebec