tweethose 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +2 -2
- data/lib/generators/tweethose/templates/config +0 -2
- data/lib/generators/tweethose/templates/initializer +3 -0
- data/lib/tweethose/config.rb +27 -0
- data/lib/tweethose/version.rb +1 -1
- data/lib/tweethose/worker.rb +2 -2
- data/test/{tweethook_test.rb → tweethose_test.rb} +0 -0
- metadata +11 -11
data/README.rdoc
CHANGED
@@ -25,7 +25,7 @@ This creates the following files:
|
|
25
25
|
|
26
26
|
== Running
|
27
27
|
|
28
|
-
* Set up your Twitter credentials in +config/tweethose.
|
28
|
+
* Set up your Twitter credentials in +config/initializers/tweethose.rb+.
|
29
29
|
* Set up the keywords you're interested in tracking in +config/initializers/tweethose.rb+.
|
30
30
|
* Set up the callbacks you want to run when new tweets arrive in +config/initializers/tweethose.rb+.
|
31
31
|
* Then run the daemon.
|
@@ -60,7 +60,7 @@ This creates the following files:
|
|
60
60
|
|
61
61
|
=== Twitter credentials
|
62
62
|
|
63
|
-
To connect to Twitter you need to use a set of Twitter credentials. These can be put into the file +config/tweethose.
|
63
|
+
To connect to Twitter you need to use a set of Twitter credentials. These can be put into the file +config/initializers/tweethose.rb+.
|
64
64
|
|
65
65
|
=== What to track
|
66
66
|
|
data/lib/tweethose/config.rb
CHANGED
@@ -4,6 +4,33 @@ module TweetHose
|
|
4
4
|
# Configures TweetHose
|
5
5
|
#
|
6
6
|
class Config
|
7
|
+
##
|
8
|
+
# Sets the Twitter username
|
9
|
+
#
|
10
|
+
def self.username=(username)
|
11
|
+
@username = username
|
12
|
+
end
|
13
|
+
|
14
|
+
##
|
15
|
+
# Gets the username
|
16
|
+
#
|
17
|
+
def self.username
|
18
|
+
@username
|
19
|
+
end
|
20
|
+
|
21
|
+
##
|
22
|
+
# Sets the Twitter password
|
23
|
+
#
|
24
|
+
def self.password=(password)
|
25
|
+
@password = password
|
26
|
+
end
|
27
|
+
|
28
|
+
##
|
29
|
+
# Gets the password
|
30
|
+
#
|
31
|
+
def self.password
|
32
|
+
@password
|
33
|
+
end
|
7
34
|
|
8
35
|
##
|
9
36
|
# Sets the keywords to track from Twitter.
|
data/lib/tweethose/version.rb
CHANGED
data/lib/tweethose/worker.rb
CHANGED
@@ -33,8 +33,8 @@ module TweetHose
|
|
33
33
|
|
34
34
|
def configure(config)
|
35
35
|
TweetStream.configure do |c|
|
36
|
-
c.username =
|
37
|
-
c.password =
|
36
|
+
c.username = TweetHose::Config.username
|
37
|
+
c.password = TweetHose::Config.password
|
38
38
|
c.auth_method = :basic
|
39
39
|
c.parser = :yajl
|
40
40
|
end
|
File without changes
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tweethose
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ date: 2011-10-22 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
16
|
-
requirement: &
|
16
|
+
requirement: &75600680 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: 3.1.1
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *75600680
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: tweetstream
|
27
|
-
requirement: &
|
27
|
+
requirement: &75599990 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *75599990
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: sqlite3
|
38
|
-
requirement: &
|
38
|
+
requirement: &75599440 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ! '>='
|
@@ -43,7 +43,7 @@ dependencies:
|
|
43
43
|
version: '0'
|
44
44
|
type: :development
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *75599440
|
47
47
|
description: TweetHose lets you easily generate a daemon that listens to the Twitter
|
48
48
|
firehose. When keywords you're interested in appears, you can set up a callback.
|
49
49
|
Should make it easy to create that Justin Bieber tracking app you've always wanted.
|
@@ -69,7 +69,7 @@ files:
|
|
69
69
|
- Rakefile
|
70
70
|
- README.rdoc
|
71
71
|
- test/test_helper.rb
|
72
|
-
- test/
|
72
|
+
- test/tweethose_test.rb
|
73
73
|
- test/dummy/config.ru
|
74
74
|
- test/dummy/public/404.html
|
75
75
|
- test/dummy/public/422.html
|
@@ -116,7 +116,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
116
116
|
version: '0'
|
117
117
|
segments:
|
118
118
|
- 0
|
119
|
-
hash: -
|
119
|
+
hash: -614555217
|
120
120
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
121
121
|
none: false
|
122
122
|
requirements:
|
@@ -125,7 +125,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
125
125
|
version: '0'
|
126
126
|
segments:
|
127
127
|
- 0
|
128
|
-
hash: -
|
128
|
+
hash: -614555217
|
129
129
|
requirements: []
|
130
130
|
rubyforge_project:
|
131
131
|
rubygems_version: 1.8.5
|
@@ -134,7 +134,7 @@ specification_version: 3
|
|
134
134
|
summary: TweetHose, tap into the Twitter Firehose
|
135
135
|
test_files:
|
136
136
|
- test/test_helper.rb
|
137
|
-
- test/
|
137
|
+
- test/tweethose_test.rb
|
138
138
|
- test/dummy/config.ru
|
139
139
|
- test/dummy/public/404.html
|
140
140
|
- test/dummy/public/422.html
|