fb_graph2 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/fb_graph2/edge/roles.rb +12 -0
- data/spec/spec_helper/mock_graph.rb +6 -7
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 692714c16ce79738b687ad35af6fcbe361e1b6ac
|
4
|
+
data.tar.gz: 211023f816d55f200c04832408985953878b9d89
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: efc45bb21fbcc163d3ce222b7a0887dce3b902151d42fc263e6574738dafe637ebffaa9a49d27a3a83a0b090b2729f86815aa48b89441165d284103d0eaf0b66
|
7
|
+
data.tar.gz: ba8c0dbec4035d65ddbb140a66e88bdadfc76309185fa9d80f348b59aca2b0d2ec420c0f26a1cf806f93adbc46e0fa46a8bba54fec2b5ab1a580f1a757316263
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.3.
|
1
|
+
0.3.2
|
data/lib/fb_graph2/edge/roles.rb
CHANGED
@@ -8,6 +8,18 @@ module FbGraph2
|
|
8
8
|
Struct::Role.new role
|
9
9
|
end
|
10
10
|
end
|
11
|
+
|
12
|
+
def role!(user, params = {})
|
13
|
+
self.post params.merge(
|
14
|
+
user: Util.as_identifier(user)
|
15
|
+
), edge: :roles
|
16
|
+
end
|
17
|
+
|
18
|
+
def unrole!(user, params = {})
|
19
|
+
self.post params.merge(
|
20
|
+
user: Util.as_identifier(user)
|
21
|
+
), edge: :roles
|
22
|
+
end
|
11
23
|
end
|
12
24
|
|
13
25
|
module PageContext
|
@@ -54,13 +54,12 @@ module MockGraph
|
|
54
54
|
authorization: "Bearer #{options[:access_token]}"
|
55
55
|
}
|
56
56
|
end
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
end
|
57
|
+
params = options.try(:[], :params) || {}
|
58
|
+
case method
|
59
|
+
when :post, :put, :delete
|
60
|
+
request[:body] = params
|
61
|
+
else
|
62
|
+
request[:query] = params
|
64
63
|
end
|
65
64
|
request
|
66
65
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fb_graph2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- nov matake
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-11-
|
11
|
+
date: 2014-11-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httpclient
|