earthquake 0.6.10 → 0.6.11
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +7 -2
- data/VERSION +1 -1
- data/earthquake.gemspec +2 -2
- data/lib/earthquake/core.rb +3 -1
- data/lib/earthquake/ext.rb +1 -1
- data/lib/earthquake/input.rb +1 -1
- metadata +2 -2
data/README.md
CHANGED
@@ -1,10 +1,13 @@
|
|
1
1
|
Earthquake
|
2
2
|
====
|
3
3
|
|
4
|
-
Terminal-based Twitter Client with Streaming API.
|
5
|
-
|
4
|
+
Terminal-based Twitter Client with Streaming API.
|
6
5
|
It supports only Ruby 1.9.
|
7
6
|
|
7
|
+
Homepage: [https://github.com/jugyo/earthquake](https://github.com/jugyo/earthquake)
|
8
|
+
Twitter: [http://twitter.com/earthquakegem](http://twitter.com/earthquakegem)
|
9
|
+
Demo: [http://www.youtube.com/watch?v=S2KtBGrIe5c](http://www.youtube.com/watch?v=S2KtBGrIe5c)
|
10
|
+
|
8
11
|
**We need patches that fix the english of the documentation!**
|
9
12
|
|
10
13
|
![http://images.instagram.com/media/2011/03/21/862f3b8d119b4eeb9c52e690a0087f5e_7.jpg](http://images.instagram.com/media/2011/03/21/862f3b8d119b4eeb9c52e690a0087f5e_7.jpg)
|
@@ -237,6 +240,8 @@ The 'm' is a MatchData.
|
|
237
240
|
TODO
|
238
241
|
----
|
239
242
|
|
243
|
+
* improve completion
|
244
|
+
* mark my tweet
|
240
245
|
* Earthquake should parse ARGV
|
241
246
|
* ruby1.9nize
|
242
247
|
* guideline for plugin
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.6.
|
1
|
+
0.6.11
|
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.6.
|
8
|
+
s.version = "0.6.11"
|
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-04-
|
12
|
+
s.date = %q{2011-04-25}
|
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}
|
data/lib/earthquake/core.rb
CHANGED
@@ -57,6 +57,7 @@ module Earthquake
|
|
57
57
|
config[:consumer_key] ||= 'RmzuwQ5g0SYObMfebIKJag'
|
58
58
|
config[:consumer_secret] ||= 'V98dYYmWm9JoG7qfOF0jhJaVEVW3QhGYcDJ9JQSXU'
|
59
59
|
config[:output_interval] ||= 1
|
60
|
+
config[:history_size] ||= 1000
|
60
61
|
|
61
62
|
[config[:dir], config[:plugin_dir]].each do |dir|
|
62
63
|
unless File.exists?(dir)
|
@@ -101,6 +102,7 @@ module Earthquake
|
|
101
102
|
input(buf.strip)
|
102
103
|
}
|
103
104
|
end
|
105
|
+
stop
|
104
106
|
end
|
105
107
|
|
106
108
|
Thread.start do
|
@@ -161,7 +163,7 @@ module Earthquake
|
|
161
163
|
end
|
162
164
|
|
163
165
|
def store_history
|
164
|
-
history_size = config[:history_size]
|
166
|
+
history_size = config[:history_size]
|
165
167
|
File.open(File.join(config[:dir], 'history'), 'w') do |file|
|
166
168
|
lines = Readline::HISTORY.to_a[([Readline::HISTORY.size - history_size, 0].max)..-1]
|
167
169
|
file.print(lines.join("\n"))
|
data/lib/earthquake/ext.rb
CHANGED
@@ -45,7 +45,7 @@ class String
|
|
45
45
|
|
46
46
|
def coloring(pattern, color = nil, &block)
|
47
47
|
self.gsub(pattern) do |i|
|
48
|
-
applied_colors =
|
48
|
+
applied_colors = $`.scan(/\e\[[\d;]+m/)
|
49
49
|
c = color || block.call(i)
|
50
50
|
"#{i.c(c)}#{applied_colors.join}"
|
51
51
|
end
|
data/lib/earthquake/input.rb
CHANGED
@@ -111,7 +111,7 @@ module Earthquake
|
|
111
111
|
|
112
112
|
results += command_names.grep(regexp)
|
113
113
|
|
114
|
-
range = Readline::HISTORY.count >=
|
114
|
+
range = Readline::HISTORY.count >= config[:history_size] ? -config[:history_size]..-1 : 0..-1
|
115
115
|
results += Readline::HISTORY.to_a[range].map { |line| line.split(/\s+/) }.flatten.grep(regexp)
|
116
116
|
|
117
117
|
results
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: earthquake
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.6.
|
5
|
+
version: 0.6.11
|
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-04-
|
13
|
+
date: 2011-04-25 00:00:00 +09:00
|
14
14
|
default_executable: earthquake
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|