fgraph 0.2.1 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
data/History CHANGED
@@ -1,3 +1,10 @@
1
+ v0.3.0
2
+ * Add fgraph_user, alias for fgraph_current_user
3
+ * Fix error when generating config file in rake task
4
+
5
+ v0.2.1 - May 26, 2010
6
+ * Update rdoc
7
+
1
8
  v0.2.0 - May 26, 2010
2
9
  * Rails plugin support
3
10
  * Add FGraph::Collection response object
@@ -180,13 +180,12 @@ Sample codes:
180
180
  <fb:login-button autologoutlink="true" perms="email,publish_stream"></fb:login-button>
181
181
 
182
182
  <% if fgraph_logged_in? %>
183
- <br>Hello <%= fgraph_current_user['name'] %>,
184
- <br><%= fgraph_image_tag(fgraph_current_user, 'large') %>
183
+ <br>Hello <%= fgraph_user['name'] %>,
184
+ <br><%= fgraph_image_tag(fgraph_user, 'large') %>
185
185
  <% end %>
186
186
 
187
187
  For Asynchronous load, use <tt>window.afterFbAsyncInit</tt>:
188
188
 
189
- <%= fgraph_javascript_init_tag :async => true %>
190
189
  <script type="text/javascript">
191
190
  window.afterFbAsyncInit = function() {
192
191
  FB.Event.subscribe('auth.sessionChange', function(response) {
@@ -198,6 +197,7 @@ For Asynchronous load, use <tt>window.afterFbAsyncInit</tt>:
198
197
  });
199
198
  }
200
199
  </script>
200
+ <%= fgraph_javascript_init_tag :async => true %>
201
201
 
202
202
  == License
203
203
 
@@ -1,5 +1,5 @@
1
1
  ---
2
- :patch: 1
2
+ :patch: 0
3
3
  :major: 0
4
4
  :build:
5
- :minor: 2
5
+ :minor: 3
@@ -59,11 +59,17 @@ module FGraph
59
59
  return true if fgraph_session and fgraph_access_token
60
60
  end
61
61
 
62
+ # Currently logged in facebook user
62
63
  def fgraph_current_user
63
64
  return @fgraph_current_user if @fgraph_current_user
64
65
  @fgraph_current_user = fgraph_client.me
65
66
  end
66
67
 
68
+ # Alias for fgraph_current_user
69
+ def fgraph_user
70
+ fgraph_current_user
71
+ end
72
+
67
73
  # Return FGraph::Client instance initialized with settings set in <tt>fgraph.yml</tt>.
68
74
  # Initialized with <tt>:access_token</tt> as well if Facebook session exists.
69
75
  def fgraph_client
@@ -6,7 +6,7 @@ namespace :fgraph do
6
6
  fgraph_config = File.join(RAILS_ROOT, "config", "fgraph.yml")
7
7
  unless File.exist?(fgraph_config)
8
8
  fgraph_config_template = File.join(RAILS_ROOT, "vendor", "plugins", "fgraph", "templates", "fgraph.yml")
9
- FileUtils.cp fgraph_config_teirmplate, fgraph_config
9
+ FileUtils.cp fgraph_config_template, fgraph_config
10
10
  puts "#{RAILS_ROOT}/config/fgraph.yml created, please update your app_id and app_secret."
11
11
  else
12
12
  puts "#{RAILS_ROOT}/config/fgraph.yml already exists."
metadata CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
4
4
  prerelease: false
5
5
  segments:
6
6
  - 0
7
- - 2
8
- - 1
9
- version: 0.2.1
7
+ - 3
8
+ - 0
9
+ version: 0.3.0
10
10
  platform: ruby
11
11
  authors:
12
12
  - Herryanto Siatono
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-05-26 00:00:00 +08:00
17
+ date: 2010-06-08 00:00:00 +08:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency