rfacebook 0.7.1 → 0.8.0

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.
@@ -0,0 +1,210 @@
1
+ # Copyright (c) 2007, Matt Pizzimenti (www.livelearncode.com)
2
+ # All rights reserved.
3
+ #
4
+ # Redistribution and use in source and binary forms, with or without modification,
5
+ # are permitted provided that the following conditions are met:
6
+ #
7
+ # Redistributions of source code must retain the above copyright notice,
8
+ # this list of conditions and the following disclaimer.
9
+ #
10
+ # Redistributions in binary form must reproduce the above copyright notice,
11
+ # this list of conditions and the following disclaimer in the documentation
12
+ # and/or other materials provided with the distribution.
13
+ #
14
+ # Neither the name of the original author nor the names of contributors
15
+ # may be used to endorse or promote products derived from this software
16
+ # without specific prior written permission.
17
+ #
18
+ # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19
+ # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20
+ # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21
+ # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
22
+ # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23
+ # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
24
+ # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
25
+ # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
26
+ # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27
+ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28
+ #
29
+
30
+ module RFacebook
31
+ module Rails
32
+ DEBUG_PANEL_ERB_TEMPLATE = <<-end_info
33
+
34
+ <style type="text/css">
35
+
36
+ .RFacebook .environment
37
+ {
38
+ padding: 30px;
39
+
40
+ background: #F7F7F7;
41
+ border-bottom: 1px solid #B7B7B7;
42
+ }
43
+
44
+ .RFacebook .environment a
45
+ {
46
+ color: #3F5A95;
47
+ }
48
+
49
+ .RFacebook .environment table
50
+ {
51
+ margin: 0px auto 5px auto;
52
+ width: 100%;
53
+
54
+ border-collapse: collapse;
55
+ }
56
+
57
+ .RFacebook .environment td
58
+ {
59
+ padding: 5px;
60
+ padding-left: 10px;
61
+ border-width: 1px 0px 1px 0px;
62
+
63
+ border-color: #ccc;
64
+ border-style: solid;
65
+ font-size: 0.9em;
66
+ }
67
+
68
+ .RFacebook .environment td.value
69
+ {
70
+ width: 100%;
71
+
72
+ color: #777;
73
+ }
74
+
75
+ .RFacebook .environment td.header
76
+ {
77
+ padding-top: 10px;
78
+ padding-left: 0px;
79
+ border-top-width: 0px;
80
+
81
+ font-weight: bold;
82
+ font-size: 1.3em;
83
+ }
84
+
85
+ .RFacebook .environment h1
86
+ {
87
+ margin: 0px 0px 5px 0px;
88
+ padding: 0px;
89
+
90
+ color: #3F5A95;
91
+ font-size: 1.6em;
92
+ }
93
+
94
+ .RFacebook .environment p
95
+ {
96
+ padding: 5px;
97
+ margin: 0px 0px 20px 0px;
98
+
99
+ color: #777;
100
+ }
101
+
102
+ .RFacebook .error
103
+ {
104
+ color: red;
105
+ margin: 0px;
106
+ padding: 2px;
107
+ color: #FF9A8D;
108
+ background-color: #900;
109
+ }
110
+
111
+ .RFacebook .valid
112
+ {
113
+ margin: 0px;
114
+ padding: 2px;
115
+ color: #B2FE8C;
116
+ background-color: #06B012;
117
+ }
118
+
119
+ .RFacebook table.details
120
+ {
121
+ border-collapse: collapse;
122
+ width: auto;
123
+ }
124
+
125
+ .RFacebook table.details td
126
+ {
127
+ border: none;
128
+ padding: 0px;
129
+ color: #777;
130
+ }
131
+
132
+ .RFacebook table.details td.value
133
+ {
134
+ width: 100%;
135
+ padding-left: 10px;
136
+ color: black;
137
+ }
138
+
139
+ </style>
140
+
141
+ <div class="RFacebook">
142
+
143
+ <div class="environment">
144
+
145
+ <h1>RFacebook <span style="font-weight: normal; color: #777">environment information</span></h1>
146
+ <p>
147
+ This shows you at a glance the information that RFacebook has populated
148
+ for you.
149
+ <br/>
150
+ More information at <a href="http://rfacebook.rubyforge.org">rfacebook.rubyforge.org</a>.
151
+ Please report RFacebook bugs <a href="http://rubyforge.org/tracker/?func=add&group_id=3607&atid=13796">here</a>.
152
+
153
+ </p>
154
+
155
+ <table>
156
+
157
+ <!-- ####################### ActionController ####################### -->
158
+ <tr>
159
+ <td colspan="3" class="header"><%= self.class %></td>
160
+ </tr>
161
+
162
+ <% facebook_status_manager.each_status_check do |statusCheck| %>
163
+ <tr>
164
+ <td class="title"><%= statusCheck.title %></td>
165
+ <td class="rstatus">
166
+ <% if statusCheck.valid? %>
167
+ <span class="valid">OK</span>
168
+ <% else %>
169
+ <span class="error">PROBLEM</span>
170
+ <% end %>
171
+ </td>
172
+ <td class="value">
173
+ <% if statusCheck.message.class == String %>
174
+ <%= statusCheck.message %>
175
+ <% elsif statusCheck.message.class == Hash %>
176
+ <table class="details">
177
+ <% statusCheck.message.each do |k,v| %>
178
+ <tr>
179
+ <td><%= k %></td>
180
+ <td class="value"><%= v %></td>
181
+ </tr>
182
+ <% end %>
183
+ </table>
184
+ <% end %>
185
+ </td>
186
+ </tr>
187
+ <% end %>
188
+
189
+
190
+ </table>
191
+
192
+ </div>
193
+ </div>
194
+
195
+
196
+
197
+
198
+
199
+
200
+
201
+
202
+
203
+
204
+
205
+
206
+
207
+ end_info
208
+
209
+ end
210
+ end
@@ -0,0 +1,64 @@
1
+ # Copyright (c) 2007, Matt Pizzimenti (www.livelearncode.com)
2
+ # All rights reserved.
3
+ #
4
+ # Redistribution and use in source and binary forms, with or without modification,
5
+ # are permitted provided that the following conditions are met:
6
+ #
7
+ # Redistributions of source code must retain the above copyright notice,
8
+ # this list of conditions and the following disclaimer.
9
+ #
10
+ # Redistributions in binary form must reproduce the above copyright notice,
11
+ # this list of conditions and the following disclaimer in the documentation
12
+ # and/or other materials provided with the distribution.
13
+ #
14
+ # Neither the name of the original author nor the names of contributors
15
+ # may be used to endorse or promote products derived from this software
16
+ # without specific prior written permission.
17
+ #
18
+ # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19
+ # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20
+ # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21
+ # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
22
+ # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23
+ # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
24
+ # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
25
+ # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
26
+ # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27
+ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28
+ #
29
+
30
+ module RFacebook
31
+ module Rails
32
+ module ViewExtensions
33
+
34
+ def in_facebook_canvas?
35
+ @controller.in_facebook_canvas?
36
+ end
37
+
38
+ def in_facebook_frame?
39
+ @controller.in_facebook_frame?
40
+ end
41
+
42
+ def fbparams
43
+ @controller.fbparams
44
+ end
45
+
46
+ def fbsession
47
+ @controller.fbsession
48
+ end
49
+
50
+ def image_path(*params)
51
+ path = super(*params)
52
+ if in_facebook_canvas? # TODO: or in_facebook_frame?)
53
+ path = "#{request.protocol}#{request.host_with_port}#{path}"
54
+ end
55
+ return path
56
+ end
57
+
58
+ def rfacebook_debug_panel(options={})
59
+ return @controller.rfacebook_debug_panel(options)
60
+ end
61
+
62
+ end
63
+ end
64
+ end
metadata CHANGED
@@ -1,10 +1,10 @@
1
1
  --- !ruby/object:Gem::Specification
