forked from maxdemarzi/fbgraph
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
121 additions
and
12 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# -*- encoding: utf-8 -*- | ||
|
||
Gem::Specification.new do |s| | ||
s.name = %q{fbgraph} | ||
s.version = "0.0.4" | ||
|
||
s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version= | ||
s.authors = ["Nicolas Santa"] | ||
s.date = %q{2010-05-11} | ||
s.description = %q{A Gem for Facebook Open Graph API} | ||
s.email = %q{nicolas55ar@gmail.com} | ||
s.extra_rdoc_files = ["README", "lib/fbgraph.rb", "lib/fbgraph/authorization.rb", "lib/fbgraph/base.rb", "lib/fbgraph/client.rb", "lib/fbgraph/search.rb", "lib/fbgraph/selection.rb"] | ||
s.files = ["README", "Rakefile", "lib/fbgraph.rb", "lib/fbgraph/authorization.rb", "lib/fbgraph/base.rb", "lib/fbgraph/client.rb", "lib/fbgraph/search.rb", "lib/fbgraph/selection.rb", "specs/lib/fbauth/authorization_spec.rb", "specs/lib/fbauth/base_spec.rb", "specs/lib/fbauth/search_spec.rb", "Manifest", "fbgraph.gemspec"] | ||
s.homepage = %q{http://github.com/nsanta/fbgraph} | ||
s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Fbgraph", "--main", "README"] | ||
s.require_paths = ["lib"] | ||
s.rubyforge_project = %q{fbgraph} | ||
s.rubygems_version = %q{1.3.6} | ||
s.summary = %q{A Gem for Facebook Open Graph API} | ||
|
||
if s.respond_to? :specification_version then | ||
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION | ||
s.specification_version = 3 | ||
|
||
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then | ||
s.add_development_dependency(%q<oauth2>, [">= 0"]) | ||
else | ||
s.add_dependency(%q<oauth2>, [">= 0"]) | ||
end | ||
else | ||
s.add_dependency(%q<oauth2>, [">= 0"]) | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
require File.join(File.dirname(__FILE__),"../../../lib/fbgraph") | ||
|
||
describe FBGraph do | ||
describe FBGraph::Client do | ||
describe "initialization" do | ||
before :each do | ||
@client_id = 'client_id' | ||
@secret_id = 'secret_id' | ||
end | ||
describe 'default' do | ||
|
||
before :each do | ||
@client = FBGraph::Client.new(:client_id => @client_id, | ||
:secret_id => @secret_id) | ||
end | ||
|
||
it 'should set the client_id' do | ||
@client.client_id.should == @client_id | ||
end | ||
it 'should set the secret_id' do | ||
@client.secret_id.should == @secret_id | ||
end | ||
it 'should set the facebook_uri ' do | ||
@client.facebook_uri.should == "https://graph.facebook.com" | ||
end | ||
end | ||
|
||
describe 'when token is present' do | ||
before :each do | ||
@token = 'token' | ||
@client = FBGraph::Client.new(:client_id => @client_id, | ||
:secret_id => @secret_id, | ||
:token => @token) | ||
end | ||
|
||
it 'should set the access_token' do | ||
@client.access_token.should == @token | ||
end | ||
it 'should set the consumer client' do | ||
@client.consumer.class.should == OAuth2::AccessToken | ||
end | ||
end | ||
end | ||
|
||
|
||
describe "instance methods" do | ||
before :each do | ||
@client_id = 'client_id' | ||
@secret_id = 'secret_id' | ||
@client = FBGraph::Client.new(:client_id => @client_id, | ||
:secret_id => @secret_id) | ||
end | ||
describe '.authorization' do | ||
it 'should return a FBGraph::Authorization object' do | ||
@client.authorization.class.should == FBGraph::Authorization | ||
end | ||
end | ||
|
||
describe '.selection' do | ||
it 'should return a FBGraph::Selection object' do | ||
@client.selection.class.should == FBGraph::Selection | ||
end | ||
end | ||
|
||
describe '.search' do | ||
it 'should return a FBGraph::Search object' do | ||
@client.search.class.should == FBGraph::Search | ||
end | ||
end | ||
|
||
describe '.realtime' | ||
|
||
describe '.oauth_client' do | ||
it 'should return a OAuth2::Client object' do | ||
@client.oauth_client.class.should == OAuth2::Client | ||
end | ||
end | ||
end | ||
end | ||
end |
Empty file.
Empty file.
Empty file.