fanforce-exceptions 0.5.1 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,7 @@
1
1
  ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- MTU0NzkyYWI2YWJiODUyMzI1NjY4NjZiODcyZWY3NTI3NzdlMjFkYQ==
5
- data.tar.gz: !binary |-
6
- NzcyOGE2M2RmMzcwMzM2NGUzODZiMTRiNDc3MDZkNjUyMzY3NjliNw==
7
- !binary "U0hBNTEy":
8
- metadata.gz: !binary |-
9
- MWU0NGNmZmMyOTMzZDM1ZTYzMzUyZGJmOTgwNzQ3ODZlNTIzZWJiNzQyMzZm
10
- NGE2NmY1MzEzODI4YzM3ZDAzOTE2NmFkMGM4NmZlMGVmMjU2ZjE5NjliNTQ0
11
- NWQ0MjU4OTllNWM2ZmY4ODU1ODlmYzE5MDdiYTJlNDIxOWUwZjA=
12
- data.tar.gz: !binary |-
13
- YzI5ZTY0OGY4YjQwYzMzNWQ1NTBjMGJiYjk2MzU3N2ZlNDgwY2EyMTYxOGYw
14
- MDY1M2VkMTAwYTczMjdlZDdkZmNjMzljYmFiZjVmNDMxMjQ3YWU2ZDQzMmYz
15
- MmYyOTliYTI4NzdmZmNiYzZkYTJiN2JhMTY2YmI3MjBhMzVkNDE=
2
+ SHA1:
3
+ metadata.gz: 921d65177345f795782633cc0c2bdbe1d7e3bca6
4
+ data.tar.gz: 09c8fd0f3ad7e5da58bd37adc840d6eb11c2b0d8
5
+ SHA512:
6
+ metadata.gz: 19336888f1b3df56a8e9d82be4ccbc502680908ad712b8143f83880460b89f74dc720046a8f5cf18bb19f6a2c738607533bf1ec6a0e765210e28884a4a3b6177
7
+ data.tar.gz: 670406b8f2a739871e777c656b520c14eb2ca1e9ac9b518047889c6ee120b81901b9fe2386012b2d0b7a27466f56bd042ee5f090a9e1539655eb432751572070
data/.gitignore CHANGED
File without changes
data/Gemfile CHANGED
File without changes
data/README.md CHANGED
File without changes
data/Rakefile CHANGED
File without changes
File without changes
File without changes
@@ -41,7 +41,6 @@ class Fanforce::Error < StandardError
41
41
  def default_message; end
42
42
  def valid_error_codes; [] end
43
43
  def default_error_code; end
44
-
45
44
  end
46
45
 
47
46
  class Fanforce::Error::BadRequest < Fanforce::Error # Request is missing something or invalid
@@ -116,26 +115,26 @@ class Fanforce::Error::WebhookFailed < Fanforce::Error # Parameters were valid
116
115
  end
117
116
  end
118
117
 
119
- class Fanforce::Error::AddonFailed < Fanforce::Error # A 3rd-party addon crapped out
120
- attr_reader :plugin_dev_error
121
- def default_message; 'Third-Party Plugin Error' end
118
+ class Fanforce::Error::AppFailed < Fanforce::Error # A 3rd-party app crapped out
119
+ attr_reader :app_dev_error
120
+ def default_message; 'Third-Party App Error' end
122
121
  def valid_error_codes; [:third_party_error] end
123
122
  def default_error_code; :third_party_error end
124
123
 
125
- def initialize(plugin_type, plugin_id, e, msg, &block)
126
- plugin_dev_error = {}
127
- plugin_dev_error[:problem] = msg
124
+ def initialize(_id, e, msg, &block)
125
+ app_dev_error = {}
126
+ app_dev_error[:problem] = msg
128
127
  if e.is_a?(Fanforce::Errors::WebhookFailed)
129
- plugin_dev_error[:request_url] = e.request_url
130
- plugin_dev_error[:request_params] = e.request_params
131
- plugin_dev_error[:response_code] = e.response_code
132
- plugin_dev_error[:response_body] = e.response_body.to_s
133
- plugin_dev_error[:curl_command] = "curl -X POST -d \"#{e.request_params.to_param}\" #{e.request_url}"
128
+ app_dev_error[:request_url] = e.request_url
129
+ app_dev_error[:request_params] = e.request_params
130
+ app_dev_error[:response_code] = e.response_code
131
+ app_dev_error[:response_body] = e.response_body.to_s
132
+ app_dev_error[:curl_command] = "curl -X POST -d \"#{e.request_params.to_param}\" #{e.request_url}"
134
133
  end
135
- @plugin_dev_errors = e.respond_to?(:plugin_dev_errors) ? e.plugin_dev_errors : []
136
- @plugin_dev_errors << plugin_dev_error
134
+ @app_dev_errors = e.respond_to?(:app_dev_errors) ? e.app_dev_errors : []
135
+ @app_dev_errors << app_dev_error
137
136
 
138
- self.class.handler_blocks.each {|block| block.call(plugin_type, plugin_id, plugin_dev_error, e.backtrace) }
137
+ self.class.handler_blocks.each {|block| block.call(_id, app_dev_error, e.backtrace) }
139
138
  super(msg)
140
139
  end
141
140
 
@@ -158,7 +157,7 @@ module Fanforce::Errors
158
157
  RequestFailed = Fanforce::Error::RequestFailed unless defined?(RequestFailed)
159
158
  InternalError = Fanforce::Error::InternalError unless defined?(InternalError)
160
159
  WebhookFailed = Fanforce::Error::WebhookFailed unless defined?(WebhookFailed)
161
- AddonFailed = Fanforce::Error::AddonFailed unless defined?(AddonFailed)
160
+ AppFailed = Fanforce::Error::AppFailed unless defined?(AppFailed)
162
161
 
163
162
  def self.format_admin_details(e, errors=[], additional_options={})
164
163
  admin_details = {error_class: e.class.name, public_response: errors}
File without changes
File without changes
@@ -1,5 +1,5 @@
1
1
  class Fanforce
2
2
  module Exceptions
3
- VERSION = '0.5.1'
3
+ VERSION = '0.6.0'
4
4
  end
5
5
  end
File without changes
File without changes
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fanforce-exceptions
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Caleb Clark
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-10-16 00:00:00.000000000 Z
11
+ date: 2014-08-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fanforce
@@ -52,12 +52,12 @@ require_paths:
52
52
  - lib
53
53
  required_ruby_version: !ruby/object:Gem::Requirement
54
54
  requirements:
55
- - - ! '>='
55
+ - - '>='
56
56
  - !ruby/object:Gem::Version
57
57
  version: '0'
58
58
  required_rubygems_version: !ruby/object:Gem::Requirement
59
59
  requirements:
60
- - - ! '>='
60
+ - - '>='
61
61
  - !ruby/object:Gem::Version
62
62
  version: '0'
63
63
  requirements: []