jugyo-termtter 0.3.9 → 0.4.0

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.
data/Manifest.txt CHANGED
@@ -9,6 +9,7 @@ lib/termtter/stdout.rb
9
9
  lib/termtter/notify-send.rb
10
10
  lib/termtter/standard_commands.rb
11
11
  lib/termtter/uri-open.rb
12
+ lib/termtter/growl.rb
12
13
  test/test_termtter.rb
13
14
  test/friends_timeline.json
14
15
  test/search.json
data/lib/termtter.rb CHANGED
@@ -10,7 +10,7 @@ $:.unshift(File.dirname(__FILE__)) unless
10
10
  $:.include?(File.dirname(__FILE__)) || $:.include?(File.expand_path(File.dirname(__FILE__)))
11
11
 
12
12
  module Termtter
13
- VERSION = '0.3.9'
13
+ VERSION = '0.4.0'
14
14
 
15
15
  class CommandNotFound < StandardError; end
16
16
 
@@ -0,0 +1,7 @@
1
+ Termtter::Client.add_hook do |statuses, event|
2
+ if !statuses.empty? && event == :update_friends_timeline
3
+ statuses.each do |s|
4
+ system 'growlnotify', 'Termtter', '-m', "#{s.user_screen_name}: #{s.text}", '-n', 'termtter'
5
+ end
6
+ end
7
+ end
@@ -13,7 +13,7 @@ Termtter::Client.add_hook do |statuses, event|
13
13
  text = s.text.gsub("\n", '')
14
14
  color_num = colors[s.user_screen_name.hash % colors.size]
15
15
  status = "#{s.user_screen_name}: #{text}"
16
- unless s.in_reply_to_status_id.nil?
16
+ if s.in_reply_to_status_id
17
17
  status += " (reply to #{s.in_reply_to_status_id})"
18
18
  end
19
19
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jugyo-termtter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.9
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - jugyo
@@ -63,6 +63,7 @@ files:
63
63
  - lib/termtter/notify-send.rb
64
64
  - lib/termtter/standard_commands.rb
65
65
  - lib/termtter/uri-open.rb
66
+ - lib/termtter/growl.rb
66
67
  - test/test_termtter.rb
67
68
  - test/friends_timeline.json
68
69
  - test/search.json