twtail 0.1.3 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/VERSION +1 -1
- data/lib/twtail.rb +9 -10
- data/twtail.gemspec +2 -2
- metadata +4 -4
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.4
|
data/lib/twtail.rb
CHANGED
@@ -29,7 +29,6 @@ module Twtail
|
|
29
29
|
coder = HTMLEntities.new
|
30
30
|
|
31
31
|
puts "\033[37m==\033[0m \033[1;32m#{feed.channel.title}\033[0m \033[37m==\033[0m\n\n" unless Module.constants.include?("DEBUG")
|
32
|
-
|
33
32
|
if feed.items[0].published < pointer
|
34
33
|
puts "No items found since yesterday"
|
35
34
|
exit
|
@@ -38,23 +37,23 @@ module Twtail
|
|
38
37
|
while 1==1 do
|
39
38
|
new_items = false
|
40
39
|
begin
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
40
|
+
feed = SimpleRSS.parse open(url) rescue nil
|
41
|
+
feed.items.each do |item|
|
42
|
+
next if item.published < pointer
|
43
|
+
unless Module.constants.include?("DEBUG")
|
44
|
+
puts "\033[32m#{item.author.sub(/(\w+).+\n.+/,'\1')}: \033[0m\033[37m#{coder.decode(item.title)}\033[0m"
|
45
|
+
new_items = true
|
46
|
+
end
|
47
47
|
end
|
48
|
-
end
|
49
48
|
rescue
|
50
49
|
end
|
51
50
|
puts "\n\n" if new_items == true
|
52
51
|
pointer = feed.items[0].published + 1
|
53
52
|
break if Module.constants.include?("DEBUG")
|
54
|
-
sleep(
|
53
|
+
sleep(10)
|
55
54
|
end
|
56
55
|
rescue
|
57
|
-
|
56
|
+
"No data was found for this criteria. please try with other keywords."
|
58
57
|
end
|
59
58
|
end
|
60
59
|
end
|
data/twtail.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{twtail}
|
8
|
-
s.version = "0.1.
|
8
|
+
s.version = "0.1.4"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["rodrigo franco (caffo)"]
|
12
|
-
s.date = %q{2010-08-
|
12
|
+
s.date = %q{2010-08-07}
|
13
13
|
s.default_executable = %q{twtail}
|
14
14
|
s.description = %q{twitter tail based on search.twitter.com - works perfectly with crappy internet connections usually available at tech conferences}
|
15
15
|
s.email = %q{caffeine@gmail.com}
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: twtail
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 19
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 4
|
10
|
+
version: 0.1.4
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- rodrigo franco (caffo)
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-08-
|
18
|
+
date: 2010-08-07 00:00:00 -03:00
|
19
19
|
default_executable: twtail
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|