xmlstats 1.3.0 → 1.3.1
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 +4 -4
- data/README.md +10 -4
- data/lib/xmlstats.rb +4 -1
- data/lib/xmlstats/cachers/redis.rb +4 -4
- data/lib/xmlstats/version.rb +1 -1
- metadata +2 -2
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA1:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 5a1505e84e00c67227a36951d0ed280af7056ad9
         | 
| 4 | 
            +
              data.tar.gz: eca920e8520c0736618bf0de0c24063e94876cab
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: befc00208d3e6b07a7a79aade812b57c325d383cdb2fbef7a8228d636eae218119472321ee6e51854ecba91501909494be2a5e6255f63694ae8912082a65c838
         | 
| 7 | 
            +
              data.tar.gz: 9cf9b25ae4803cac920bb7cd2692d4094b6891d7b79d5a15e59670a84d55126a296e9affccbea2a2cd4284fdfc5a7514c9e4c5cd42013c347c810da4be08750a
         | 
    
        data/README.md
    CHANGED
    
    | @@ -26,13 +26,19 @@ contact info is used in the User-Agent string. | |
| 26 26 |  | 
| 27 27 | 
             
            You can choose to set this via environment variables:
         | 
| 28 28 |  | 
| 29 | 
            -
                export XMLSTATS_API_KEY=" | 
| 30 | 
            -
                export XMLSTATS_CONTACT_INFO=" | 
| 29 | 
            +
                export XMLSTATS_API_KEY="xxxxx-xxxx-xxxx"
         | 
| 30 | 
            +
                export XMLSTATS_CONTACT_INFO="you@example.com"
         | 
| 31 31 |  | 
| 32 32 | 
             
            Or in Ruby:
         | 
| 33 33 |  | 
| 34 | 
            -
                Xmlstats.api_key = " | 
| 35 | 
            -
                Xmlstats.contact_info = " | 
| 34 | 
            +
                Xmlstats.api_key = "xxxxx-xxxx-xxxx"
         | 
| 35 | 
            +
                Xmlstats.contact_info = "you@example.com"
         | 
| 36 | 
            +
             | 
| 37 | 
            +
            The User-Agent string sent to the server will use your specified contact info
         | 
| 38 | 
            +
            and look like "xmlstats-ruby/1.3.0 (you@example.com)".
         | 
| 39 | 
            +
             | 
| 40 | 
            +
            Caching
         | 
| 41 | 
            +
            -------
         | 
| 36 42 |  | 
| 37 43 | 
             
            This library supports a couple of different caching mechanisms to prevent
         | 
| 38 44 | 
             
            constantly hitting the API server.
         | 
    
        data/lib/xmlstats.rb
    CHANGED
    
    
| @@ -7,10 +7,10 @@ module Xmlstats | |
| 7 7 | 
             
                  def initialize(redis = nil)
         | 
| 8 8 | 
             
                    @redis =
         | 
| 9 9 | 
             
                      case redis
         | 
| 10 | 
            -
                      when Hash  then ::Redis.new(redis)
         | 
| 11 | 
            -
                      when Redis then redis
         | 
| 12 | 
            -
                      when nil | 
| 13 | 
            -
                      else raise "unknown parameter type to redis cacher: #{redis.inspect}"
         | 
| 10 | 
            +
                      when ::Hash  then ::Redis.new(redis)
         | 
| 11 | 
            +
                      when ::Redis then redis
         | 
| 12 | 
            +
                      when nil     then ::Redis.new
         | 
| 13 | 
            +
                      else raise "unknown parameter type to redis cacher (#{redis.class}): #{redis.inspect}"
         | 
| 14 14 | 
             
                      end
         | 
| 15 15 | 
             
                  end
         | 
| 16 16 |  | 
    
        data/lib/xmlstats/version.rb
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | @@ -1,14 +1,14 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: xmlstats
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 1.3. | 
| 4 | 
            +
              version: 1.3.1
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Alex McHale
         | 
| 8 8 | 
             
            autorequire: 
         | 
| 9 9 | 
             
            bindir: bin
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date: 2013-08- | 
| 11 | 
            +
            date: 2013-08-22 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: bundler
         |