facebook_graphr 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.0
1
+ 0.1.1
@@ -0,0 +1,57 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in rakefile, and run the gemspec command
4
+ # -*- encoding: utf-8 -*-
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = %q{facebook_graphr}
8
+ s.version = "0.1.1"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.authors = ["Kevin Ball"]
12
+ s.date = %q{2010-08-27}
13
+ s.description = %q{A lightweight gem for dealing with Facebook's new Open Graph API}
14
+ s.email = %q{kmball11@gmail.com}
15
+ s.extra_rdoc_files = [
16
+ "LICENSE",
17
+ "README.rdoc"
18
+ ]
19
+ s.files = [
20
+ ".document",
21
+ ".gitignore",
22
+ "LICENSE",
23
+ "README.rdoc",
24
+ "Rakefile",
25
+ "VERSION",
26
+ "facebook_graphr.gemspec",
27
+ "init.rb",
28
+ "lib/facebook_graphr.rb",
29
+ "lib/facebook_graphr/helpers.rb",
30
+ "rails/init.rb",
31
+ "test/helper.rb",
32
+ "test/test_facebook_graphr.rb"
33
+ ]
34
+ s.homepage = %q{http://github.com/kball/facebook_graphr}
35
+ s.rdoc_options = ["--charset=UTF-8"]
36
+ s.require_paths = ["lib"]
37
+ s.rubygems_version = %q{1.3.7}
38
+ s.summary = %q{A gem for dealing with Facebook's new graph API}
39
+ s.test_files = [
40
+ "test/helper.rb",
41
+ "test/test_facebook_graphr.rb"
42
+ ]
43
+
44
+ if s.respond_to? :specification_version then
45
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
46
+ s.specification_version = 3
47
+
48
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
49
+ s.add_development_dependency(%q<thoughtbot-shoulda>, [">= 0"])
50
+ else
51
+ s.add_dependency(%q<thoughtbot-shoulda>, [">= 0"])
52
+ end
53
+ else
54
+ s.add_dependency(%q<thoughtbot-shoulda>, [">= 0"])
55
+ end
56
+ end
57
+
data/init.rb ADDED
@@ -0,0 +1 @@
1
+ require 'facebook_graphr'
@@ -3,7 +3,7 @@ module FacebookGraphr
3
3
 
4
4
  class << self
5
5
  attr_accessor :config
6
- def self.setup(yml_file)
6
+ def setup(yml_file)
7
7
  hash = File.open(yml_file) do |f|
8
8
  YAML::load(f)
9
9
  end
@@ -0,0 +1,27 @@
1
+ module FacebookGraphr
2
+ module Helpers
3
+ module Init
4
+ def init_facebook_graph_js(opts = {})
5
+ js_lib = (opts[:js] || :jquery).to_sym
6
+ if js_lib != :jquery
7
+ raise "Currently unsupported JS library: #{js_lib}"
8
+ end
9
+ <<-EOS
10
+ <script src="http://connect.facebook.net/en_US/all.js"></script>
11
+ <div id="fb-root"></div>
12
+ <script type="text/javascript">
13
+ //<![CDATA[
14
+ jQuery(document).ready( function() {
15
+ FB.init({appId: '#{FacebookGraphr.config[:app_id]}', status: true, cookie: true, xfbml: true});
16
+ FB.Event.subscribe('auth.sessionChange', function(response) {
17
+ window.location.reload();
18
+ });
19
+ });
20
+ //]]>
21
+ </script>
22
+
23
+ EOS
24
+ end
25
+ end
26
+ end
27
+ end
data/rails/init.rb ADDED
@@ -0,0 +1 @@
1
+ ActionController::Base.send(:helper, FacebookGraphr::Helpers::Init)
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: facebook_graphr
3
3
  version: !ruby/object:Gem::Version
4
- hash: 27
4
+ hash: 25
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 0
10
- version: 0.1.0
9
+ - 1
10
+ version: 0.1.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Kevin Ball
@@ -48,7 +48,11 @@ files:
48
48
  - README.rdoc
49
49
  - Rakefile
50
50
  - VERSION
51
+ - facebook_graphr.gemspec
52
+ - init.rb
51
53
  - lib/facebook_graphr.rb
54
+ - lib/facebook_graphr/helpers.rb
55
+ - rails/init.rb
52
56
  - test/helper.rb
53
57
  - test/test_facebook_graphr.rb
54
58
  has_rdoc: true