forked from godfat/rest-graph
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCHANGES
134 lines (105 loc) · 5.58 KB
/
CHANGES
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
= rest-graph changes history
== rest-graph 1.4.1 -- ?
* Added RestGraph#parse_signed_request!
* Added RestGraph#url to generate desired API request URL,
in case you'll want to use different HTTP client, such as em-http-request,
or pass the API request to different process of data fetcher.
* Added an :cache option that allow you to pass a cache object,
which should respond to [] and []= for reading and writing.
The cache key would be MD5 hexdigest from the URL being called.
pass :cache => Rails.cache to rest_graph_setup when using RailsUtil.
* [RailsUtil] Pass :cache => Rails.cache to rest_graph_setup to enable cache.
* [RailsUtil] Favor signed_request over session in rest_graph_setup
* [RailsUtil] Now it's possible to setup all options in rest-graph.yaml.
== rest-graph 1.4.0 -- 2010-07-15
Changes only for RailsUtil, the core (rest-graph.rb) is pretty stable for now.
* Internal code rearrangement.
* Removed url_for helper, it's too hard to do it right.
* Removed @fb_sig_in_canvas hack.
* Added rest_graph method in helper.
* Fixed a bug that logging redirect but not really do direct.
* Now passing :auto_authorize_scope implies :auto_authorize => true.
* Now :canvas option takes the name of canvas, instead of a boolean.
* Now :auto_authorize default to false.
* Now :auto_authorize_scope default to nothing.
* Now there's :write_session option to save fbs in session, default to false.
== rest-graph 1.3.0 -- 2010-06-11
* Now rest-graph is rescuing all exceptions from rest-client.
* Added RestGraph#exchange_sessions to exchange old sessions to access tokens.
* Added RestGraph#old_rest, see:
http://developers.facebook.com/docs/reference/rest/
* Now all API request accept an additional options argument,
you may pass :suppress_decode => true to turn off auto-decode this time.
e.g. rg.get('bad/json', {:query => 'string'}, :suppress_decode => true)
This is for Facebook who didn't always return JSON in response.
* Renamed fql_server to old_server.
* Favor yaji/json_gem first, then falls back to json, and json_pure.
* Fixed a bug that cookie format from Facebook varies. No idea why.
for RailsUtil:
* Big and fat refactoring in RailsUtil, see example for detail:
http://github.com/cardinalblue/rest-graph/tree/rest-graph-1.3.0/example
* url_for and link_to would auto pass :host option if it's inside canvas.
== rest-graph 1.2.1 -- 2010-06-02
* Deprecated RailsController, use RailsUtil instead.
* Fixed a bug that passing access_token in query string
in RestGraph#authorize_url
* Fixed a bug that Facebook changed the format (I think) of fbs_ in cookies.
Thanks betelgeuse, closes #1
http://github.com/cardinalblue/rest-graph/issues/issue/1
== rest-graph 1.2.0 -- 2010-05-27
* Add RestGraph#parse_json!
* Add RailsController to help you integrate into Rails.
* Simplify arguments checking and require dependency.
* Now if there's no secret in RestGraph, sig check would always fail.
* Now there's a Rails example.
http://github.com/cardinalblue/rest-graph/tree/master/example
* Add error_handler option. Default behavior is raising ::RestGraph::Error.
You may want to pass your private controller method to do redirection.
Extracted from README:
# You may want to do redirect instead of raising exception, for example,
# in a Rails application, you might have this private controller method:
def redirect_to_authorize error = nil
redirect_to @rg.authorize_url(:redirect_uri => request.url)
end
# and you'll use that private method to do error handling:
def setup_rest_graph
@rg = RestGraph.new(:error_handler => method(:redirect_to_authorize))
end
* Add log_handler option. Default behavior is do nothing.
You may want to do this in Rails:
RestGraph.new(:log_hanlder => lambda{ |duration, url|
Rails.logger.debug("RestGraph " \
"spent #{duration} " \
"requesting #{url}")
})
* Add RestGraph#fql_multi to do FQL multiquery. Thanks Ethan Czahor
Usage: rg.fql_multi(:query1 => 'SELECT ...', :query2 => 'SELECT ...')
== rest-graph 1.1.1 -- 2010-05-21
* Add oauth realted utilites -- authorize_url and authorize!
* Fixed a bug that in Ruby 1.8.7-, nil =~ /regexp/ equals to false.
It is nil as expected in Ruby 1.9.1+
== rest-graph 1.1.0 -- 2010-05-13
* Main repository was moved to http://github.com/cardinalblue/rest-graph
Sorry for the inconvenience. I'll keep pushing to both repositories until
I am too lazy to do that.
* Better way to deal with default attributes, use class methods.
* If you want to auto load config, do require 'rest-graph/auto_load'
if it's rails, it would load the config from config/rest-graph.y(a)ml.
if you're using rails plugin, we do require 'rest-graph/auto_load'
for you.
* Config could be loaded manually as well. require 'rest-graph/load_config'
and RestGraph::LoadConfig.load_config!('path/to/rest-graph.yaml', 'env')
== rest-graph 1.0.0 -- 2010-05-06
* now access_token is saved in data attributes.
* cookies related methods got renamed, and saved all data in RestGraph
* parse failed would return nil, while data is always a hash
== rest-graph 0.9.0 -- 2010-05-04
* renamed :server option to :graph_server
* added :fql_server option and fql support.
* cookies related parsing utility is now instance methods.
you'll need to pass app_id and secret when initializing
* if sig in cookies is bad, then it won't extract the access_token
== rest-graph 0.8.1 -- 2010-05-03
* added access_token parsing utility
== rest-graph 0.8.0 -- 2010-05-03
* release early, release often