facebookcl 0.3.2 → 0.3.3
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/facebookcl.gemspec +1 -1
- data/lib/facebookcl.rb +9 -6
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.3.
|
1
|
+
0.3.3
|
data/facebookcl.gemspec
CHANGED
data/lib/facebookcl.rb
CHANGED
@@ -1,19 +1,22 @@
|
|
1
1
|
require 'rubygems'
|
2
2
|
|
3
|
-
|
3
|
+
# built in
|
4
4
|
require 'net/http'
|
5
5
|
require 'net/https'
|
6
6
|
require 'open-uri'
|
7
7
|
require 'socket'
|
8
8
|
require 'uri'
|
9
9
|
|
10
|
+
# runtime dependencies
|
11
|
+
require 'json'
|
12
|
+
|
10
13
|
module FacebookCL; class << self
|
11
14
|
public
|
12
15
|
|
13
|
-
APP_ID = 119412046078
|
14
|
-
SERVER_PORT = 6682
|
16
|
+
APP_ID = 119412046078 # FacebookCL
|
17
|
+
SERVER_PORT = 6682 # my birthday ;o)
|
15
18
|
GRAPH_URL = 'graph.facebook.com'
|
16
|
-
NEXT_URL = '
|
19
|
+
NEXT_URL = '127.0.0.1'
|
17
20
|
|
18
21
|
attr_accessor :uid
|
19
22
|
|
@@ -32,7 +35,7 @@ module FacebookCL; class << self
|
|
32
35
|
'read_mailbox']
|
33
36
|
|
34
37
|
params = {'client_id' => APP_ID,
|
35
|
-
'redirect_uri' => NEXT_URL,
|
38
|
+
'redirect_uri' => "http://#{NEXT_URL}:#{SERVER_PORT}",
|
36
39
|
'type' => 'user_agent',
|
37
40
|
'display' => 'page',
|
38
41
|
'scope' => perms.join(',')}
|
@@ -115,7 +118,7 @@ module FacebookCL; class << self
|
|
115
118
|
end
|
116
119
|
|
117
120
|
def serve_content(content)
|
118
|
-
@server ||= TCPServer.new(
|
121
|
+
@server ||= TCPServer.new(NEXT_URL, SERVER_PORT)
|
119
122
|
|
120
123
|
session = @server.accept
|
121
124
|
session.print "HTTP/1.1 200/OK\r\nContent-type:text/html\r\n\r\n"
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: facebookcl
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 21
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 3
|
9
|
-
-
|
10
|
-
version: 0.3.
|
9
|
+
- 3
|
10
|
+
version: 0.3.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Justin Bishop
|