twail 0.1.7 → 0.1.8

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.
Files changed (3) hide show
  1. data/lib/twail.rb +8 -0
  2. data/twail.gemspec +1 -1
  3. metadata +10 -5
@@ -61,6 +61,10 @@ To automatically wrap long text, use the -w flag:
61
61
 
62
62
  twail -w m
63
63
 
64
+ To act like `tail -f` and to output new data as it comes in:
65
+
66
+ twail -f [args]
67
+
64
68
  For more help, see the README at
65
69
 
66
70
  https://github.com/danchoi/twail
@@ -77,6 +81,7 @@ end
77
81
 
78
82
  options = {}
79
83
  OptionParser.new {|opts|
84
+ opts.on("-f", "Act like tail -f") { options[:tailf] = true }
80
85
  opts.on("-w", "--wrap", "Wrap long text") {|x| options[:wrap] = x }
81
86
  opts.on("-i", "--include-ids", "Include tweet ids") {|x| options[:tweet_ids] = x }
82
87
  }.parse!
@@ -110,6 +115,7 @@ if ARGV.first =~ /^s/ # search
110
115
  puts("%s | %s" % [''.rjust(40), line])
111
116
  end
112
117
  end
118
+ exit if !options[:tailf]
113
119
  query = res['next_page']
114
120
  if max_pages
115
121
  if query.nil? || query[/page=(\d+)/, 1].to_i > max_pages.to_i
@@ -196,6 +202,8 @@ loop do
196
202
  $stdout.flush
197
203
  exit
198
204
  end
205
+ exit if !options[:tailf]
206
+
199
207
  sleep 30
200
208
  end
201
209
 
@@ -2,7 +2,7 @@
2
2
  $:.push File.expand_path("../lib", __FILE__)
3
3
  Gem::Specification.new do |s|
4
4
  s.name = "twail"
5
- s.version = '0.1.7'
5
+ s.version = '0.1.8'
6
6
  s.platform = Gem::Platform::RUBY
7
7
  s.required_ruby_version = '>= 1.9.0'
8
8
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: twail
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.7
4
+ version: 0.1.8
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-01-31 00:00:00.000000000Z
12
+ date: 2012-05-17 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: twurl
16
- requirement: &70179478155120 !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,7 +21,12 @@ dependencies:
21
21
  version: 0.6.3
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70179478155120
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: 0.6.3
25
30
  description: tail your Twitter timelines, or search Twitter
26
31
  email:
27
32
  - dhchoi@gmail.com
@@ -60,7 +65,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
60
65
  version: '0'
61
66
  requirements: []
62
67
  rubyforge_project: twail
63
- rubygems_version: 1.8.10
68
+ rubygems_version: 1.8.23
64
69
  signing_key:
65
70
  specification_version: 3
66
71
  summary: tail your Twitter timelines, or search Twitter