crowdtilt 1.0.3 → 1.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.
- checksums.yaml +8 -8
 - data/lib/crowdtilt/api_error.rb +6 -1
 - metadata +1 -1
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,15 +1,15 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            !binary "U0hBMQ==":
         
     | 
| 
       3 
3 
     | 
    
         
             
              metadata.gz: !binary |-
         
     | 
| 
       4 
     | 
    
         
            -
                 
     | 
| 
      
 4 
     | 
    
         
            +
                Y2QxYmQxNTJkNjQwYTcwOTE4N2U1NDMzY2U1ODZmYjMyZmE5ZWZhZQ==
         
     | 
| 
       5 
5 
     | 
    
         
             
              data.tar.gz: !binary |-
         
     | 
| 
       6 
     | 
    
         
            -
                 
     | 
| 
      
 6 
     | 
    
         
            +
                MTg0MDViZDk2NDYxMmE1ZWFjNTM4OWY5N2FiY2UxYTMxMmMwNjZkMw==
         
     | 
| 
       7 
7 
     | 
    
         
             
            SHA512:
         
     | 
| 
       8 
8 
     | 
    
         
             
              metadata.gz: !binary |-
         
     | 
| 
       9 
     | 
    
         
            -
                 
     | 
| 
       10 
     | 
    
         
            -
                 
     | 
| 
       11 
     | 
    
         
            -
                 
     | 
| 
      
 9 
     | 
    
         
            +
                YjM5MjgyYTQ3YTdmZTk0Y2YxMDNmOGQ0MTRmMjkzOGQyMDgyNzZlNDI0ZTI3
         
     | 
| 
      
 10 
     | 
    
         
            +
                Y2RkNzc4NzY1NDE0YTQ0MGE0NWI2MzIzOGE4MDkwZWFmOTllMzVhZTAxNDQ5
         
     | 
| 
      
 11 
     | 
    
         
            +
                MWUyOThhZmMzYTVhNmE2MWRkZWI4MTE4MGY3ZmQyNmU5ODdhOGM=
         
     | 
| 
       12 
12 
     | 
    
         
             
              data.tar.gz: !binary |-
         
     | 
| 
       13 
     | 
    
         
            -
                 
     | 
| 
       14 
     | 
    
         
            -
                 
     | 
| 
       15 
     | 
    
         
            -
                 
     | 
| 
      
 13 
     | 
    
         
            +
                MzZlOWFjNDA1MjY5NTYwNjNlZjljZDViYWNiZWU1MjNlODEwY2IzNzI4OTkx
         
     | 
| 
      
 14 
     | 
    
         
            +
                NWRkMmFhMDIxMjU5NDFiOGE0ZDJiZTExNzYxZmY2YjNhYWNhNzZhYTkyZTRl
         
     | 
| 
      
 15 
     | 
    
         
            +
                Y2ExM2I5OGY3ODZjNGU4MDgxN2E4MTc4MzVjM2QxNzg5OTM3OTY=
         
     | 
    
        data/lib/crowdtilt/api_error.rb
    CHANGED
    
    | 
         @@ -1,10 +1,15 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            module Crowdtilt
         
     | 
| 
       2 
2 
     | 
    
         | 
| 
       3 
3 
     | 
    
         
             
              class ApiError < StandardError
         
     | 
| 
       4 
     | 
    
         
            -
                attr_accessor :response
         
     | 
| 
      
 4 
     | 
    
         
            +
                attr_accessor :response, :error_id
         
     | 
| 
       5 
5 
     | 
    
         | 
| 
       6 
6 
     | 
    
         
             
                def initialize(message, response)
         
     | 
| 
       7 
7 
     | 
    
         
             
                  @response = response
         
     | 
| 
      
 8 
     | 
    
         
            +
                  begin
         
     | 
| 
      
 9 
     | 
    
         
            +
                    @error_id = response[:body]['error_id']
         
     | 
| 
      
 10 
     | 
    
         
            +
                  rescue
         
     | 
| 
      
 11 
     | 
    
         
            +
                    # eat it
         
     | 
| 
      
 12 
     | 
    
         
            +
                  end
         
     | 
| 
       8 
13 
     | 
    
         
             
                  super(message)
         
     | 
| 
       9 
14 
     | 
    
         
             
                end
         
     | 
| 
       10 
15 
     | 
    
         
             
              end
         
     |