twterm 1.1.1 → 1.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/twterm/app.rb +1 -1
- data/lib/twterm/auth.rb +1 -1
- data/lib/twterm/config.rb +2 -1
- data/lib/twterm/tab/key_assignments_cheatsheet.rb +1 -1
- data/lib/twterm/tab/statuses/base.rb +4 -4
- data/lib/twterm/tab/statuses/favorites.rb +1 -1
- data/lib/twterm/tab/user_tab.rb +7 -7
- data/lib/twterm/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d92d1f55e93e2f6fb5d71f3133d935b8d1c132e9
|
4
|
+
data.tar.gz: 81b97cdd4250a385683d057284f1caa9ff82e0a4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c5cde2ee23d353814cfb4dfe4020cf358cf07cd0a66e84b068095b8bda3a2e6691df6d5f6f72a14b1236500bb9a2d863f806954e384b74832ef9d2a1fc4b269f
|
7
|
+
data.tar.gz: 43de8ee9da066f047a59a255562667c947c5869731f3948c6c4a4820ea8ff316bee58bf24b47c5d1846905524d3e05a36f777012c0ba383256dab93de11b7151
|
data/lib/twterm/app.rb
CHANGED
@@ -7,7 +7,7 @@ module Twterm
|
|
7
7
|
def initialize
|
8
8
|
Dir.mkdir(DATA_DIR, 0700) unless File.directory?(DATA_DIR)
|
9
9
|
|
10
|
-
Auth.authenticate_user(config) if config[:
|
10
|
+
Auth.authenticate_user(config) if config[:user_id].nil?
|
11
11
|
|
12
12
|
Screen.instance
|
13
13
|
FilterQueryWindow.instance
|
data/lib/twterm/auth.rb
CHANGED
@@ -20,7 +20,7 @@ module Twterm
|
|
20
20
|
config[:access_token] = access_token.token
|
21
21
|
config[:access_token_secret] = access_token.secret
|
22
22
|
config[:screen_name] = access_token.params[:screen_name]
|
23
|
-
config[:user_id] = access_token.params[:user_id]
|
23
|
+
config[:user_id] = access_token.params[:user_id].to_i
|
24
24
|
end
|
25
25
|
|
26
26
|
module_function :authenticate_user
|
data/lib/twterm/config.rb
CHANGED
@@ -98,7 +98,7 @@ module Twterm
|
|
98
98
|
show_conversation
|
99
99
|
when ?D
|
100
100
|
destroy_status
|
101
|
-
when ?F
|
101
|
+
when ?F, ?L
|
102
102
|
favorite
|
103
103
|
when ?o
|
104
104
|
open_link
|
@@ -188,7 +188,7 @@ module Twterm
|
|
188
188
|
end
|
189
189
|
|
190
190
|
if status.favorited?
|
191
|
-
window.with_color(:black, :
|
191
|
+
window.with_color(:black, :red) do
|
192
192
|
window.addch(' ')
|
193
193
|
end
|
194
194
|
|
@@ -203,8 +203,8 @@ module Twterm
|
|
203
203
|
end
|
204
204
|
|
205
205
|
if status.favorite_count > 0
|
206
|
-
window.with_color(:
|
207
|
-
window.addstr("#{status.favorite_count}
|
206
|
+
window.with_color(:red) do
|
207
|
+
window.addstr("#{status.favorite_count}like#{status.favorite_count > 1 ? 's' : ''}")
|
208
208
|
end
|
209
209
|
window.addch(' ')
|
210
210
|
end
|
data/lib/twterm/tab/user_tab.rb
CHANGED
@@ -42,7 +42,7 @@ module Twterm
|
|
42
42
|
open_timeline_tab
|
43
43
|
show_friends
|
44
44
|
show_followers
|
45
|
-
|
45
|
+
show_likes
|
46
46
|
)
|
47
47
|
items << :open_website unless user.website.nil?
|
48
48
|
items << :toggle_follow unless myself?
|
@@ -57,7 +57,7 @@ module Twterm
|
|
57
57
|
|
58
58
|
case key
|
59
59
|
when ?F
|
60
|
-
follow
|
60
|
+
follow unless myself?
|
61
61
|
when 10
|
62
62
|
perform_selected_action
|
63
63
|
when ?t
|
@@ -154,8 +154,8 @@ module Twterm
|
|
154
154
|
open_timeline_tab
|
155
155
|
when :open_website
|
156
156
|
open_website
|
157
|
-
when :
|
158
|
-
|
157
|
+
when :show_likes
|
158
|
+
show_likes
|
159
159
|
when :show_followers
|
160
160
|
show_followers
|
161
161
|
when :show_friends
|
@@ -175,7 +175,7 @@ module Twterm
|
|
175
175
|
end
|
176
176
|
end
|
177
177
|
|
178
|
-
def
|
178
|
+
def show_likes
|
179
179
|
tab = Tab::Statuses::Favorites.new(user_id)
|
180
180
|
TabManager.instance.add_and_show(tab)
|
181
181
|
end
|
@@ -293,8 +293,8 @@ module Twterm
|
|
293
293
|
window.addstr("[ ] Open website (#{user.website})")
|
294
294
|
window.setpos(current_line, 6)
|
295
295
|
window.bold { window.addch(?W) }
|
296
|
-
when :
|
297
|
-
window.addstr(" #{user.favorites_count.format}
|
296
|
+
when :show_likes
|
297
|
+
window.addstr(" #{user.favorites_count.format} likes")
|
298
298
|
when :show_followers
|
299
299
|
window.addstr(" #{user.followers_count.format} followers")
|
300
300
|
when :show_friends
|
data/lib/twterm/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: twterm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryota Kameoka
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-12-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: curses
|