koala 1.4.0.rc1 → 1.4.0

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -5,13 +5,13 @@ Updated methods:
5
5
  -- HTTPServices#encode_params sorts parameters to aid in URL comparison (thanks, sholden!)
6
6
  -- get_connections is now aliased as get_connection (use whichever makes sense to you)
7
7
  Internal improvements:
8
- -- Fixed a readme typo (thanks, brycethornton!)
8
+ -- Fixed typos (thanks, brycethornton and jpemberthy!)
9
+ -- RealtimeUpdates will no longer execute challenge block unnecessarily (thanks, iainbeeston!)
9
10
  Testing improvements:
10
11
  -- Added parallel_tests to development gem file
11
12
  -- Fixed failing live tests
12
13
  -- Koala now tests against JRuby and Rubinius in 1.9 mode on Travis-CI
13
14
 
14
-
15
15
  v1.3
16
16
  New methods:
17
17
  -- OAuth#url_for_dialog creates URLs for Facebook dialog pages
data/koala.gemspec CHANGED
@@ -5,13 +5,12 @@ require 'koala/version'
5
5
  Gem::Specification.new do |s|
6
6
  s.name = %q{koala}
7
7
  s.version = Koala::VERSION
8
- s.date = %q{2011-10-04}
9
8
 
10
9
  s.summary = %q{A lightweight, flexible library for Facebook with support for the Graph API, the REST API, realtime updates, and OAuth authentication.}
11
10
  s.description = %q{Koala is a lightweight, flexible Ruby SDK for Facebook. It allows read/write access to the social graph via the Graph and REST APIs, 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.}
12
11
  s.homepage = %q{http://github.com/arsduo/koala}
13
12
 
14
- s.authors = ["Alex Koppel, Chris Baclig, Rafi Jacoby, Context Optional"]
13
+ s.authors = ["Alex Koppel"]
15
14
  s.email = %q{alex@alexkoppel.com}
16
15
 
17
16
  s.files = `git ls-files`.split("\n")
@@ -65,7 +65,7 @@ module Koala
65
65
 
66
66
  # figure out our options for this request
67
67
  request_options = {:params => (verb == "get" ? params : {})}.merge(http_options || {}).merge(process_options(options))
68
- request_options[:use_ssl] = true if args["access_token"] # require http if there's a token
68
+ request_options[:use_ssl] = true if args["access_token"] # require https if there's a token
69
69
 
70
70
  # set up our Faraday connection
71
71
  # we have to manually assign params to the URL or the
@@ -101,11 +101,11 @@ module Koala
101
101
  # you can make sure this is legitimate through two ways
102
102
  # if your store the token across the calls, you can pass in the token value
103
103
  # and we'll make sure it matches
104
- (verify_token && params["hub.verify_token"] == verify_token) ||
104
+ ((verify_token && params["hub.verify_token"] == verify_token) ||
105
105
  # alternately, if you sent a specially-constructed value (such as a hash of various secret values)
106
106
  # you can pass in a block, which we'll call with the verify_token sent by Facebook
107
107
  # if it's legit, return anything that evaluates to true; otherwise, return nil or false
108
- (verification_block && yield(params["hub.verify_token"]))
108
+ (verification_block && yield(params["hub.verify_token"])))
109
109
  params["hub.challenge"]
110
110
  else
111
111
  false
data/lib/koala/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Koala
2
- VERSION = "1.4.0.rc1"
2
+ VERSION = "1.4.0"
3
3
  end
@@ -243,6 +243,13 @@ describe "Koala::Facebook::RealtimeUpdates" do
243
243
  params = {'hub.mode' => 'not subscribe'}
244
244
  Koala::Facebook::RealtimeUpdates.meet_challenge(params).should be_false
245
245
  end
246
+
247
+ it "doesn't evaluate the block if hub.mode isn't subscribe" do
248
+ params = {'hub.mode' => 'not subscribe'}
249
+ block_evaluated = false
250
+ Koala::Facebook::RealtimeUpdates.meet_challenge(params){|token| block_evaluated = true}
251
+ block_evaluated.should be_false
252
+ end
246
253
 
247
254
  it "returns false if not given a verify_token or block" do
248
255
  params = {'hub.mode' => 'subscribe'}
metadata CHANGED
@@ -1,19 +1,19 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: koala
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.0.rc1
5
- prerelease: 6
4
+ version: 1.4.0
5
+ prerelease:
6
6
  platform: ruby
7
7
  authors:
8
- - Alex Koppel, Chris Baclig, Rafi Jacoby, Context Optional
8
+ - Alex Koppel
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-10-04 00:00:00.000000000Z
12
+ date: 2012-03-11 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: multi_json
16
- requirement: &70302319320000 !ruby/object:Gem::Requirement
16
+ requirement: &70104159239520 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '1.0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70302319320000
24
+ version_requirements: *70104159239520
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: faraday
27
- requirement: &70302319318660 !ruby/object:Gem::Requirement
27
+ requirement: &70104159238080 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: 0.7.0
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70302319318660
35
+ version_requirements: *70104159238080
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: rspec
38
- requirement: &70302319317360 !ruby/object:Gem::Requirement
38
+ requirement: &70104159236640 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ~>
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: 2.8.0rc1
44
44
  type: :development
45
45
  prerelease: false
46
- version_requirements: *70302319317360
46
+ version_requirements: *70104159236640
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: rake
49
- requirement: &70302319316620 !ruby/object:Gem::Requirement
49
+ requirement: &70104159224060 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ~>
@@ -54,7 +54,7 @@ dependencies:
54
54
  version: 0.8.7
55
55
  type: :development
56
56
  prerelease: false
57
- version_requirements: *70302319316620
57
+ version_requirements: *70104159224060
58
58
  description: Koala is a lightweight, flexible Ruby SDK for Facebook. It allows read/write
59
59
  access to the social graph via the Graph and REST APIs, as well as support for realtime
60
60
  updates and OAuth and Facebook Connect authentication. Koala is fully tested and
@@ -143,7 +143,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
143
143
  version: '0'
144
144
  segments:
145
145
  - 0
146
- hash: -1082598694545129071
146
+ hash: 3977306572275608217
147
147
  required_rubygems_version: !ruby/object:Gem::Requirement
148
148
  none: false
149
149
  requirements: