tweetstream 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of tweetstream might be problematic. Click here for more details.

data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.1
1
+ 0.1.2
@@ -78,8 +78,7 @@ module TweetStream
78
78
  start('statuses/filter', query_params.merge(:follow => user_ids.join(',')), &block)
79
79
  end
80
80
 
81
- #:nodoc:
82
- def start(path, query_parameters = {}, &block)
81
+ def start(path, query_parameters = {}, &block) #:nodoc:
83
82
  uri = build_uri(path, query_parameters)
84
83
 
85
84
  Yajl::HttpStream.get(uri, :symbolize_keys => true) do |hash|
@@ -89,13 +88,11 @@ module TweetStream
89
88
 
90
89
  protected
91
90
 
92
- #:nodoc:
93
- def build_uri(path, query_parameters = {})
91
+ def build_uri(path, query_parameters = {}) #:nodoc:
94
92
  URI.parse("http://#{self.username}:#{self.password}@stream.twitter.com/1/#{path}.json#{build_query_parameters(query_parameters)}")
95
93
  end
96
94
 
97
- #:nodoc:
98
- def build_query_parameters(query)
95
+ def build_query_parameters(query) #:nodoc:
99
96
  return '' unless query && query.is_a?(::Hash) && query.size > 0
100
97
  pairs = []
101
98
 
@@ -31,8 +31,7 @@ class TweetStream::Daemon < TweetStream::Client
31
31
  super(user, pass)
32
32
  end
33
33
 
34
- #:nodoc:
35
- def start(path, query_parameters = {}, &block)
34
+ def start(path, query_parameters = {}, &block) #:nodoc:
36
35
  Daemons.run_proc(@app_name || 'tweetstream', :multiple => true) do
37
36
  super(path, query_parameters, &block)
38
37
  end
@@ -1,6 +1,5 @@
1
- #:nodoc:
2
- class TweetStream::Hash < ::Hash
3
- def initialize(other_hash)
1
+ class TweetStream::Hash < ::Hash #:nodoc: all
2
+ def initialize(other_hash = {})
4
3
  other_hash.keys.each do |key|
5
4
  self[key.to_sym] = other_hash[key]
6
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tweetstream
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Bleigh
@@ -56,7 +56,6 @@ files:
56
56
  - README.rdoc
57
57
  - Rakefile
58
58
  - VERSION
59
- - lib/tracker.rb
60
59
  - lib/tweetstream.rb
61
60
  - lib/tweetstream/client.rb
62
61
  - lib/tweetstream/daemon.rb
data/lib/tracker.rb DELETED
@@ -1,12 +0,0 @@
1
- require 'rubygems'
2
- require 'tweetstream'
3
- require 'logger'
4
-
5
- File.open('tracker.log', File::WRONLY | File::APPEND | File::CREAT) do |file|
6
- log = Logger.new(file)
7
-
8
- TweetStream::Daemon.new('mbleigh','hotmail', 'tracker').track('fail') do |status|
9
- log.info "[#{status.user.screen_name}] #{status.text}"
10
- puts "[#{status.user.screen_name}] #{status.text}"
11
- end
12
- end