earthquake 0.5.4 → 0.5.5

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.5.4
1
+ 0.5.5
data/earthquake.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{earthquake}
8
- s.version = "0.5.4"
8
+ s.version = "0.5.5"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["jugyo"]
12
- s.date = %q{2011-03-28}
12
+ s.date = %q{2011-03-30}
13
13
  s.default_executable = %q{earthquake}
14
14
  s.description = %q{Twitter Client on Terminal with Twitter Streaming API.}
15
15
  s.email = %q{jugyo.org@gmail.com}
@@ -60,7 +60,7 @@ Accordingly that, You should renew the access token if it is old.
60
60
  }
61
61
  s.require_paths = ["lib"]
62
62
  s.required_ruby_version = Gem::Requirement.new(">= 1.9.1")
63
- s.rubygems_version = %q{1.6.0}
63
+ s.rubygems_version = %q{1.6.2}
64
64
  s.summary = %q{Twitter Client on Terminal.}
65
65
  s.test_files = [
66
66
  "spec/earthquake_spec.rb",
@@ -50,8 +50,8 @@ module Earthquake
50
50
  end
51
51
 
52
52
  command :delete do |m|
53
- # TODO: confirm
54
- async { twitter.status_destroy(m[1]) }
53
+ tweet = twitter.status(m[1])
54
+ async { twitter.status_destroy(m[1]) } if confirm("delete '#{tweet["text"]}'")
55
55
  end
56
56
 
57
57
  command :mentions do
@@ -170,14 +170,23 @@ module Earthquake
170
170
  end
171
171
 
172
172
  command :thread do |m|
173
- thread = []
174
- thread << twitter.status(m[1])
175
- i = 0
176
- while thread[i]['in_reply_to_status_id'] != nil
177
- thread << twitter.status(thread[i]['in_reply_to_status_id'].to_s)
178
- i += 1
173
+ indent = 0
174
+ tweet = twitter.status(m[1])
175
+ puts_items tweet
176
+ while tweet["in_reply_to_status_id"]
177
+ indent += 1
178
+ tweet = twitter.status(tweet["in_reply_to_status_id"])
179
+ tweet["_mark"] = " " * indent
180
+ puts_items tweet
179
181
  end
180
- puts_items thread
182
+ end
183
+
184
+ command :sh do
185
+ system ENV["SHELL"] || 'sh'
186
+ end
187
+
188
+ command :'!' do |m|
189
+ system m[1]
181
190
  end
182
191
  end
183
192
  end
@@ -76,7 +76,8 @@ module Earthquake
76
76
  elsif item["retweeted_status"]
77
77
  info << "(retweet of #{id2var(item["retweeted_status"]["id"])})"
78
78
  end
79
- info << Time.parse(item["created_at"]).strftime('%m/%d/%y %H:%M %p')
79
+ # NOTE: customizing time format: Time::DATE_FORMATS[:short] = '%m/%d/%y %H:%M %p'
80
+ info << Time.parse(item["created_at"]).to_s(:short)
80
81
  if item["_detail"] && item["source"]
81
82
  info << (item["source"].u =~ />(.*)</ ? $1 : 'web')
82
83
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: earthquake
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.5.4
5
+ version: 0.5.5
6
6
  platform: ruby
7
7
  authors:
8
8
  - jugyo
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-03-28 00:00:00 +09:00
13
+ date: 2011-03-30 00:00:00 +09:00
14
14
  default_executable: earthquake
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
@@ -194,7 +194,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
194
194
  requirements: []
195
195
 
196
196
  rubyforge_project:
197
- rubygems_version: 1.6.0
197
+ rubygems_version: 1.6.2
198
198
  signing_key:
199
199
  specification_version: 3
200
200
  summary: Twitter Client on Terminal.