qoobaa-opensocial 0.2.0 → 0.2.1
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/lib/opensocial/activity.rb +2 -1
- data/lib/opensocial/group.rb +2 -1
- data/lib/opensocial/person.rb +2 -1
- data/lib/opensocial/request.rb +3 -3
- data/lib/opensocial/version.rb +1 -1
- data/lib/opensocial.rb +2 -2
- metadata +3 -3
data/lib/opensocial/activity.rb
CHANGED
data/lib/opensocial/group.rb
CHANGED
data/lib/opensocial/person.rb
CHANGED
@@ -186,7 +186,8 @@ module OpenSocial #:nodoc:
|
|
186
186
|
# Converts the JSON response into a Collection of people, indexed by id.
|
187
187
|
def parse_response(response)
|
188
188
|
people = Collection.new
|
189
|
-
|
189
|
+
|
190
|
+
response.each do |entry|
|
190
191
|
person = Person.new(entry)
|
191
192
|
people[person.id] = person
|
192
193
|
end
|
data/lib/opensocial/request.rb
CHANGED
@@ -224,6 +224,7 @@ module OpenSocial #:nodoc:
|
|
224
224
|
keyed_by_id = key_by_id(parsed)
|
225
225
|
|
226
226
|
native_objects = {}
|
227
|
+
|
227
228
|
@requests.each_pair do |key, request|
|
228
229
|
native_object = request.parse_rpc_response(keyed_by_id[key.to_s])
|
229
230
|
native_objects.merge!({key => native_object})
|
@@ -236,9 +237,8 @@ module OpenSocial #:nodoc:
|
|
236
237
|
# by its 'id' attribute.
|
237
238
|
def key_by_id(data)
|
238
239
|
keyed_by_id = {}
|
239
|
-
|
240
|
-
|
241
|
-
end
|
240
|
+
|
241
|
+
data.each { |entry| keyed_by_id.merge!({entry["id"] => entry}) }
|
242
242
|
|
243
243
|
return keyed_by_id
|
244
244
|
end
|
data/lib/opensocial/version.rb
CHANGED
data/lib/opensocial.rb
CHANGED
@@ -14,6 +14,7 @@
|
|
14
14
|
|
15
15
|
require "active_support"
|
16
16
|
require "active_support/core_ext/string/inflections"
|
17
|
+
|
17
18
|
require "oauth"
|
18
19
|
require "oauth/consumer"
|
19
20
|
|
@@ -22,11 +23,10 @@ require "uri"
|
|
22
23
|
|
23
24
|
require "opensocial/base"
|
24
25
|
require "opensocial/request"
|
26
|
+
|
25
27
|
require "opensocial/activity"
|
26
28
|
require "opensocial/appdata"
|
27
29
|
require "opensocial/connection"
|
28
30
|
require "opensocial/group"
|
29
31
|
require "opensocial/person"
|
30
32
|
require "opensocial/version"
|
31
|
-
require "opensocial/string/merb_string"
|
32
|
-
require "opensocial/string/os_string"
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: qoobaa-opensocial
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 21
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 0.2.
|
9
|
+
- 1
|
10
|
+
version: 0.2.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- "Jakub Ku\xC5\xBAma"
|