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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: cb23d11f93481b305d1edc1433580a7a62e2c344
4
- data.tar.gz: 79b9f990bbb18327c530f5af0d9c6410614c3b69
3
+ metadata.gz: 692714c16ce79738b687ad35af6fcbe361e1b6ac
4
+ data.tar.gz: 211023f816d55f200c04832408985953878b9d89
5
5
  SHA512:
6
- metadata.gz: f49d9d739f9861eacec0297a3e6336d58d81d5f5eb072cb941556863e94d5de087f65cf5a1de7ef2fbf10d2f604af0f648ab667e0b665b5aa1c568412d0f291b
7
- data.tar.gz: a6a2092207207a04d5761d3713376b088cc7a18d2583a67541b5efa054d35d248b30ab32a47c0b7a5c04f615a8706ffd4d22644de709bd52ec31720ed43df0f7
6
+ metadata.gz: efc45bb21fbcc163d3ce222b7a0887dce3b902151d42fc263e6574738dafe637ebffaa9a49d27a3a83a0b090b2729f86815aa48b89441165d284103d0eaf0b66
7
+ data.tar.gz: ba8c0dbec4035d65ddbb140a66e88bdadfc76309185fa9d80f348b59aca2b0d2ec420c0f26a1cf806f93adbc46e0fa46a8bba54fec2b5ab1a580f1a757316263
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.1
1
+ 0.3.2
@@ -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
- if options[:params]
58
- case method
59
- when :post, :put, :delete
60
- request[:body] = options[:params]
61
- else
62
- request[:query] = options[:params]
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.1
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-01 00:00:00.000000000 Z
11
+ date: 2014-11-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httpclient