favt 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/favt +27 -4
- data/config.sample.yaml +0 -4
- data/lib/favt/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aedc23e0bcdae4700ff82f11fb9649c7e34b84c1
|
4
|
+
data.tar.gz: 2462c92f33c9a4b6dbe1abd16548b2cfff106eaf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f8f4f6f550e146b9bf84f24c8459e45876e91e7480bac3ee0bc1828a2ceb33850c7dd1dcb95685fbd5330e5501e5cfdde2466d851ffae03b8449b8ec79cf58a9
|
7
|
+
data.tar.gz: 697466a1fe658d109f0df36352de4c9d4dadb5e0731e2b2bad492b82ef4f961dd38dba0406bfb982e05d312519ef0055f62e446166b13fafd4b47dac5f3cdbfc
|
data/bin/favt
CHANGED
@@ -23,11 +23,34 @@ def option_parse
|
|
23
23
|
return options
|
24
24
|
end
|
25
25
|
|
26
|
+
def error_print(title)
|
27
|
+
print "Error!!".light_red
|
28
|
+
print " -- ".light_green
|
29
|
+
print title.uncolorize
|
30
|
+
end
|
31
|
+
|
32
|
+
|
26
33
|
begin
|
27
34
|
ft = Favt::TwitterClient.new(option_parse)
|
28
35
|
ft.render()
|
29
|
-
rescue Twitter::Error::TooManyRequests => e
|
30
|
-
|
31
|
-
|
32
|
-
|
36
|
+
rescue Twitter::Error::TooManyRequests => e
|
37
|
+
error_print("Twitter API, Too Many Requests. Perhaps, Rate Limit Exceeded. \n")
|
38
|
+
rescue Errno::ENOENT
|
39
|
+
error_print("Config file is not found.\n")
|
40
|
+
print <<EOF
|
41
|
+
|
42
|
+
Config file examples (config.yaml)
|
43
|
+
-----------------------------------
|
44
|
+
|
45
|
+
client:
|
46
|
+
consumer_key: "uCFhVhtftsQbpSlox2KZnRCWp"
|
47
|
+
consumer_secret: "wzouRWR4aggXwcArfHeflkcvTDkezjFUhGLhU0D9ijj9fipMOP"
|
48
|
+
access_token: "7883842-IBrjYXVe6yPQ4JBLUm6WjRh8beZuMvmFtH1wckfkqT"
|
49
|
+
access_token_secret: "trdmKwy9CVYN4m6ZE99OmQP853B6ZlYXXWFccdZC1pOSg"
|
50
|
+
|
51
|
+
users:
|
52
|
+
- "esehara"
|
53
|
+
|
54
|
+
EOF
|
33
55
|
end
|
56
|
+
|
data/config.sample.yaml
CHANGED
data/lib/favt/version.rb
CHANGED