fanforce-exceptions 0.5.0 → 0.5.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- NjEyNTNlMTRmMjBkYTEzYmE2OTFlMjA4YmUzYThkYTY4NDk5Mjk5Mg==
4
+ MTU0NzkyYWI2YWJiODUyMzI1NjY4NjZiODcyZWY3NTI3NzdlMjFkYQ==
5
5
  data.tar.gz: !binary |-
6
- ODU0YzdlZDI0YjgwYmJkZmVjOGE2M2Q3YWU1MTBkMjBmMjNhNDM4Yw==
6
+ NzcyOGE2M2RmMzcwMzM2NGUzODZiMTRiNDc3MDZkNjUyMzY3NjliNw==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- NDk5MWI2MDBmZGQ4NjIxYzViMzRhNjI2Yzg5YzA0ODhjNDJjZTIzZDg4NjFi
10
- OWQyNGZiYjZmN2VhNTcyYWJjNDIyYmUyOGFmYjExMDg2YjEzMTFiYjQ2ZjEw
11
- YjFjMWU2OGEyYTA0YzI5NGI2MTUyN2U1ZmEyZjA3ZTdlYWUyMTQ=
9
+ MWU0NGNmZmMyOTMzZDM1ZTYzMzUyZGJmOTgwNzQ3ODZlNTIzZWJiNzQyMzZm
10
+ NGE2NmY1MzEzODI4YzM3ZDAzOTE2NmFkMGM4NmZlMGVmMjU2ZjE5NjliNTQ0
11
+ NWQ0MjU4OTllNWM2ZmY4ODU1ODlmYzE5MDdiYTJlNDIxOWUwZjA=
12
12
  data.tar.gz: !binary |-
13
- YThhNGZjY2Q5OTZmYzQ1YjUxNjBhZTIwNmM5MGUxNmRlZjRjNGYxNmQzMGM5
14
- YjBkMGExYjA5ZDI5OTI3MjA1OTMzYzVhMzA1MzY4ZTA1NTNiZTFmODc2NzM2
15
- ZTVlNzdmNzM2YTU1ZTVlMDI1MWE2ZGQyNjhjNWUyZDYyZTg4NzA=
13
+ YzI5ZTY0OGY4YjQwYzMzNWQ1NTBjMGJiYjk2MzU3N2ZlNDgwY2EyMTYxOGYw
14
+ MDY1M2VkMTAwYTczMjdlZDdkZmNjMzljYmFiZjVmNDMxMjQ3YWU2ZDQzMmYz
15
+ MmYyOTliYTI4NzdmZmNiYzZkYTJiN2JhMTY2YmI3MjBhMzVkNDE=
@@ -26,7 +26,7 @@ class Fanforce::Error < StandardError
26
26
  raw_error = symbolize_keys(raw_error)
27
27
  error = { message: is_blank?(raw_error[:message]) ? default_message : raw_error[:message].to_s }
28
28
  error[:resource] = raw_error[:resource].to_s if is_present?(raw_error[:resource])
29
- error[:code] = (is_blank?(raw_error[:code]) or !valid_error_codes.include? raw_error[:code].to_sym) ? default_error_code : raw_error[:code].to_s
29
+ error[:code] = is_blank?(raw_error[:code]) ? default_error_code : raw_error[:code].to_s
30
30
  error[:field] = raw_error[:field].to_s if is_present?(raw_error[:field])
31
31
  error[:fields] = raw_error[:fields].map {|f| f.to_s } if is_present?(raw_error[:fields])
32
32
  error
@@ -88,7 +88,7 @@ end
88
88
  class Fanforce::Error::RequestFailed < Fanforce::Error # Request has correct fields but failed for another reason
89
89
  def code; 422 end
90
90
  def default_message; 'Request Failed' end
91
- def valid_error_codes; [:invalid_data, :record_already_exists, :maxed_capacity] end
91
+ def valid_error_codes; [:invalid_data, :record_already_exists, :maxed_capacity, :missing_field, :missing_field_from_list] end
92
92
  def default_error_code; :unknown end
93
93
  end
94
94
 
@@ -1,5 +1,5 @@
1
1
  class Fanforce
2
2
  module Exceptions
3
- VERSION = '0.5.0'
3
+ VERSION = '0.5.1'
4
4
  end
5
5
  end
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.0
4
+ version: 0.5.1
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-11 00:00:00.000000000 Z
11
+ date: 2013-10-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fanforce