room 0.2.0 → 0.2.1
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/bin/room +2 -0
- data/room.gemspec +2 -2
- data/rooms/tweets.rb +13 -6
- metadata +4 -4
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.1
|
data/bin/room
CHANGED
data/room.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{room}
|
8
|
-
s.version = "0.2.
|
8
|
+
s.version = "0.2.1"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Tom Lieber"]
|
12
|
-
s.date = %q{2011-04-
|
12
|
+
s.date = %q{2011-04-20}
|
13
13
|
s.default_executable = %q{room}
|
14
14
|
s.description = %q{the game is making the game}
|
15
15
|
s.email = %q{tom@alltom.com}
|
data/rooms/tweets.rb
CHANGED
@@ -34,6 +34,16 @@ def authorize_url
|
|
34
34
|
request_token.authorize_url
|
35
35
|
end
|
36
36
|
|
37
|
+
def configure
|
38
|
+
Twitter.configure do |config|
|
39
|
+
config.consumer_key = $ALPHA
|
40
|
+
config.consumer_secret = $OMEGA
|
41
|
+
config.oauth_token = $state[:twitter_token]
|
42
|
+
config.oauth_token_secret = $state[:twitter_secret]
|
43
|
+
end
|
44
|
+
$configured = true
|
45
|
+
end
|
46
|
+
|
37
47
|
def authorize pin
|
38
48
|
begin
|
39
49
|
access = request_token.get_access_token(:oauth_verifier => pin)
|
@@ -41,12 +51,7 @@ def authorize pin
|
|
41
51
|
$state[:twitter_token] = access.token
|
42
52
|
$state[:twitter_secret] = access.secret
|
43
53
|
|
44
|
-
|
45
|
-
config.consumer_key = $ALPHA
|
46
|
-
config.consumer_secret = $OMEGA
|
47
|
-
config.oauth_token = $state[:twitter_token]
|
48
|
-
config.oauth_token_secret = $state[:twitter_secret]
|
49
|
-
end
|
54
|
+
configure
|
50
55
|
rescue Exception
|
51
56
|
nil
|
52
57
|
end
|
@@ -57,6 +62,8 @@ def tweet_display_format message
|
|
57
62
|
end
|
58
63
|
|
59
64
|
def latest_tweets
|
65
|
+
configure unless $configured
|
66
|
+
|
60
67
|
tweets = begin
|
61
68
|
Twitter.home_timeline($state[:last_tweet_id] ? { :since_id => $state[:last_tweet_id] } : {}).reverse
|
62
69
|
rescue Twitter::Unauthorized
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: room
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 21
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 0.2.
|
9
|
+
- 1
|
10
|
+
version: 0.2.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Tom Lieber
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-04-
|
18
|
+
date: 2011-04-20 00:00:00 -07:00
|
19
19
|
default_executable: room
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|