upstream-simple_facebook_connect 0.0.3 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.3
1
+ 0.0.4
@@ -15,7 +15,7 @@ module SimpleFacebookConnect
15
15
  else
16
16
  render(:nothing => true)
17
17
  end
18
- rescue StandardError => e
18
+ rescue FacebookApiError => e
19
19
  Rails.logger.warn e.message
20
20
  redirect_to fb_authenticate_path
21
21
  end
@@ -4,8 +4,7 @@ module SimpleFacebookConnect
4
4
  if File.exists?(fixture_path(method, 'default'))
5
5
  File.read fixture_path(method, 'default')
6
6
  else
7
- e.message << "\nFacebook API Reference: http://wiki.developers.facebook.com/index.php/#{method.sub(/^facebook\./, '')}#Example_Return_XML"
8
- raise e
7
+ raise "Missing fixture #{fixture_path(method, 'default')}\nFacebook API Reference: http://wiki.developers.facebook.com/index.php/#{method.sub(/^facebook\./, '')}#Example_Return_XML"
9
8
  end
10
9
  end
11
10
 
@@ -2,6 +2,8 @@ require 'rexml/document'
2
2
 
3
3
  module SimpleFacebookConnect
4
4
 
5
+ class FacebookApiError < StandardError; end
6
+
5
7
  class Parser
6
8
 
7
9
  module REXMLElementExtensions
@@ -141,7 +143,7 @@ module SimpleFacebookConnect
141
143
  response_element = element('error_response', data) rescue nil
142
144
  if response_element
143
145
  hash = hashinate(response_element)
144
- raise StandardError, hash['error_msg']
146
+ raise FacebookApiError, hash['error_msg']
145
147
  end
146
148
  end
147
149
  end
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{simple_facebook_connect}
5
- s.version = "0.0.3"
5
+ s.version = "0.0.4"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Alexander Lang", "Frank Pr\303\266\303\237dorf"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: upstream-simple_facebook_connect
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexander Lang