rest-graph 1.9.0 → 1.9.1
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGES +4 -0
- data/CONTRIBUTORS +1 -0
- data/Gemfile +0 -1
- data/lib/rest-graph/core.rb +1 -1
- data/lib/rest-graph/version.rb +1 -1
- data/rest-graph.gemspec +3 -3
- data/test/test_parse.rb +9 -0
- data/test/test_serialize.rb +1 -1
- metadata +23 -23
data/CHANGES
CHANGED
data/CONTRIBUTORS
CHANGED
data/Gemfile
CHANGED
data/lib/rest-graph/core.rb
CHANGED
@@ -350,7 +350,7 @@ class RestGraph < RestGraphStruct
|
|
350
350
|
def parse_fbs! fbs
|
351
351
|
self.data = check_sig_and_return_data(
|
352
352
|
# take out facebook sometimes there but sometimes not quotes in cookies
|
353
|
-
Rack::Utils.parse_query(fbs.to_s.
|
353
|
+
Rack::Utils.parse_query(fbs.to_s.sub(/^"/, '').sub(/"$/, '')))
|
354
354
|
end
|
355
355
|
|
356
356
|
def parse_json! json
|
data/lib/rest-graph/version.rb
CHANGED
data/rest-graph.gemspec
CHANGED
@@ -2,13 +2,13 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{rest-graph}
|
5
|
-
s.version = "1.9.
|
5
|
+
s.version = "1.9.1"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = [
|
9
9
|
%q{Cardinal Blue},
|
10
10
|
%q{Lin Jen-Shin (godfat)}]
|
11
|
-
s.date = %q{2011-
|
11
|
+
s.date = %q{2011-06-07}
|
12
12
|
s.description = %q{A lightweight Facebook Graph API client}
|
13
13
|
s.email = [%q{dev (XD) cardinalblue.com}]
|
14
14
|
s.extra_rdoc_files = [
|
@@ -108,7 +108,7 @@ Gem::Specification.new do |s|
|
|
108
108
|
%q{--main},
|
109
109
|
%q{README}]
|
110
110
|
s.require_paths = [%q{lib}]
|
111
|
-
s.rubygems_version = %q{1.8.
|
111
|
+
s.rubygems_version = %q{1.8.5}
|
112
112
|
s.summary = %q{A lightweight Facebook Graph API client}
|
113
113
|
s.test_files = [
|
114
114
|
%q{test/test_api.rb},
|
data/test/test_parse.rb
CHANGED
@@ -13,6 +13,15 @@ describe RestGraph do
|
|
13
13
|
rg.data .should == {}
|
14
14
|
end
|
15
15
|
|
16
|
+
should 'parse if fbs contains json as well' do
|
17
|
+
algorithm = 'HMAC-SHA256'
|
18
|
+
user = '{"country"=>"us", "age"=>{"min"=>21}}'
|
19
|
+
data = {'algorithm' => algorithm, 'user' => user}
|
20
|
+
rg = RestGraph.new(:data => data, :secret => 'secret')
|
21
|
+
sig = rg.send(:calculate_sig, data)
|
22
|
+
rg.parse_fbs!("\"#{rg.fbs}\"").should == data.merge('sig' => sig)
|
23
|
+
end
|
24
|
+
|
16
25
|
should 'extract correct access_token or fail checking sig' do
|
17
26
|
access_token = '1|2-5|f.'
|
18
27
|
app_id = '1829'
|
data/test/test_serialize.rb
CHANGED
@@ -14,7 +14,7 @@ describe RestGraph do
|
|
14
14
|
should 'be serialized with lighten' do
|
15
15
|
engines = if RUBY_VERSION >= '1.9.2'
|
16
16
|
require 'psych'
|
17
|
-
YAML::ENGINE.yamler = '
|
17
|
+
YAML::ENGINE.yamler = 'psych'
|
18
18
|
[Marshal, YAML, Psych]
|
19
19
|
elsif defined?(RUBY_ENGINE) && RUBY_ENGINE == 'rbx'
|
20
20
|
[Marshal]
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rest-graph
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.9.
|
4
|
+
version: 1.9.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,11 +10,11 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2011-
|
13
|
+
date: 2011-06-07 00:00:00.000000000Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rest-client
|
17
|
-
requirement: &
|
17
|
+
requirement: &2153137640 !ruby/object:Gem::Requirement
|
18
18
|
none: false
|
19
19
|
requirements:
|
20
20
|
- - ! '>='
|
@@ -22,10 +22,10 @@ dependencies:
|
|
22
22
|
version: '0'
|
23
23
|
type: :development
|
24
24
|
prerelease: false
|
25
|
-
version_requirements: *
|
25
|
+
version_requirements: *2153137640
|
26
26
|
- !ruby/object:Gem::Dependency
|
27
27
|
name: em-http-request
|
28
|
-
requirement: &
|
28
|
+
requirement: &2153136940 !ruby/object:Gem::Requirement
|
29
29
|
none: false
|
30
30
|
requirements:
|
31
31
|
- - ! '>='
|
@@ -33,10 +33,10 @@ dependencies:
|
|
33
33
|
version: '0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
|
-
version_requirements: *
|
36
|
+
version_requirements: *2153136940
|
37
37
|
- !ruby/object:Gem::Dependency
|
38
38
|
name: rack
|
39
|
-
requirement: &
|
39
|
+
requirement: &2153136260 !ruby/object:Gem::Requirement
|
40
40
|
none: false
|
41
41
|
requirements:
|
42
42
|
- - ! '>='
|
@@ -44,10 +44,10 @@ dependencies:
|
|
44
44
|
version: '0'
|
45
45
|
type: :development
|
46
46
|
prerelease: false
|
47
|
-
version_requirements: *
|
47
|
+
version_requirements: *2153136260
|
48
48
|
- !ruby/object:Gem::Dependency
|
49
49
|
name: yajl-ruby
|
50
|
-
requirement: &
|
50
|
+
requirement: &2153135660 !ruby/object:Gem::Requirement
|
51
51
|
none: false
|
52
52
|
requirements:
|
53
53
|
- - ! '>='
|
@@ -55,10 +55,10 @@ dependencies:
|
|
55
55
|
version: '0'
|
56
56
|
type: :development
|
57
57
|
prerelease: false
|
58
|
-
version_requirements: *
|
58
|
+
version_requirements: *2153135660
|
59
59
|
- !ruby/object:Gem::Dependency
|
60
60
|
name: json
|
61
|
-
requirement: &
|
61
|
+
requirement: &2153135040 !ruby/object:Gem::Requirement
|
62
62
|
none: false
|
63
63
|
requirements:
|
64
64
|
- - ! '>='
|
@@ -66,10 +66,10 @@ dependencies:
|
|
66
66
|
version: '0'
|
67
67
|
type: :development
|
68
68
|
prerelease: false
|
69
|
-
version_requirements: *
|
69
|
+
version_requirements: *2153135040
|
70
70
|
- !ruby/object:Gem::Dependency
|
71
71
|
name: json_pure
|
72
|
-
requirement: &
|
72
|
+
requirement: &2153134480 !ruby/object:Gem::Requirement
|
73
73
|
none: false
|
74
74
|
requirements:
|
75
75
|
- - ! '>='
|
@@ -77,10 +77,10 @@ dependencies:
|
|
77
77
|
version: '0'
|
78
78
|
type: :development
|
79
79
|
prerelease: false
|
80
|
-
version_requirements: *
|
80
|
+
version_requirements: *2153134480
|
81
81
|
- !ruby/object:Gem::Dependency
|
82
82
|
name: ruby-hmac
|
83
|
-
requirement: &
|
83
|
+
requirement: &2153118560 !ruby/object:Gem::Requirement
|
84
84
|
none: false
|
85
85
|
requirements:
|
86
86
|
- - ! '>='
|
@@ -88,10 +88,10 @@ dependencies:
|
|
88
88
|
version: '0'
|
89
89
|
type: :development
|
90
90
|
prerelease: false
|
91
|
-
version_requirements: *
|
91
|
+
version_requirements: *2153118560
|
92
92
|
- !ruby/object:Gem::Dependency
|
93
93
|
name: webmock
|
94
|
-
requirement: &
|
94
|
+
requirement: &2153118020 !ruby/object:Gem::Requirement
|
95
95
|
none: false
|
96
96
|
requirements:
|
97
97
|
- - ! '>='
|
@@ -99,10 +99,10 @@ dependencies:
|
|
99
99
|
version: '0'
|
100
100
|
type: :development
|
101
101
|
prerelease: false
|
102
|
-
version_requirements: *
|
102
|
+
version_requirements: *2153118020
|
103
103
|
- !ruby/object:Gem::Dependency
|
104
104
|
name: bacon
|
105
|
-
requirement: &
|
105
|
+
requirement: &2153117440 !ruby/object:Gem::Requirement
|
106
106
|
none: false
|
107
107
|
requirements:
|
108
108
|
- - ! '>='
|
@@ -110,10 +110,10 @@ dependencies:
|
|
110
110
|
version: '0'
|
111
111
|
type: :development
|
112
112
|
prerelease: false
|
113
|
-
version_requirements: *
|
113
|
+
version_requirements: *2153117440
|
114
114
|
- !ruby/object:Gem::Dependency
|
115
115
|
name: rr
|
116
|
-
requirement: &
|
116
|
+
requirement: &2153116840 !ruby/object:Gem::Requirement
|
117
117
|
none: false
|
118
118
|
requirements:
|
119
119
|
- - ! '>='
|
@@ -121,7 +121,7 @@ dependencies:
|
|
121
121
|
version: '0'
|
122
122
|
type: :development
|
123
123
|
prerelease: false
|
124
|
-
version_requirements: *
|
124
|
+
version_requirements: *2153116840
|
125
125
|
description: A lightweight Facebook Graph API client
|
126
126
|
email:
|
127
127
|
- dev (XD) cardinalblue.com
|
@@ -241,7 +241,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
241
241
|
version: '0'
|
242
242
|
requirements: []
|
243
243
|
rubyforge_project:
|
244
|
-
rubygems_version: 1.8.
|
244
|
+
rubygems_version: 1.8.5
|
245
245
|
signing_key:
|
246
246
|
specification_version: 3
|
247
247
|
summary: A lightweight Facebook Graph API client
|