tw 1.0.8 → 1.0.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/History.txt +4 -0
- data/README.md +5 -0
- data/lib/tw/app/cmds.rb +12 -14
- data/lib/tw/app/main.rb +1 -1
- data/lib/tw/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: e64555308b2e89caac6aa6d6687d6e568b9ac1ec
|
4
|
+
data.tar.gz: cd7a952db9243a38e6a254feb8551fe196cbe390
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5580dbeb7ffe25a0325b671ad5472b8a6d23c8d47ad5a75e41cd5e29f50e469510e5e6d26049991fdca1dc33d145c1946d03a90abb0fa3fc2a891814428f5abb
|
7
|
+
data.tar.gz: 2b1d2cb9653e3b4883c9af48f013dc1173cf6f1b10ff062e712ec44b82b7af75acd6c60793cb1f840caeb7d46c18b6ead04b03b129bf3bd9639447a73b646c9e
|
data/History.txt
CHANGED
data/README.md
CHANGED
@@ -44,9 +44,14 @@ Reply/Fav/RT
|
|
44
44
|
|
45
45
|
% tw @shokai --id
|
46
46
|
% tw "@shokai wow!!" --id=334749349588377601
|
47
|
+
% tw --id=334749349588377601
|
47
48
|
% tw --fav=334749349588377601
|
48
49
|
% tw --rt=334749349588377601
|
49
50
|
|
51
|
+
Delete
|
52
|
+
|
53
|
+
% tw --del=334749349588377601
|
54
|
+
|
50
55
|
Switch Accounts
|
51
56
|
|
52
57
|
% tw --user:add
|
data/lib/tw/app/cmds.rb
CHANGED
@@ -122,22 +122,20 @@ module Tw::App
|
|
122
122
|
|
123
123
|
cmd :pipe do |v, opts|
|
124
124
|
auth
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
end
|
136
|
-
rescue => e
|
137
|
-
STDERR.puts e.message
|
125
|
+
lines = STDIN.readlines.join
|
126
|
+
lines.split(/(.{140})/u).select{|m|m.size>0}.each do |message|
|
127
|
+
begin
|
128
|
+
if opts.has_param? 'dm:to'
|
129
|
+
puts to = opts['dm:to']
|
130
|
+
client.direct_message_create to, message
|
131
|
+
else
|
132
|
+
tweet_opts = {}
|
133
|
+
tweet_opts[:in_reply_to_status_id] = opts[:status_id] if opts.has_param? :status_id
|
134
|
+
client.tweet message, tweet_opts
|
138
135
|
end
|
136
|
+
rescue => e
|
137
|
+
STDERR.puts e.message
|
139
138
|
end
|
140
|
-
sleep 1
|
141
139
|
end
|
142
140
|
on_exit
|
143
141
|
end
|
data/lib/tw/app/main.rb
CHANGED
@@ -98,7 +98,7 @@ module Tw::App
|
|
98
98
|
STDERR.puts " tw --stream:filter=ruby,java"
|
99
99
|
STDERR.puts " tw --dm:to=username \"hello!\""
|
100
100
|
STDERR.puts "id tw @shokai --id"
|
101
|
-
STDERR.puts " tw
|
101
|
+
STDERR.puts " tw --id=334749349588377601"
|
102
102
|
STDERR.puts 'reply tw "@shokai wow!!" --id=334749349588377601'
|
103
103
|
STDERR.puts " tw --fav=334749349588377601"
|
104
104
|
STDERR.puts " tw --rt=334749349588377601"
|
data/lib/tw/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tw
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sho Hashimoto
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-05-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: twitter
|