koala-rails 0.1.1 → 0.1.2
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.
data/README.rdoc
CHANGED
@@ -1,16 +1,16 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
2
|
require 'generators/koala'
|
3
3
|
|
4
|
-
module Koala
|
5
|
-
module Generators
|
6
|
-
class InstallGenerator < Rails::Generators::Base
|
4
|
+
module Koala # :nodoc:
|
5
|
+
module Generators # :nodoc:
|
6
|
+
class InstallGenerator < Rails::Generators::Base # :nodoc:
|
7
7
|
extend TemplatePath
|
8
8
|
|
9
|
-
def copy_config_file
|
9
|
+
def copy_config_file # :nodoc:
|
10
10
|
template "config/facebook.yml.tt", "config/facebook.yml"
|
11
11
|
end
|
12
12
|
|
13
|
-
def copy_initializer_file
|
13
|
+
def copy_initializer_file # :nodoc:
|
14
14
|
template "config/initializers/koala.rb.tt", "config/initializers/koala.rb"
|
15
15
|
end
|
16
16
|
|
@@ -2,6 +2,7 @@
|
|
2
2
|
# config/initializers/koala.rb
|
3
3
|
# Monkey-patch in Facebook config so Koala knows to
|
4
4
|
# automatically use Facebook settings from here if none are given
|
5
|
+
require "koala"
|
5
6
|
|
6
7
|
module Facebook
|
7
8
|
CONFIG = YAML.load(ERB.new(File.read("#{RAILS_ROOT}/config/facebook.yml")).result)[RAILS_ENV]
|
data/lib/generators/koala.rb
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
|
-
module Koala
|
3
|
-
module Generators
|
4
|
-
module TemplatePath
|
5
|
-
def source_root
|
2
|
+
module Koala # :nodoc:
|
3
|
+
module Generators # :nodoc:
|
4
|
+
module TemplatePath # :nodoc:
|
5
|
+
def source_root # :nodoc:
|
6
6
|
@_koala_source_root ||= File.expand_path(File.join(File.dirname(__FILE__), 'koala', generator_name, 'templates'))
|
7
7
|
end
|
8
8
|
end
|
data/lib/koala-rails/helpers.rb
CHANGED
@@ -1,19 +1,19 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
|
-
module KoalaRails
|
3
|
-
module Helpers
|
4
|
-
def facebook_session
|
2
|
+
module KoalaRails # :nodoc:
|
3
|
+
module Helpers # :nodoc:
|
4
|
+
def facebook_session # :nodoc:
|
5
5
|
@facebook_session ||= Koala::Facebook::OAuth.new.get_user_from_cookie(cookies)
|
6
6
|
end
|
7
7
|
|
8
|
-
def facebook_token
|
8
|
+
def facebook_token # :nodoc:
|
9
9
|
@facebook_access_token ||= facebook_session['access_token']
|
10
10
|
end
|
11
11
|
|
12
|
-
def facebook_uid
|
12
|
+
def facebook_uid # :nodoc:
|
13
13
|
@facebook_uid ||= facebook_session['uid']
|
14
14
|
end
|
15
15
|
|
16
|
-
def facebook_session_key
|
16
|
+
def facebook_session_key # :nodoc:
|
17
17
|
@facebook_session_key ||= facebook_session['session_key']
|
18
18
|
end
|
19
19
|
end
|
data/lib/koala-rails/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: koala-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 31
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 2
|
10
|
+
version: 0.1.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Steven Hancock
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-06-
|
18
|
+
date: 2010-06-25 00:00:00 -07:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|