2
- rubygems_version: 0.9.0
2
+ rubygems_version: 0.9.1
3
3
  specification_version: 1
4
4
  name: rfacebook
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.7.1
7
- date: 2007-07-30 00:00:00 -07:00
6
+ version: 0.8.0
7
+ date: 2007-08-05 00:00:00 -07:00
8
8
  summary: A Ruby interface to the Facebook API v1.0+. Supports the new features from F8.
9
9
  require_paths:
10
10
  - lib
@@ -34,6 +34,19 @@ files:
34
34
  - lib/facebook_session.rb
35
35
  - lib/facebook_web_session.rb
36
36
  - lib/facepricot.rb
37
+ - lib/rfacebook_on_rails
38
+ - lib/rfacebook_on_rails/controller_extensions.rb
39
+ - lib/rfacebook_on_rails/model_extensions.rb
40
+ - lib/rfacebook_on_rails/plugin
41
+ - lib/rfacebook_on_rails/status_manager.rb
42
+ - lib/rfacebook_on_rails/templates
43
+ - lib/rfacebook_on_rails/view_extensions.rb
44
+ - lib/rfacebook_on_rails/plugin/init.rb
45
+ - lib/rfacebook_on_rails/plugin/install.rb
46
+ - lib/rfacebook_on_rails/plugin/rake.rb
47
+ - lib/rfacebook_on_rails/plugin/Rakefile.rb
48
+ - lib/rfacebook_on_rails/plugin/uninstall.rb
49
+ - lib/rfacebook_on_rails/templates/debug_panel.rb
37
50
  - README
38
51
  test_files: []
39
52