doesfacebook 0.6.0 → 1.0.0.pre1
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.rdoc +49 -0
- data/Gemfile +21 -0
- data/Gemfile.lock +105 -0
- data/LICENSE +1 -1
- data/README.rdoc +139 -69
- data/ROADMAP.rdoc +55 -0
- data/Rakefile +64 -0
- data/VERSION +1 -0
- data/doesfacebook.gemspec +71 -0
- data/lib/doesfacebook/application.rb +46 -0
- data/lib/doesfacebook/configuration.rb +58 -0
- data/lib/doesfacebook/controller_extensions.rb +98 -0
- data/lib/doesfacebook/error.rb +37 -0
- data/lib/doesfacebook.rb +31 -50
- data/lib/generators/doesfacebook/config/config_generator.rb +3 -3
- data/lib/generators/doesfacebook/config/templates/doesfacebook.rb +33 -0
- data/lib/helpers/does_facebook_helper.rb +70 -0
- data/public/channel.html +2 -0
- metadata +99 -26
- data/app/helpers/does_facebook_helper.rb +0 -73
- data/lib/doesfacebook/config.rb +0 -49
- data/lib/doesfacebook/controls.rb +0 -47
- data/lib/doesfacebook/filters.rb +0 -71
- data/lib/generators/doesfacebook/config/templates/doesfacebook.yml +0 -32
data/CHANGELOG.rdoc
ADDED
@@ -0,0 +1,49 @@
|
|
1
|
+
= DoesFacebook Change Log
|
2
|
+
|
3
|
+
This document details notable changes between versions in the gem.
|
4
|
+
|
5
|
+
=== v1.0.0 (this version)
|
6
|
+
|
7
|
+
|
8
|
+
=== v0.6.0 / Oct 11 2012
|
9
|
+
|
10
|
+
* Add proper ActiveSupport deprecation warnings for deprecated methods and configuration
|
11
|
+
|
12
|
+
=== v0.5.5 / May 18 2012
|
13
|
+
* Add sessionify_signed_parameter filter for signed_request management on non-POSTed, subsequent requests within iframes
|
14
|
+
* Add opts parameter to does_facebook invocation with support for toggling :session behavior
|
15
|
+
* Documentation updates for session switch on does_facebook invocation
|
16
|
+
|
17
|
+
=== v0.5.4 / Apr 30 2012
|
18
|
+
* Middleware fix for first-strike page loads
|
19
|
+
|
20
|
+
=== v0.5.3 / Apr 23 2012
|
21
|
+
* Middleware POST rewrite now performed on requests from Facebook only
|
22
|
+
|
23
|
+
=== v0.5.2 / Apr 04 2012
|
24
|
+
* Additional fix for SSL/HTTPS configuration loader
|
25
|
+
|
26
|
+
=== v0.5.1 / Apr 04 2012
|
27
|
+
* Fix for SSL/HTTPS configuration loader logic
|
28
|
+
|
29
|
+
=== v0.5.0 / Mar 28 2012
|
30
|
+
* Configuration loader completely rewritten, is now request URL based
|
31
|
+
* Configuration logging messages streamlined
|
32
|
+
|
33
|
+
=== v0.5.0.pre / Winter 2012 (various "pre" versions)
|
34
|
+
* "namespace" configuration key adopted replacing "canvas_name"
|
35
|
+
* "canvas_name" configuration key deprecated (still supported, but triggers deprecation logger message)
|
36
|
+
* app_namespace helper replaces app_canvas_name helper
|
37
|
+
* url_for_canvas, link_to_canvas updated to use namespace
|
38
|
+
* Documentation updates for changes to configuration
|
39
|
+
* fb_init() helper added for FBJS invocation with app properties
|
40
|
+
* AJAX, xhr requests are passed through Middleware POST rewrite
|
41
|
+
* Remove api_key helpers, support (field long deprecated by Facebook)
|
42
|
+
* Remove api_key configuration key from doesfacebook.yml
|
43
|
+
* Add Rack Middleware rewriting POST requests to appropriate methods when signed_request is present
|
44
|
+
|
45
|
+
=== v0.4.3 / Sep 18 2011
|
46
|
+
* Add support for SSL/HTTPS configured apps with "ssl_callback_url" configuration key
|
47
|
+
* Update to url_for_canvas, link_to_canvas, redirect helpers to support SSL/HTTPS configured applications
|
48
|
+
|
49
|
+
|
data/Gemfile
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
# DOES FACEBOOK
|
2
|
+
# Gemfile
|
3
|
+
|
4
|
+
source "http://rubygems.org"
|
5
|
+
|
6
|
+
# Runtime dependencies:
|
7
|
+
|
8
|
+
# This gem adds functionality to Rails applications:
|
9
|
+
gem "rails", ">= 3.2.0"
|
10
|
+
|
11
|
+
|
12
|
+
# Development dependencies:
|
13
|
+
group :development do
|
14
|
+
gem "bundler", ">= 1.1"
|
15
|
+
gem "jeweler", "~> 1.8.4"
|
16
|
+
gem "rdoc", "~> 3.12"
|
17
|
+
gem "rspec", ">= 2.11.0"
|
18
|
+
# gem "rspec-rails", ">= 2.11.0"
|
19
|
+
# gem "capybara", "~> 1.1.2"
|
20
|
+
# gem "combustion", "~> 0.3.2"
|
21
|
+
end
|
data/Gemfile.lock
ADDED
@@ -0,0 +1,105 @@
|
|
1
|
+
GEM
|
2
|
+
remote: http://rubygems.org/
|
3
|
+
specs:
|
4
|
+
actionmailer (3.2.13)
|
5
|
+
actionpack (= 3.2.13)
|
6
|
+
mail (~> 2.5.3)
|
7
|
+
actionpack (3.2.13)
|
8
|
+
activemodel (= 3.2.13)
|
9
|
+
activesupport (= 3.2.13)
|
10
|
+
builder (~> 3.0.0)
|
11
|
+
erubis (~> 2.7.0)
|
12
|
+
journey (~> 1.0.4)
|
13
|
+
rack (~> 1.4.5)
|
14
|
+
rack-cache (~> 1.2)
|
15
|
+
rack-test (~> 0.6.1)
|
16
|
+
sprockets (~> 2.2.1)
|
17
|
+
activemodel (3.2.13)
|
18
|
+
activesupport (= 3.2.13)
|
19
|
+
builder (~> 3.0.0)
|
20
|
+
activerecord (3.2.13)
|
21
|
+
activemodel (= 3.2.13)
|
22
|
+
activesupport (= 3.2.13)
|
23
|
+
arel (~> 3.0.2)
|
24
|
+
tzinfo (~> 0.3.29)
|
25
|
+
activeresource (3.2.13)
|
26
|
+
activemodel (= 3.2.13)
|
27
|
+
activesupport (= 3.2.13)
|
28
|
+
activesupport (3.2.13)
|
29
|
+
i18n (= 0.6.1)
|
30
|
+
multi_json (~> 1.0)
|
31
|
+
arel (3.0.2)
|
32
|
+
builder (3.0.4)
|
33
|
+
diff-lcs (1.1.3)
|
34
|
+
erubis (2.7.0)
|
35
|
+
git (1.2.5)
|
36
|
+
hike (1.2.2)
|
37
|
+
i18n (0.6.1)
|
38
|
+
jeweler (1.8.4)
|
39
|
+
bundler (~> 1.0)
|
40
|
+
git (>= 1.2.5)
|
41
|
+
rake
|
42
|
+
rdoc
|
43
|
+
journey (1.0.4)
|
44
|
+
json (1.7.5)
|
45
|
+
mail (2.5.3)
|
46
|
+
i18n (>= 0.4.0)
|
47
|
+
mime-types (~> 1.16)
|
48
|
+
treetop (~> 1.4.8)
|
49
|
+
mime-types (1.23)
|
50
|
+
multi_json (1.7.2)
|
51
|
+
polyglot (0.3.3)
|
52
|
+
rack (1.4.5)
|
53
|
+
rack-cache (1.2)
|
54
|
+
rack (>= 0.4)
|
55
|
+
rack-ssl (1.3.3)
|
56
|
+
rack
|
57
|
+
rack-test (0.6.2)
|
58
|
+
rack (>= 1.0)
|
59
|
+
rails (3.2.13)
|
60
|
+
actionmailer (= 3.2.13)
|
61
|
+
actionpack (= 3.2.13)
|
62
|
+
activerecord (= 3.2.13)
|
63
|
+
activeresource (= 3.2.13)
|
64
|
+
activesupport (= 3.2.13)
|
65
|
+
bundler (~> 1.0)
|
66
|
+
railties (= 3.2.13)
|
67
|
+
railties (3.2.13)
|
68
|
+
actionpack (= 3.2.13)
|
69
|
+
activesupport (= 3.2.13)
|
70
|
+
rack-ssl (~> 1.3.2)
|
71
|
+
rake (>= 0.8.7)
|
72
|
+
rdoc (~> 3.4)
|
73
|
+
thor (>= 0.14.6, < 2.0)
|
74
|
+
rake (10.0.4)
|
75
|
+
rdoc (3.12)
|
76
|
+
json (~> 1.4)
|
77
|
+
rspec (2.11.0)
|
78
|
+
rspec-core (~> 2.11.0)
|
79
|
+
rspec-expectations (~> 2.11.0)
|
80
|
+
rspec-mocks (~> 2.11.0)
|
81
|
+
rspec-core (2.11.1)
|
82
|
+
rspec-expectations (2.11.3)
|
83
|
+
diff-lcs (~> 1.1.3)
|
84
|
+
rspec-mocks (2.11.2)
|
85
|
+
sprockets (2.2.2)
|
86
|
+
hike (~> 1.2)
|
87
|
+
multi_json (~> 1.0)
|
88
|
+
rack (~> 1.0)
|
89
|
+
tilt (~> 1.1, != 1.3.0)
|
90
|
+
thor (0.18.1)
|
91
|
+
tilt (1.3.7)
|
92
|
+
treetop (1.4.12)
|
93
|
+
polyglot
|
94
|
+
polyglot (>= 0.3.1)
|
95
|
+
tzinfo (0.3.37)
|
96
|
+
|
97
|
+
PLATFORMS
|
98
|
+
ruby
|
99
|
+
|
100
|
+
DEPENDENCIES
|
101
|
+
bundler (>= 1.1)
|
102
|
+
jeweler (~> 1.8.4)
|
103
|
+
rails (>= 3.2.0)
|
104
|
+
rdoc (~> 3.12)
|
105
|
+
rspec (>= 2.11.0)
|
data/LICENSE
CHANGED
data/README.rdoc
CHANGED
@@ -1,116 +1,186 @@
|
|
1
1
|
= DoesFacebook
|
2
2
|
|
3
|
-
|
4
|
-
|
3
|
+
Lightweight gem enables your Rails application to quickly and simply integrate with Facebook,
|
4
|
+
while also providing configuration and convenience methods for Facebook app developers.
|
5
5
|
|
6
|
-
|
7
|
-
this gem's brother from the same mother, DoesOpenGraph[https://github.com/awexome/doesopengraph].
|
6
|
+
== Install
|
8
7
|
|
8
|
+
DoesFacebook is designed to work with Rails applications. To get started, add +doesfacebook+
|
9
|
+
to your +Gemfile+:
|
9
10
|
|
10
|
-
|
11
|
+
gem "doesfacebook"
|
11
12
|
|
12
|
-
|
13
|
+
DoesFacebook is built against Rails versions 3.2 and higher, which it requires at runtime. In
|
14
|
+
development, the additional gem requirements include bundler, jeweler, and rspec.
|
13
15
|
|
14
|
-
|
15
|
-
|
16
|
-
If you plan on using DoesFacebook in a project with a Gemfile:
|
16
|
+
== Configure
|
17
17
|
|
18
|
-
|
19
|
-
|
20
|
-
|
18
|
+
To work with the Facebook API and handle Canvas application requests, you must specify
|
19
|
+
configuration details for the Facebook applications that your Rails application will support
|
20
|
+
in an initializer file. This file allows you to use a simple DSL to define each application.
|
21
21
|
|
22
|
-
|
22
|
+
To get started, you can generate a boilerplate initializer in your directory by running the
|
23
|
+
included generator:
|
23
24
|
|
25
|
+
rails generate does_facebook:config
|
24
26
|
|
25
|
-
|
27
|
+
This generates a file +doesfacebook.rb+ in your +config/initializers+ directory containing a
|
28
|
+
sample app definition and a commented section containing optional selector behavior.
|
26
29
|
|
27
|
-
|
28
|
-
within the "doesfacebook.yml" file under config/
|
30
|
+
=== Facebook Applications
|
29
31
|
|
30
|
-
|
32
|
+
DoesFacebook supports any number of Facebook applications within a single Rails application.
|
33
|
+
Facebook applications are created and defined within the
|
34
|
+
{Facebook Developers Dashboard}[https://developers.facebook.com/].
|
35
|
+
|
36
|
+
You can customize the configuration for any number of supported applications in the initializer
|
37
|
+
file. A typical case is to have a Facebook application for each environment in which your Rails
|
38
|
+
application will run (development, staging, production, etc.), but you are not tied to this
|
39
|
+
convention and can define any number of Facebook applications your Rails application will support.
|
40
|
+
|
41
|
+
A sample Facebook application definition:
|
42
|
+
|
43
|
+
# Support a Facebook application with my Rails app:
|
44
|
+
config.add_application(
|
45
|
+
id: 123456789012345, # <= "App ID" in FB dashboard
|
46
|
+
secret: "abcdefghijklmnopqrstuvwxyzABCDEF" # <= "App Secret" in FB dashboard
|
47
|
+
namespace: "your_app_namespace", # <= "Namespace" in FB dashboard
|
48
|
+
canvas_url: "http://your.dev.server.com/and/path", # <= Under "App on Facebook"
|
49
|
+
secure_canvas_url: "https://secure.dev.server" # <= Under "App on Facebook"
|
50
|
+
)
|
51
|
+
|
52
|
+
The example above shows a declaration with the required keys defined. App ID, Secret, Namespace,
|
53
|
+
and the callback URLs are used to handle incoming requests from Facebook, parse and validate
|
54
|
+
POST parameters from Facebook, and more.
|
55
|
+
|
56
|
+
Add additional applications by adding subsequent +config.add_application+ calls to your
|
57
|
+
initializer.
|
58
|
+
|
59
|
+
You can define, for your reference and remote configuration purposes, any configuration key for
|
60
|
+
your application specified in the documentation on developers.facebook.com.
|
31
61
|
|
32
|
-
rails generate does_facebook:config
|
33
|
-
|
34
|
-
The appropriate application configuration will be loaded for each request based on the callback
|
35
|
-
path of your application. The host of each incoming request will be compared against the callback_url
|
36
|
-
or ssl_callback_url fields of your app. A sample configuration looks like this:
|
37
62
|
|
38
|
-
|
39
|
-
app_id: 1234567890
|
40
|
-
secret_key: a1b2c3d4e5f6g7h8i9j0k1l
|
41
|
-
namespace: my_sweet_canvas_name
|
42
|
-
callback_url: http://your.server.com/and/path
|
43
|
-
ssl_callback_url: https://your.secure.server.com/and/path
|
63
|
+
=== Matching Apps with Requests
|
44
64
|
|
45
|
-
|
46
|
-
|
65
|
+
By default, the +canvas_url+ and +secure_canvas_url+ keys of your configured applications will be
|
66
|
+
compared against incoming requests to match each request with a single Facebook application.
|
47
67
|
|
48
|
-
|
49
|
-
|
50
|
-
|
68
|
+
For example, if a request comes from the Facebook canvas to "http://dev1.com/abe" and strikes your
|
69
|
+
application, DoesFacebook will match this request with the Facebook application containing a +canvas_url+
|
70
|
+
that is a part of the request URL "http://dev1.com/abe". If the request comes in over SSL/HTTPS,
|
71
|
+
DoesFacebook will compare against the +secure_canvas_url+ key of your applications.
|
51
72
|
|
52
|
-
|
73
|
+
As a +Proc+, this default selection method is defined like so:
|
53
74
|
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
75
|
+
app_selector = Proc.new() do |request, apps|
|
76
|
+
apps.find do |a|
|
77
|
+
callback_path = request.ssl? && a.supports_ssl? ? a.secure_canvas_url : a.canvas_url
|
78
|
+
request.url.match(/^#{callback_path}.*/)
|
79
|
+
end
|
80
|
+
end
|
59
81
|
|
60
|
-
|
61
|
-
|
62
|
-
|
82
|
+
You can, however, override this selector logic. In the +configure+ block within your initializer
|
83
|
+
file, you can make a call to the +app_selector+ method to override this logic with a custom +Proc+
|
84
|
+
operating on the request and list of defined applications. Here's an example call:
|
85
|
+
|
86
|
+
# Select the active Facebook application based on subdomain:
|
87
|
+
config.app_selector = Proc.new() do |request, apps|
|
88
|
+
apps.find do |a|
|
89
|
+
request.domains.last.match(/_dev$/) ? a.namespace.match(/_dev$/) : a.namespace.match(/_pro$/)
|
90
|
+
end
|
91
|
+
end
|
92
|
+
|
93
|
+
You can change this, too, to seek in your database for an app definition, or elsewhere. You are not
|
94
|
+
limited to solely the list of defined applications.
|
63
95
|
|
64
96
|
|
65
97
|
== Usage
|
66
98
|
|
67
|
-
To
|
99
|
+
To use DoesFacebook in a given controller in your application, you simply add the following
|
100
|
+
invocation to your controller:
|
68
101
|
|
69
102
|
does_facebook
|
70
103
|
|
71
|
-
Now, with each incoming request, DoesFacebook will
|
72
|
-
|
104
|
+
Now, with each incoming request to this controller, DoesFacebook will add the following
|
105
|
+
functionality:
|
106
|
+
|
107
|
+
* Convert POST requests from (apps.)facebook.com into GET requests to preserve RESTfulness in your app
|
108
|
+
* Select the proper Facebook application from your configuration
|
109
|
+
* Validate the +signed_request+ parameter Facebook sends to your application to ensure the request is from Facebook
|
110
|
+
* Parse the contents of the +signed_request+ (user, brand page, user auth token, etc.) and make them available to your controller as +fb_params+
|
111
|
+
* Provide controller extensions which give you access to Facebook shortcuts in your controller
|
112
|
+
* Include helpers in your views that allow you quick access to configuration
|
113
|
+
|
114
|
+
=== Controller Extensions
|
115
|
+
|
116
|
+
Within your controller, you can now access +fb_app+ and +fb_params+ to view the configuration of the
|
117
|
+
currently active application and the parameters passed by Facebook as part of the +signed_request+. These
|
118
|
+
are available in your regular controller actions and before filters.
|
119
|
+
|
120
|
+
Also, you will gain convenience methods +url_for_canvas+ and +redirect_to_canvas+, which behave just like
|
121
|
+
their non-canvas Rails equivalents, but ensure that the URL given or redirection provided includes the
|
122
|
+
properly-formatted "http(s)://apps.facebook.com/namespace" convention and take place in the top browser frame.
|
123
|
+
These are useful for any end-user activity that requires typical redirects or URL generation.
|
124
|
+
|
125
|
+
=== View Helpers
|
126
|
+
|
127
|
+
Within your views, you will now have access to a wealth of helpers that provide shortcuts to configuration
|
128
|
+
and other Facebook features:
|
129
|
+
|
130
|
+
* +fb_app+ - Full configuration of the active Facebook application in use
|
131
|
+
* +app_id+ - The active application's "App ID", required by some FB JavaScript methods
|
132
|
+
* +app_namespace+ - The active application's "namespace" configuration value.
|
133
|
+
* +app_canvas_url+ - The full URL to the active application's canvas (e.g., http://apps.facebook.com/myapp)
|
134
|
+
|
135
|
+
You also receive a few beneficial link methods:
|
73
136
|
|
74
|
-
|
75
|
-
|
76
|
-
Facebook page, and more.
|
137
|
+
* +url_for_canvas+ - Like the standard +url_for+, but ensures the endpoint is in the Facebook canvas
|
138
|
+
* +link_to_canvas+ - Use as you would the regular +link_to+ helper; generates links to the canvas and properly targets the link to "_top" frame to keep app within canvas and not break into your iframe
|
77
139
|
|
78
|
-
|
79
|
-
|
80
|
-
your internal iframe clicks, perhaps), will used this signed_request. This allows you to build a canvas
|
81
|
-
or page tab application like any other web application and not worry about passing around the signed_request
|
82
|
-
parameter yourself.
|
140
|
+
Quick Facebook helpers for representing users and bootstrapping your application's JS SDK implementation
|
141
|
+
are also provided:
|
83
142
|
|
84
|
-
|
143
|
+
* +profile_pic+ - Builds out an image tag containing the profile picture of the specified user. Pass +type+ and basic +image_tag+ options along in the +opts+ hash to customize.
|
144
|
+
* +fb_init+ - Bootstrap an FB JS SDK implementation with this call, which will automatically inject the JS SDK with proper values for +appId+ as well as the proper browser-compatibility +channelUrl+ file.
|
85
145
|
|
86
|
-
|
87
|
-
will now have access to the following niceties:
|
146
|
+
Display a profile photo of a user with Facebook ID 1234567890 in a view with some view customizations:
|
88
147
|
|
89
|
-
|
90
|
-
* @fbparams: This hash will be set with all keys and values Facebook provided to you for this request (things like user id, page id, logged in status, region, locale, etc.)
|
148
|
+
<%= profile_pic 1234567890, :type=>"small", :style=>"border: 2px solid blue;" %>
|
91
149
|
|
92
|
-
|
93
|
-
against the Facebook platform easier:
|
150
|
+
Complete a basic invocation of +fb_init+ from your layout:
|
94
151
|
|
95
|
-
|
96
|
-
* app_callback_url: The current application's callback URL, parsed from doesfacebook.yml
|
97
|
-
* app_namespace: The current application's canvas shortname, parsed from doesfacebook.yml (aliased as "app_canvas_name" for backwards compatibility)
|
98
|
-
* app_canvas_url: The full URL to the application canvas (e.g., http://apps.facebook.com/myapp)
|
99
|
-
* url_for_canvas(url_opts={}): Like the standard url_for, but ensures the endpoint is in the Facebook canvas
|
100
|
-
* link_to_canvas(text, url_opts={}, html_opts={}): Use as you would the regular link_to helper; generates links to the canvas and properly targets the link to "_top" frame to keep app within canvas and not break into your iframe
|
152
|
+
<%= fb_init() %>
|
101
153
|
|
102
|
-
|
154
|
+
And you will, in effect, be generating this properly-formed JS SDK boot in your layout:
|
103
155
|
|
156
|
+
<!-- Facebook JS SDK -->
|
157
|
+
<div id="fb-root"></div>
|
158
|
+
<script>
|
159
|
+
window.fbAsyncInit = function() {
|
160
|
+
FB.init({"appId":123456789012345,"channelUrl":"/channel.html","status":true,"cookie":true,"xfbml":false});
|
161
|
+
};
|
162
|
+
(function(d){
|
163
|
+
var js, id = 'facebook-jssdk', ref = d.getElementsByTagName('script')[0];
|
164
|
+
if (d.getElementById(id)) {return;}
|
165
|
+
js = d.createElement('script'); js.id = id; js.async = true;
|
166
|
+
js.src = "//connect.facebook.net/en_US/all.js";
|
167
|
+
ref.parentNode.insertBefore(js, ref);
|
168
|
+
}(document));
|
169
|
+
</script>
|
104
170
|
|
105
|
-
|
171
|
+
You can override any of the standard options to +FB.init+ by passing values for the keys you wish to change
|
172
|
+
in the +opts+ hash to +fb_init+.
|
106
173
|
|
174
|
+
If you pass a block to +fb_init+, you can include additional JavaScript within the +window.fbAsyncInit+ function.
|
175
|
+
This can be useful to attach Facebook listeners or handlers to events such as +edge.create+ or similar. You can
|
176
|
+
learn the nitty-gritty details of JS SDK initialization at https://developers.facebook.com/docs/reference/javascript/
|
107
177
|
|
108
178
|
|
109
179
|
|
110
180
|
|
111
181
|
== Copyright
|
112
182
|
|
113
|
-
Copyright 2011-12 Awexome Labs, LLC
|
183
|
+
Copyright 2011-12 Awexome Labs, LLC
|
114
184
|
http://awexomelabs.com
|
115
185
|
http://facebook.com/AwexomeLabs
|
116
186
|
http://twitter.com/awexomelabs
|
data/ROADMAP.rdoc
ADDED
@@ -0,0 +1,55 @@
|
|
1
|
+
= DoesFacebook Road Map
|
2
|
+
|
3
|
+
The previous trunk of DoesFacebook (v0.*) has been closed to make way for
|
4
|
+
cleaner implementation and new features in the upcoming v1.* branch. Within
|
5
|
+
code, these tracks are represented by the
|
6
|
+
{"v0" (original) branch}[https://github.com/awexome/doesfacebook/tree/v0]
|
7
|
+
and the
|
8
|
+
{"v1" (new) branch}[https://github.com/awexome/doesfacebook/tree/v1].
|
9
|
+
|
10
|
+
At this time, v1 is merging into master.
|
11
|
+
|
12
|
+
This document reflects the planned changes for versions going forward.
|
13
|
+
|
14
|
+
|
15
|
+
== v1.0.0
|
16
|
+
|
17
|
+
The v1 branch is the current branch of development.
|
18
|
+
|
19
|
+
Expected release by November 2012. Changes API and methods of configuration
|
20
|
+
while adding deeper integrations, new features, and currently unsupported
|
21
|
+
Facebook features. Will break some aspects of code written against prior
|
22
|
+
versions of the library.
|
23
|
+
|
24
|
+
Planned features:
|
25
|
+
|
26
|
+
* Remove support for previously-deprecated methods
|
27
|
+
* Change format of configuration, following config/initializers pattern
|
28
|
+
* Allow app configurations to be loaded via YAML, Proc, database
|
29
|
+
* Bring proper url_for_canvas support into controllers
|
30
|
+
* Increase flexibility of JS-based redirect with custom partial, template, message, and/or delay loaded from configuration or directly in method call
|
31
|
+
* Change standards and optimizations for helpers, filters
|
32
|
+
* Provide user, page, and referrer details to apps in filters
|
33
|
+
* Add deeper integration options with Graph API via DoesOpenGraph
|
34
|
+
|
35
|
+
|
36
|
+
== v0.6.0
|
37
|
+
|
38
|
+
Maintained in the v0 branch, this is the prior path of development.
|
39
|
+
|
40
|
+
Released October 11, 2012. Fixes issues and extends functionality of
|
41
|
+
the existing v0.5.* track. Introduces deprecations, but does not break
|
42
|
+
functionality.
|
43
|
+
|
44
|
+
Implemented features:
|
45
|
+
|
46
|
+
* Add proper deprecation messaging for deprecated configurations and methods
|
47
|
+
|
48
|
+
|
49
|
+
== Support
|
50
|
+
|
51
|
+
Support for v0 branch releases will continue alongside v1 branch releases
|
52
|
+
following the release of v1.0.0, however only bugfixes and tweaks will
|
53
|
+
be added to the v0 branch once v1.0.0 is released. All new feature
|
54
|
+
development and required alterations for Facebook-initiated changes
|
55
|
+
will take place in the v1 branch only.
|
data/Rakefile
ADDED
@@ -0,0 +1,64 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
require "rubygems"
|
4
|
+
require "bundler"
|
5
|
+
begin
|
6
|
+
Bundler.setup(:default, :development)
|
7
|
+
rescue Bundler::BundlerError => e
|
8
|
+
$stderr.puts e.message
|
9
|
+
$stderr.puts "Run `bundle install` to install missing gems"
|
10
|
+
exit e.status_code
|
11
|
+
end
|
12
|
+
require "rake"
|
13
|
+
|
14
|
+
require "jeweler"
|
15
|
+
Jeweler::Tasks.new do |gem|
|
16
|
+
# gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
|
17
|
+
gem.name = "doesfacebook"
|
18
|
+
gem.homepage = "http://github.com/awexome/doesfacebook"
|
19
|
+
gem.license = "MIT"
|
20
|
+
gem.summary = %Q{Lightweight gem enables your Rails application to quickly and simply integrate with Facebook}
|
21
|
+
gem.description = %Q{Lightweight gem enables your Rails application to quickly and simply integrate with Facebook}
|
22
|
+
gem.email = "engineering@awexomelabs.com"
|
23
|
+
gem.authors = ["Awexome Labs"]
|
24
|
+
# dependencies defined in Gemfile
|
25
|
+
end
|
26
|
+
Jeweler::RubygemsDotOrgTasks.new
|
27
|
+
|
28
|
+
require "rspec/core"
|
29
|
+
require "rspec/core/rake_task"
|
30
|
+
RSpec::Core::RakeTask.new(:spec) do |spec|
|
31
|
+
end
|
32
|
+
|
33
|
+
RSpec::Core::RakeTask.new(:rcov) do |spec|
|
34
|
+
spec.rcov = true
|
35
|
+
end
|
36
|
+
|
37
|
+
task :default => :spec
|
38
|
+
|
39
|
+
# require "rake/testtask"
|
40
|
+
# Rake::TestTask.new(:test) do |test|
|
41
|
+
# test.libs << "lib" << "test"
|
42
|
+
# test.pattern = "test/**/test_*.rb"
|
43
|
+
# test.verbose = true
|
44
|
+
# end
|
45
|
+
|
46
|
+
# require "rcov/rcovtask"
|
47
|
+
# Rcov::RcovTask.new do |test|
|
48
|
+
# test.libs << "test"
|
49
|
+
# test.pattern = "test/**/test_*.rb"
|
50
|
+
# test.verbose = true
|
51
|
+
# test.rcov_opts << "--exclude "gems/*""
|
52
|
+
# end
|
53
|
+
|
54
|
+
# task :default => :test
|
55
|
+
|
56
|
+
require "rdoc/task"
|
57
|
+
Rake::RDocTask.new do |rdoc|
|
58
|
+
version = File.exist?("VERSION") ? File.read("VERSION") : ""
|
59
|
+
|
60
|
+
rdoc.rdoc_dir = "rdoc"
|
61
|
+
rdoc.title = "DoesKeyValue #{version}"
|
62
|
+
rdoc.rdoc_files.include("README*")
|
63
|
+
rdoc.rdoc_files.include("lib/**/*.rb")
|
64
|
+
end
|
data/VERSION
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
1.0.0.pre1
|
@@ -0,0 +1,71 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = "doesfacebook"
|
8
|
+
s.version = "1.0.0.pre1"
|
9
|
+
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new("> 1.3.1") if s.respond_to? :required_rubygems_version=
|
11
|
+
s.authors = ["Awexome Labs"]
|
12
|
+
s.date = "2013-05-21"
|
13
|
+
s.description = "Lightweight gem enables your Rails application to quickly and simply integrate with Facebook"
|
14
|
+
s.email = "engineering@awexomelabs.com"
|
15
|
+
s.extra_rdoc_files = [
|
16
|
+
"LICENSE",
|
17
|
+
"README.rdoc"
|
18
|
+
]
|
19
|
+
s.files = [
|
20
|
+
"CHANGELOG.rdoc",
|
21
|
+
"Gemfile",
|
22
|
+
"Gemfile.lock",
|
23
|
+
"LICENSE",
|
24
|
+
"README.rdoc",
|
25
|
+
"ROADMAP.rdoc",
|
26
|
+
"Rakefile",
|
27
|
+
"VERSION",
|
28
|
+
"doesfacebook.gemspec",
|
29
|
+
"lib/doesfacebook.rb",
|
30
|
+
"lib/doesfacebook/application.rb",
|
31
|
+
"lib/doesfacebook/configuration.rb",
|
32
|
+
"lib/doesfacebook/controller_extensions.rb",
|
33
|
+
"lib/doesfacebook/error.rb",
|
34
|
+
"lib/doesfacebook/middleware.rb",
|
35
|
+
"lib/doesfacebook/session.rb",
|
36
|
+
"lib/generators/doesfacebook/config/config_generator.rb",
|
37
|
+
"lib/generators/doesfacebook/config/templates/doesfacebook.rb",
|
38
|
+
"lib/helpers/does_facebook_helper.rb",
|
39
|
+
"public/channel.html"
|
40
|
+
]
|
41
|
+
s.homepage = "http://github.com/awexome/doesfacebook"
|
42
|
+
s.licenses = ["MIT"]
|
43
|
+
s.require_paths = ["lib"]
|
44
|
+
s.rubygems_version = "1.8.24"
|
45
|
+
s.summary = "Lightweight gem enables your Rails application to quickly and simply integrate with Facebook"
|
46
|
+
|
47
|
+
if s.respond_to? :specification_version then
|
48
|
+
s.specification_version = 3
|
49
|
+
|
50
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
51
|
+
s.add_runtime_dependency(%q<rails>, [">= 3.2.0"])
|
52
|
+
s.add_development_dependency(%q<bundler>, [">= 1.1"])
|
53
|
+
s.add_development_dependency(%q<jeweler>, ["~> 1.8.4"])
|
54
|
+
s.add_development_dependency(%q<rdoc>, ["~> 3.12"])
|
55
|
+
s.add_development_dependency(%q<rspec>, [">= 2.11.0"])
|
56
|
+
else
|
57
|
+
s.add_dependency(%q<rails>, [">= 3.2.0"])
|
58
|
+
s.add_dependency(%q<bundler>, [">= 1.1"])
|
59
|
+
s.add_dependency(%q<jeweler>, ["~> 1.8.4"])
|
60
|
+
s.add_dependency(%q<rdoc>, ["~> 3.12"])
|
61
|
+
s.add_dependency(%q<rspec>, [">= 2.11.0"])
|
62
|
+
end
|
63
|
+
else
|
64
|
+
s.add_dependency(%q<rails>, [">= 3.2.0"])
|
65
|
+
s.add_dependency(%q<bundler>, [">= 1.1"])
|
66
|
+
s.add_dependency(%q<jeweler>, ["~> 1.8.4"])
|
67
|
+
s.add_dependency(%q<rdoc>, ["~> 3.12"])
|
68
|
+
s.add_dependency(%q<rspec>, [">= 2.11.0"])
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|