gibbon 0.1.1 → 0.1.2
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.
Potentially problematic release.
This version of gibbon might be problematic. Click here for more details.
- data/README.markdown +6 -0
- data/VERSION +1 -1
- data/gibbon.gemspec +2 -2
- data/lib/gibbon.rb +3 -2
- metadata +4 -4
    
        data/README.markdown
    CHANGED
    
    | @@ -49,6 +49,12 @@ or | |
| 49 49 |  | 
| 50 50 | 
             
                email_stats = gb.campaignEmailStatsAIM({:cid => campaign_id, :email_address => email_array})
         | 
| 51 51 |  | 
| 52 | 
            +
            ### Other Stuff
         | 
| 53 | 
            +
             | 
| 54 | 
            +
            Gibbon defaults to a 30 second timeout. You can optionally set your own timeout (in seconds) like so:
         | 
| 55 | 
            +
             | 
| 56 | 
            +
                gb.timeout = 5
         | 
| 57 | 
            +
             | 
| 52 58 | 
             
            ##Thanks
         | 
| 53 59 |  | 
| 54 60 | 
             
            * Rails for camelize gsub
         | 
    
        data/VERSION
    CHANGED
    
    | @@ -1 +1 @@ | |
| 1 | 
            -
            0.1. | 
| 1 | 
            +
            0.1.2
         | 
    
        data/gibbon.gemspec
    CHANGED
    
    | @@ -5,11 +5,11 @@ | |
| 5 5 |  | 
| 6 6 | 
             
            Gem::Specification.new do |s|
         | 
| 7 7 | 
             
              s.name = %q{gibbon}
         | 
| 8 | 
            -
              s.version = "0.1. | 
| 8 | 
            +
              s.version = "0.1.2"
         | 
| 9 9 |  | 
| 10 10 | 
             
              s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
         | 
| 11 11 | 
             
              s.authors = ["Amro Mousa"]
         | 
| 12 | 
            -
              s.date = %q{2010-11- | 
| 12 | 
            +
              s.date = %q{2010-11-16}
         | 
| 13 13 | 
             
              s.description = %q{Gibbon is a simple API wrapper for interacting with MailChimp API version 1.3.}
         | 
| 14 14 | 
             
              s.email = %q{amromousa@gmail.com}
         | 
| 15 15 | 
             
              s.extra_rdoc_files = [
         | 
    
        data/lib/gibbon.rb
    CHANGED
    
    | @@ -4,8 +4,9 @@ require 'json' | |
| 4 4 | 
             
            module Gibbon
         | 
| 5 5 | 
             
              class API
         | 
| 6 6 | 
             
                include HTTParty
         | 
| 7 | 
            +
                default_timeout 30
         | 
| 7 8 |  | 
| 8 | 
            -
                attr_accessor :apikey
         | 
| 9 | 
            +
                attr_accessor :apikey, :timeout
         | 
| 9 10 |  | 
| 10 11 | 
             
                def initialize(apikey = nil, extra_params = {})
         | 
| 11 12 | 
             
                  @apikey = apikey
         | 
| @@ -25,7 +26,7 @@ module Gibbon | |
| 25 26 | 
             
                def call(method, params = {})
         | 
| 26 27 | 
             
                  url = base_api_url + method
         | 
| 27 28 | 
             
                  params = params.merge(@default_params)
         | 
| 28 | 
            -
                  response = API.post(url, :body => params.to_json)
         | 
| 29 | 
            +
                  response = API.post(url, :body => params.to_json, :timeout => @timeout)
         | 
| 29 30 |  | 
| 30 31 | 
             
                  begin
         | 
| 31 32 | 
             
                    response = JSON.parse(response.body)
         | 
    
        metadata
    CHANGED
    
    | @@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version | |
| 5 5 | 
             
              segments: 
         | 
| 6 6 | 
             
              - 0
         | 
| 7 7 | 
             
              - 1
         | 
| 8 | 
            -
              -  | 
| 9 | 
            -
              version: 0.1. | 
| 8 | 
            +
              - 2
         | 
| 9 | 
            +
              version: 0.1.2
         | 
| 10 10 | 
             
            platform: ruby
         | 
| 11 11 | 
             
            authors: 
         | 
| 12 12 | 
             
            - Amro Mousa
         | 
| @@ -14,7 +14,7 @@ autorequire: | |
| 14 14 | 
             
            bindir: bin
         | 
| 15 15 | 
             
            cert_chain: []
         | 
| 16 16 |  | 
| 17 | 
            -
            date: 2010-11- | 
| 17 | 
            +
            date: 2010-11-16 00:00:00 -05:00
         | 
| 18 18 | 
             
            default_executable: 
         | 
| 19 19 | 
             
            dependencies: 
         | 
| 20 20 | 
             
            - !ruby/object:Gem::Dependency 
         | 
| @@ -138,7 +138,7 @@ required_ruby_version: !ruby/object:Gem::Requirement | |
| 138 138 | 
             
              requirements: 
         | 
| 139 139 | 
             
              - - ">="
         | 
| 140 140 | 
             
                - !ruby/object:Gem::Version 
         | 
| 141 | 
            -
                  hash:  | 
| 141 | 
            +
                  hash: 1168441844444237339
         | 
| 142 142 | 
             
                  segments: 
         | 
| 143 143 | 
             
                  - 0
         | 
| 144 144 | 
             
                  version: "0"
         |