Permalink
Browse files

Fixed bug with parsed_signed_request, updated gemfile for beta2.1.

  • Loading branch information...
1 parent be365a5 commit 98c809b415f26e0f9026e7df234b17a81cec3a80 @arsduo arsduo committed Apr 6, 2011
Showing with 23 additions and 3 deletions.
  1. +20 −2 koala.gemspec
  2. +1 −1 lib/koala.rb
  3. +2 −0 spec/koala_spec_helper.rb
View
22 koala.gemspec
@@ -1,8 +1,26 @@
# -*- encoding: utf-8 -*-
Gem::Specification.new do |s|
- s.name = %q{koala}
- s.version = "1.0.0.beta2"
+ s.name = %q{koala}
+ s.version = "1.0.0.beta2.1"
+ s.date = %q{2011-04-06}
+
+ s.summary = %q{A lightweight, flexible library for Facebook with support for the Graph API, the old REST API, realtime updates, and OAuth validation.}
+ s.description = %q{Koala is a lightweight, flexible Ruby SDK for Facebook. It allows read/write access to the social graph via the Graph API and the older REST API, as well as support for realtime updates and OAuth and Facebook Connect authentication. Koala is fully tested and supports Net::HTTP and Typhoeus connections out of the box and can accept custom modules for other services.}
+ s.homepage = %q{http://github.com/arsduo/koala}
+
+ s.authors = ["Alex Koppel, Chris Baclig, Rafi Jacoby, Context Optional"]
+ s.email = %q{alex@alexkoppel.com}
+
+ s.files = `git ls-files`.split("\n")
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
+
+ s.extra_rdoc_files = ["readme.md", "CHANGELOG"]
+ s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Koala"]
+
+ s.require_paths = ["lib"]
+
+ s.rubygems_version = %q{1.4.2}
s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
s.authors = ["Alex Koppel, Chris Baclig, Rafi Jacoby, Context Optional"]
View
2 lib/koala.rb
@@ -219,7 +219,7 @@ def get_app_access_token
# for a more accurate reference implementation strategy.
def parse_signed_request(input)
encoded_sig, encoded_envelope = input.split('.', 2)
- signature = base64_url_decode(encoded_sig).unpack("H*").to_s
+ signature = base64_url_decode(encoded_sig).unpack("H*").first
envelope = JSON.parse(base64_url_decode(encoded_envelope))
raise "SignedRequest: Unsupported algorithm #{envelope['algorithm']}" if envelope['algorithm'] != 'HMAC-SHA256'
View
2 spec/koala_spec_helper.rb
@@ -12,6 +12,8 @@
require 'rubygems'
end
+require 'yaml'
+
# load the libraries
require 'koala'

0 comments on commit 98c809b

Please sign in to comment.