buddy 2.0.4 → 2.0.5

Sign up to get free protection for your applications and to get access to all the features.
data/lib/buddy/service.rb CHANGED
@@ -6,7 +6,7 @@ module Buddy
6
6
  module Service
7
7
  class << self
8
8
  def call(api_method, params = {}, options = {})
9
- Buddy.caller.call(api_method, params, options)
9
+ Buddy.rest_api_client.call(api_method, params, options)
10
10
  end
11
11
 
12
12
  def get(resource, params = {})
@@ -35,15 +35,9 @@ module Buddy
35
35
  base_uri 'https://graph.facebook.com'
36
36
  end
37
37
 
38
- class Caller
38
+ class RestApiClient
39
39
  include Observable
40
40
  def call(api_method, params = {}, options = {})
41
- begin
42
- application = options[:app] || 'default'
43
- rescue NoMethodError => e
44
- raise ArgumentError.new("app not specified in buddy.yml")
45
- end
46
-
47
41
  changed
48
42
  notify_observers(api_method, params, options)
49
43
 
@@ -58,8 +52,8 @@ module Buddy
58
52
  options[:params] = params
59
53
  MiniFB.rest(params[:access_token], api_method, options)
60
54
  else
61
- MiniFB.call(Buddy.buddy_config[application]["api_key"],
62
- Buddy.buddy_config[application]["secret"],
55
+ MiniFB.call(Buddy.config["api_key"],
56
+ Buddy.config["secret"],
63
57
  api_method,
64
58
  params.stringify_keys)
65
59
  end
data/lib/buddy/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Buddy
2
- VERSION = "2.0.4"
2
+ VERSION = "2.0.5"
3
3
  end
data/lib/buddy.rb CHANGED
@@ -45,7 +45,7 @@ buddy_config = File.join(Bundler.root, "config", "buddy.yml")
45
45
 
46
46
  BUDDY = Buddy.load_configuration(buddy_config)
47
47
  Buddy.logger = Rails.logger
48
- Buddy.caller = Buddy::Service::Caller.new
48
+ Buddy.rest_api_client = Buddy::Service::RestApiClient.new
49
49
 
50
50
  require 'buddy/rails/url_helper'
51
51
  require 'buddy/rails/controller'
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: buddy
3
3
  version: !ruby/object:Gem::Version
4
- hash: 7
4
+ hash: 5
5
5
  prerelease:
6
6
  segments:
7
7
  - 2
8
8
  - 0
9
- - 4
10
- version: 2.0.4
9
+ - 5
10
+ version: 2.0.5
11
11
  platform: ruby
12
12
  authors:
13
13
  - Ole Riesenberg
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-07-22 00:00:00 +02:00
18
+ date: 2011-07-27 00:00:00 +02:00
19
19
  default_executable:
20
20
  dependencies: []
21
21