ruboty-stats 1.0.0 → 1.0.1

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: d7d0da07923c7536a63dab96c672b763ee63e7af
4
- data.tar.gz: df8775db86a67727e48fb7eb658eb1c25fe9983e
3
+ metadata.gz: 01692b7a651571773785480bd456a70dd7ae13ec
4
+ data.tar.gz: cb8022e264080bee8374ae7c9a783188747de77d
5
5
  SHA512:
6
- metadata.gz: b8444c27c9588ab725c4de7b123759449df80dd15a0e0f176e2d311aef45e61e3c653c4b68a67a55ae49d72e3adbba6a7d67d3290ba9440142ab8002d062ddc8
7
- data.tar.gz: 9554858eaa90df7aa3943987ec41421ffed68fbda537169da1df9464b4f420671e49ba13063fc6c9103137fdbc6a29b9de27cd2bc7498b4bf9968abd062e92a4
6
+ metadata.gz: c0fd20c7ebd89b74749a463f3b29f15a823699aad4fc05b9ae2b9611e4220fce8d6a45970dee7938d27c25788a1cd3ff10722726f521410f9a8b614f14a51f58
7
+ data.tar.gz: aef6f263c8c705df3aa6c75a07aadd2d075aae7071e3653cc7b1a15d3cddcf60031afa87bc87dbf2653c766ed41c33f479fbcf6f8df6f5ada850326f281dd98d
@@ -11,7 +11,8 @@ module Ruboty
11
11
  if perform?(handler, message)
12
12
  action_name = "#{handler.class.name}##{name}"
13
13
  Ruboty::Stats.stats(handler.robot)[action_name] ||= []
14
- Ruboty::Stats.stats(handler.robot)[action_name] << {body: message.body, time: Time.now}
14
+ stats = {from: message.from, body: message.body, time: Time.now}
15
+ Ruboty::Stats.stats(handler.robot)[action_name] << stats
15
16
  end
16
17
 
17
18
  super
@@ -4,7 +4,7 @@ module Ruboty
4
4
  class History < Ruboty::Actions::Base
5
5
  def call
6
6
  history = (::Ruboty::Stats.stats(message.robot)[message[:action_name]] || []).sort_by {|h| h[:time] }
7
- history_message = history.map {|h| "#{h[:time]} #{h[:body]}" }.join($/)
7
+ history_message = history.map {|h| "#{h[:time]} <#{h[:from]}>: #{h[:body]}" }.join($/)
8
8
  message.reply(history_message)
9
9
  end
10
10
  end
@@ -1,5 +1,5 @@
1
1
  module Ruboty
2
2
  module Stats
3
- VERSION = "1.0.0"
3
+ VERSION = "1.0.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruboty-stats
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - block_given?