flumtter 5.0.3 → 5.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1a134e62aa9291ba7d6a17b700431b378d0d9418
|
4
|
+
data.tar.gz: 54d0c482731991a81df7d927890521416df779b1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7d92e4387a82dad9aca4b88a4d16cbf0ae646d44a2f816af2f20aebc589512c65015ce49bda115187cb692d2ec0fb3a0874f514c5f94b1237cf972361d573e4f
|
7
|
+
data.tar.gz: 636816275e0933d5e28fb6f9c500fb06c844598ab2b533892e9170bb7e7f6c75e6a55da6cc7bc2ea58894655d885be4eb78d498b84469fff44a7fea060799765
|
@@ -2,6 +2,8 @@ require 'twitter'
|
|
2
2
|
|
3
3
|
module Flumtter
|
4
4
|
class Client
|
5
|
+
class NoSetAccount < StandardError; end
|
6
|
+
|
5
7
|
include Util
|
6
8
|
attr_reader :account, :sthread, :ethread, :rest
|
7
9
|
|
@@ -24,9 +26,12 @@ module Flumtter
|
|
24
26
|
set(account)
|
25
27
|
start
|
26
28
|
Keyboard.input(self)
|
29
|
+
rescue NoSetAccount
|
30
|
+
exit
|
27
31
|
end
|
28
32
|
|
29
33
|
def set(account)
|
34
|
+
raise NoSetAccount if account.nil?
|
30
35
|
@account = account
|
31
36
|
@rest = Twitter::REST::Client.new(@account.keys)
|
32
37
|
@stream = Twitter::Streaming::Client.new(@account.keys)
|
@@ -1,9 +1,13 @@
|
|
1
1
|
module Flumtter
|
2
2
|
plugin do
|
3
3
|
Keyboard.add("a", "Account Selector") do |m, twitter|
|
4
|
-
|
5
|
-
|
6
|
-
|
4
|
+
if account = AccountSelector.select
|
5
|
+
twitter.kill
|
6
|
+
twitter.set account
|
7
|
+
twitter.start
|
8
|
+
else
|
9
|
+
puts 'not change'
|
10
|
+
end
|
7
11
|
end
|
8
12
|
end
|
9
13
|
end
|
data/lib/flumtter/version.rb
CHANGED