fb_graph 2.6.3 → 2.6.4
Sign up to get free protection for your applications and to get access to all the features.
- data/.travis.yml +0 -1
- data/Gemfile.lock +3 -3
- data/VERSION +1 -1
- data/fb_graph.gemspec +1 -1
- data/lib/fb_graph/connections/permissions.rb +2 -2
- data/spec/fb_graph/connections/permissions_spec.rb +9 -0
- data/spec/fb_graph/user_spec.rb +1 -1
- metadata +5 -5
data/.travis.yml
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
fb_graph (2.6.
|
4
|
+
fb_graph (2.6.4)
|
5
5
|
httpclient (>= 2.2.0.2)
|
6
6
|
multi_json (>= 1.3)
|
7
7
|
rack-oauth2 (>= 0.14.4)
|
@@ -37,7 +37,7 @@ GEM
|
|
37
37
|
crack (0.3.2)
|
38
38
|
diff-lcs (1.1.3)
|
39
39
|
erubis (2.7.0)
|
40
|
-
fb_graph-mock (0.1.
|
40
|
+
fb_graph-mock (0.1.1)
|
41
41
|
fb_graph
|
42
42
|
rspec
|
43
43
|
webmock
|
@@ -88,7 +88,7 @@ DEPENDENCIES
|
|
88
88
|
actionpack (>= 3.0.6)
|
89
89
|
cover_me (>= 1.2.0)
|
90
90
|
fb_graph!
|
91
|
-
fb_graph-mock (>= 0.1.
|
91
|
+
fb_graph-mock (>= 0.1.1)
|
92
92
|
jruby-openssl (>= 0.7)
|
93
93
|
oj
|
94
94
|
rake (>= 0.8)
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.6.
|
1
|
+
2.6.4
|
data/fb_graph.gemspec
CHANGED
@@ -23,6 +23,6 @@ Gem::Specification.new do |s|
|
|
23
23
|
s.add_development_dependency "rcov", ">= 0.9"
|
24
24
|
end
|
25
25
|
s.add_development_dependency "rspec", ">= 2"
|
26
|
-
s.add_development_dependency "fb_graph-mock", ">= 0.1.
|
26
|
+
s.add_development_dependency "fb_graph-mock", ">= 0.1.1"
|
27
27
|
s.add_development_dependency "actionpack", ">= 3.0.6"
|
28
28
|
end
|
@@ -2,10 +2,10 @@ module FbGraph
|
|
2
2
|
module Connections
|
3
3
|
module Permissions
|
4
4
|
def permissions(options = {})
|
5
|
-
self.connection(:permissions, options).first.inject
|
5
|
+
self.connection(:permissions, options).first.try(:inject, []) do |arr, (key, value)|
|
6
6
|
arr << key.to_sym if value.to_i == 1
|
7
7
|
arr
|
8
|
-
end
|
8
|
+
end || []
|
9
9
|
end
|
10
10
|
|
11
11
|
def revoke!(permission = nil, options = {})
|
@@ -15,6 +15,15 @@ describe FbGraph::Connections::Permissions do
|
|
15
15
|
permission.should be_instance_of Symbol
|
16
16
|
end
|
17
17
|
end
|
18
|
+
|
19
|
+
context 'when blank' do
|
20
|
+
it 'should return blank array' do
|
21
|
+
mock_graph :get, 'me/permissions', 'users/permissions/blank', :access_token => 'access_token' do
|
22
|
+
permissions = FbGraph::User.me('access_token').permissions
|
23
|
+
permissions.should == []
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
18
27
|
end
|
19
28
|
|
20
29
|
describe '#revoke!' do
|
data/spec/fb_graph/user_spec.rb
CHANGED
@@ -45,7 +45,7 @@ describe FbGraph::User do
|
|
45
45
|
|
46
46
|
# age_range
|
47
47
|
me.age_range.should be_instance_of FbGraph::AgeRange
|
48
|
-
me.age_range.should == (21
|
48
|
+
me.age_range.should == Range.new(21, FbGraph::AgeRange::DEFAULT_MAX_AGE)
|
49
49
|
|
50
50
|
# currency
|
51
51
|
me.currency.should be_instance_of ActiveSupport::HashWithIndifferentAccess
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fb_graph
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.6.
|
4
|
+
version: 2.6.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -130,7 +130,7 @@ dependencies:
|
|
130
130
|
requirements:
|
131
131
|
- - ! '>='
|
132
132
|
- !ruby/object:Gem::Version
|
133
|
-
version: 0.1.
|
133
|
+
version: 0.1.1
|
134
134
|
type: :development
|
135
135
|
prerelease: false
|
136
136
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -138,7 +138,7 @@ dependencies:
|
|
138
138
|
requirements:
|
139
139
|
- - ! '>='
|
140
140
|
- !ruby/object:Gem::Version
|
141
|
-
version: 0.1.
|
141
|
+
version: 0.1.1
|
142
142
|
- !ruby/object:Gem::Dependency
|
143
143
|
name: actionpack
|
144
144
|
requirement: !ruby/object:Gem::Requirement
|
@@ -524,7 +524,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
524
524
|
version: '0'
|
525
525
|
segments:
|
526
526
|
- 0
|
527
|
-
hash:
|
527
|
+
hash: 3048333379035165207
|
528
528
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
529
529
|
none: false
|
530
530
|
requirements:
|
@@ -533,7 +533,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
533
533
|
version: '0'
|
534
534
|
segments:
|
535
535
|
- 0
|
536
|
-
hash:
|
536
|
+
hash: 3048333379035165207
|
537
537
|
requirements: []
|
538
538
|
rubyforge_project:
|
539
539
|
rubygems_version: 1.8.24
|