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.
@@ -102,7 +102,8 @@ module OpenSocial #:nodoc:
102
102
  # id.
103
103
  def parse_response(response)
104
104
  activities = Collection.new
105
- for entry in response
105
+
106
+ response.each do |entry|
106
107
  activity = Activity.new(entry)
107
108
  activities[activity.id] = activity
108
109
  end
@@ -69,7 +69,8 @@ module OpenSocial #:nodoc:
69
69
  json = send_request(SERVICE, @guid)
70
70
 
71
71
  groups = Collection.new
72
- for entry in json["entry"]
72
+
73
+ json["entry"].each do |entry|
73
74
  group = Group.new(entry)
74
75
  groups[group.id] = group
75
76
  end
@@ -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
- for entry in response
189
+
190
+ response.each do |entry|
190
191
  person = Person.new(entry)
191
192
  people[person.id] = person
192
193
  end
@@ -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
- for entry in data
240
- keyed_by_id.merge!({entry["id"] => entry})
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
@@ -1,3 +1,3 @@
1
1
  module OpenSocial
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
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: 23
4
+ hash: 21
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 0
10
- version: 0.2.0
9
+ - 1
10
+ version: 0.2.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - "Jakub Ku\xC5\xBAma"