t 0.9.3 → 0.9.4
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/t/cli.rb +8 -8
- data/lib/t/version.rb +1 -1
- metadata +2 -2
data/lib/t/cli.rb
CHANGED
@@ -27,11 +27,6 @@ require 'time'
|
|
27
27
|
require 'twitter'
|
28
28
|
require 'yaml'
|
29
29
|
|
30
|
-
# twitter-text requires $KCODE to be set to UTF8 on Ruby versions < 1.8
|
31
|
-
major, minor, patch = RUBY_VERSION.split('.')
|
32
|
-
$KCODE='u' if major.to_i == 1 && minor.to_i < 9
|
33
|
-
require 'twitter-text'
|
34
|
-
|
35
30
|
module T
|
36
31
|
class CLI < Thor
|
37
32
|
include ActionView::Helpers::DateHelper
|
@@ -41,7 +36,6 @@ module T
|
|
41
36
|
include T::Collectable
|
42
37
|
include T::Printable
|
43
38
|
include T::Requestable
|
44
|
-
include Twitter::Extractor
|
45
39
|
|
46
40
|
DEFAULT_NUM_RESULTS = 20
|
47
41
|
MAX_SCREEN_NAME_SIZE = 20
|
@@ -549,8 +543,14 @@ module T
|
|
549
543
|
status_id = status_id.strip_commas
|
550
544
|
status = client.status(status_id.to_i, :include_entities => false, :include_my_retweet => false)
|
551
545
|
users = Array(status.user.screen_name)
|
552
|
-
|
553
|
-
|
546
|
+
if options['all']
|
547
|
+
# twitter-text requires $KCODE to be set to UTF8 on Ruby versions < 1.8
|
548
|
+
major, minor, patch = RUBY_VERSION.split('.')
|
549
|
+
$KCODE='u' if major.to_i == 1 && minor.to_i < 9
|
550
|
+
require 'twitter-text'
|
551
|
+
users += Twitter::Extractor.extract_mentioned_screen_names(status.text)
|
552
|
+
users.uniq!
|
553
|
+
end
|
554
554
|
users.map!(&:prepend_at)
|
555
555
|
opts = {:in_reply_to_status_id => status.id, :include_entities => false, :trim_user => true}
|
556
556
|
opts.merge!(:lat => location.lat, :long => location.lng) if options['location']
|
data/lib/t/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: t
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-05-
|
12
|
+
date: 2012-05-03 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: actionpack
|