fb_graph2 0.0.9 → 0.0.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rspec +2 -0
- data/VERSION +1 -1
- data/lib/fb_graph2/post.rb +18 -3
- data/lib/fb_graph2/struct/privacy.rb +9 -0
- data/lib/fb_graph2/struct/property.rb +9 -0
- data/lib/fb_graph2/tagged_profile.rb +26 -0
- metadata +29 -25
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1af0e224676e1044415d1c7ab404ac7a3075d928
|
4
|
+
data.tar.gz: a36ce895a0505932928620bb85c850af2a9efa87
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1b15b62cc89590170ceaf6708d3482f1b3590bbdf86af49ae665f0568c3700c5fccfa7e77950dbf171bf517b3364c2854faac63aefdd84e96cb339c79a2db038
|
7
|
+
data.tar.gz: 6eea1e64881125e86432e817ca957e4010150823964deb31e2892a7c6fa93df2793192154083c617fd59454e95e218be29b336835dde840d159983eca6461f12
|
data/.rspec
ADDED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.10
|
data/lib/fb_graph2/post.rb
CHANGED
@@ -7,7 +7,7 @@ module FbGraph2
|
|
7
7
|
register_attributes(
|
8
8
|
raw: [
|
9
9
|
:caption, :description, :icon, :is_hidden, :link, :message, :name, :object_id, :picture,
|
10
|
-
:source, :story
|
10
|
+
:source, :status_type, :story, :type
|
11
11
|
],
|
12
12
|
time: [:created_time, :updated_time],
|
13
13
|
app: [:application],
|
@@ -16,13 +16,28 @@ module FbGraph2
|
|
16
16
|
profiles: [:to, :with_tags],
|
17
17
|
actions: [:actions],
|
18
18
|
custom: [
|
19
|
-
:message_tags, :privacy, :properties
|
19
|
+
:message_tags, :privacy, :properties
|
20
20
|
]
|
21
21
|
)
|
22
22
|
|
23
23
|
def initialize(id, attributes = {})
|
24
24
|
super
|
25
|
-
|
25
|
+
if attributes.include? :message_tags
|
26
|
+
self.message_tags = attributes[:message_tags].inject({}) do |message_tags, (key, values)|
|
27
|
+
_message_tags_ = values.collect do |value|
|
28
|
+
TaggedProfile.new value[:id], value
|
29
|
+
end
|
30
|
+
message_tags.merge! key => _message_tags_
|
31
|
+
end
|
32
|
+
end
|
33
|
+
if attributes.include? :privacy
|
34
|
+
self.privacy = Struct::Privacy.new attributes[:privacy]
|
35
|
+
end
|
36
|
+
if attributes.include? :properties
|
37
|
+
self.properties = attributes[:properties].collect do |property|
|
38
|
+
Struct::Property.new property
|
39
|
+
end
|
40
|
+
end
|
26
41
|
end
|
27
42
|
end
|
28
43
|
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
module FbGraph2
|
2
|
+
class TaggedProfile < Node
|
3
|
+
register_attributes(
|
4
|
+
raw: [:id, :name, :type, :offset, :length],
|
5
|
+
custom: [:object]
|
6
|
+
)
|
7
|
+
|
8
|
+
def initialize(id, attributes = {})
|
9
|
+
super
|
10
|
+
self.object = klass.new self.id
|
11
|
+
end
|
12
|
+
|
13
|
+
def klass
|
14
|
+
klass = case self.type
|
15
|
+
when 'user'
|
16
|
+
User
|
17
|
+
when 'page'
|
18
|
+
Page
|
19
|
+
when 'group'
|
20
|
+
Group
|
21
|
+
when 'event'
|
22
|
+
Event
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
metadata
CHANGED
@@ -1,139 +1,139 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fb_graph2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.10
|
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-06-
|
11
|
+
date: 2014-06-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httpclient
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '2.3'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '2.3'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rack-oauth2
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '1.0'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '1.0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: multi_json
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '0'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: activesupport
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '4.0'
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- -
|
66
|
+
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '4.0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: rake
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- -
|
73
|
+
- - ">="
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: '0'
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- -
|
80
|
+
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: simplecov
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- -
|
87
|
+
- - ">="
|
88
88
|
- !ruby/object:Gem::Version
|
89
89
|
version: '0'
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- -
|
94
|
+
- - ">="
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: webmock
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
|
-
- -
|
101
|
+
- - ">="
|
102
102
|
- !ruby/object:Gem::Version
|
103
103
|
version: '0'
|
104
104
|
type: :development
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
|
-
- -
|
108
|
+
- - ">="
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '0'
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: rspec
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
|
-
- -
|
115
|
+
- - ">="
|
116
116
|
- !ruby/object:Gem::Version
|
117
117
|
version: '0'
|
118
118
|
type: :development
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
|
-
- -
|
122
|
+
- - ">="
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: '0'
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
126
|
name: rspec-its
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|
128
128
|
requirements:
|
129
|
-
- -
|
129
|
+
- - ">="
|
130
130
|
- !ruby/object:Gem::Version
|
131
131
|
version: '0'
|
132
132
|
type: :development
|
133
133
|
prerelease: false
|
134
134
|
version_requirements: !ruby/object:Gem::Requirement
|
135
135
|
requirements:
|
136
|
-
- -
|
136
|
+
- - ">="
|
137
137
|
- !ruby/object:Gem::Version
|
138
138
|
version: '0'
|
139
139
|
description: Facebook Graph API v2.0 Wrapper in Ruby
|
@@ -143,8 +143,9 @@ executables: []
|
|
143
143
|
extensions: []
|
144
144
|
extra_rdoc_files: []
|
145
145
|
files:
|
146
|
-
- .gitignore
|
147
|
-
- .
|
146
|
+
- ".gitignore"
|
147
|
+
- ".rspec"
|
148
|
+
- ".travis.yml"
|
148
149
|
- Gemfile
|
149
150
|
- LICENSE.txt
|
150
151
|
- README.md
|
@@ -265,6 +266,8 @@ files:
|
|
265
266
|
- lib/fb_graph2/struct/permission.rb
|
266
267
|
- lib/fb_graph2/struct/picture.rb
|
267
268
|
- lib/fb_graph2/struct/poke.rb
|
269
|
+
- lib/fb_graph2/struct/privacy.rb
|
270
|
+
- lib/fb_graph2/struct/property.rb
|
268
271
|
- lib/fb_graph2/struct/restaurant_services.rb
|
269
272
|
- lib/fb_graph2/struct/restaurant_specialties.rb
|
270
273
|
- lib/fb_graph2/struct/role.rb
|
@@ -272,6 +275,7 @@ files:
|
|
272
275
|
- lib/fb_graph2/struct/static_resource.rb
|
273
276
|
- lib/fb_graph2/struct/subscription.rb
|
274
277
|
- lib/fb_graph2/struct/work.rb
|
278
|
+
- lib/fb_graph2/tagged_profile.rb
|
275
279
|
- lib/fb_graph2/thread.rb
|
276
280
|
- lib/fb_graph2/translation.rb
|
277
281
|
- lib/fb_graph2/user.rb
|
@@ -379,17 +383,17 @@ require_paths:
|
|
379
383
|
- lib
|
380
384
|
required_ruby_version: !ruby/object:Gem::Requirement
|
381
385
|
requirements:
|
382
|
-
- -
|
386
|
+
- - ">="
|
383
387
|
- !ruby/object:Gem::Version
|
384
388
|
version: '0'
|
385
389
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
386
390
|
requirements:
|
387
|
-
- -
|
391
|
+
- - ">="
|
388
392
|
- !ruby/object:Gem::Version
|
389
393
|
version: '0'
|
390
394
|
requirements: []
|
391
395
|
rubyforge_project:
|
392
|
-
rubygems_version: 2.
|
396
|
+
rubygems_version: 2.2.2
|
393
397
|
signing_key:
|
394
398
|
specification_version: 4
|
395
399
|
summary: Facebook Graph API v2.0 Wrapper in Ruby
|