fgraph 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +0 -1
- data/VERSION.yml +1 -1
- data/lib/fgraph.rb +0 -1
- data/lib/fgraph/client.rb +0 -2
- data/lib/fgraph/rails/fgraph_helper.rb +3 -3
- metadata +2 -3
- data/rails/install.rb +0 -9
data/Rakefile
CHANGED
@@ -12,7 +12,6 @@ begin
|
|
12
12
|
gem.files = FileList["[A-Z]*", "{examples,lib,test,rails,tasks,templates}/**/*"]
|
13
13
|
|
14
14
|
gem.add_dependency("httparty", "~> 0.5.0")
|
15
|
-
# gem.add_dependency("hashie", "~> 0.2.0")
|
16
15
|
|
17
16
|
gem.add_development_dependency("shoulda", "~> 2.10.0")
|
18
17
|
gem.add_development_dependency("jnunemaker-matchy", "~> 0.4.0")
|
data/VERSION.yml
CHANGED
data/lib/fgraph.rb
CHANGED
data/lib/fgraph/client.rb
CHANGED
@@ -7,7 +7,7 @@ module FGraph
|
|
7
7
|
FGraph.config || {}
|
8
8
|
end
|
9
9
|
|
10
|
-
# Return Facebook session, default to retrieve session from cookies
|
10
|
+
# Return Facebook session, default to retrieve session from cookies.
|
11
11
|
def fgraph_session(app_id = fgraph_config['app_id'],
|
12
12
|
app_secret = fgraph_config['app_secret'])
|
13
13
|
|
@@ -15,7 +15,7 @@ module FGraph
|
|
15
15
|
@fgraph_session = fgraph_session_cookies(app_id, app_secret)
|
16
16
|
end
|
17
17
|
|
18
|
-
# Return
|
18
|
+
# Return Facebook session cookies.
|
19
19
|
def fgraph_session_cookies(app_id = fgraph_config['app_id'],
|
20
20
|
app_secret = fgraph_config['app_secret'])
|
21
21
|
|
@@ -64,7 +64,7 @@ module FGraph
|
|
64
64
|
@fgraph_current_user = fgraph_client.me
|
65
65
|
end
|
66
66
|
|
67
|
-
# Return FGraph::Client
|
67
|
+
# Return FGraph::Client instance initialized with settings set in <tt>fgraph.yml</tt>.
|
68
68
|
# Initialized with <tt>:access_token</tt> as well if Facebook session exists.
|
69
69
|
def fgraph_client
|
70
70
|
return @fgraph_client if @fgraph_client
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 2
|
8
|
-
-
|
9
|
-
version: 0.2.
|
8
|
+
- 1
|
9
|
+
version: 0.2.1
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Herryanto Siatono
|
@@ -110,7 +110,6 @@ files:
|
|
110
110
|
- lib/tasks/fgraph.rake
|
111
111
|
- lib/tasks/fgraph.rb
|
112
112
|
- rails/init.rb
|
113
|
-
- rails/install.rb
|
114
113
|
- templates/fgraph.yml
|
115
114
|
- test/fgraph/client_test.rb
|
116
115
|
- test/fgraph_test.rb
|
data/rails/install.rb
DELETED
@@ -1,9 +0,0 @@
|
|
1
|
-
require 'rubygems'
|
2
|
-
require 'fileutil'
|
3
|
-
|
4
|
-
fgraph_config = File.join(RAILS_ROOT, "config", "fgraph.yml")
|
5
|
-
unless File.exist?(fgraph_config)
|
6
|
-
fgraph_config_template = File.join(RAILS_ROOT, "vendor", "plugins", "fgraph", "templates", "fgraph.yml")
|
7
|
-
FileUtils.cp fgraph_config_template, fgraph_config
|
8
|
-
puts "#{RAILS_ROOT}/config/fgraph.yml created, please update your app_id and app_secret."
|
9
|
-
end
|