cacho 0.1.2 → 0.1.3
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/CHANGELOG.md +7 -0
- data/lib/cacho.rb +4 -2
- metadata +8 -8
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA1:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 3741a49cac4a93a6dfa3dc9991d85596812edc13
         | 
| 4 | 
            +
              data.tar.gz: 0ea36ac0ed861cafe4aef83c326dd03e3a125853
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 0daaeeb292e934926a605ec7d72f3c603f1b53d595865cfd0322f2609a4496a043e5aadc402be34041655ebc99cc1216788dfbea25515d922eeac0ce0b8d61e6
         | 
| 7 | 
            +
              data.tar.gz: 9d973152992c2c71bccab7603e83abd4a30b5017d0a646ed2ee8318cc8d34069949f761c19a0186e643b3a158858bd29c8db776d1eddd96557a5b5ee74c7f50d
         | 
    
        data/CHANGELOG.md
    CHANGED
    
    
    
        data/lib/cacho.rb
    CHANGED
    
    | @@ -7,7 +7,7 @@ require "csv" | |
| 7 7 | 
             
            require "fileutils"
         | 
| 8 8 |  | 
| 9 9 | 
             
            class Cacho
         | 
| 10 | 
            -
              VERSION = "0.1. | 
| 10 | 
            +
              VERSION = "0.1.3"
         | 
| 11 11 |  | 
| 12 12 | 
             
              attr_accessor :hasher
         | 
| 13 13 |  | 
| @@ -60,6 +60,8 @@ class Cacho::Client | |
| 60 60 |  | 
| 61 61 | 
             
                  @callbacks[:before_request].(request) if @callbacks[:before_request]
         | 
| 62 62 |  | 
| 63 | 
            +
                  request["User-Agent"] = "Mozilla/5.0 (X11; Linux i586; rv:31.0) Gecko/20100101 Firefox/31.0"
         | 
| 64 | 
            +
             | 
| 63 65 | 
             
                  if options.include?(:headers)
         | 
| 64 66 | 
             
                    options[:headers].each do |key, value|
         | 
| 65 67 | 
             
                      request[key] = value
         | 
| @@ -69,7 +71,7 @@ class Cacho::Client | |
| 69 71 | 
             
                  request["Accept-Encoding"] = "gzip"
         | 
| 70 72 |  | 
| 71 73 | 
             
                  if verb == :post
         | 
| 72 | 
            -
                    post_data = options.fetch(:data)
         | 
| 74 | 
            +
                    post_data = options.fetch(:data, {})
         | 
| 73 75 |  | 
| 74 76 | 
             
                    case options[:content_type]
         | 
| 75 77 | 
             
                    when :json
         | 
    
        metadata
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: cacho
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 0.1. | 
| 4 | 
            +
              version: 0.1.3
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Damian Janowski
         | 
| @@ -9,20 +9,20 @@ authors: | |
| 9 9 | 
             
            autorequire: 
         | 
| 10 10 | 
             
            bindir: bin
         | 
| 11 11 | 
             
            cert_chain: []
         | 
| 12 | 
            -
            date:  | 
| 12 | 
            +
            date: 2015-06-25 00:00:00.000000000 Z
         | 
| 13 13 | 
             
            dependencies:
         | 
| 14 14 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 15 15 | 
             
              name: net-http-persistent
         | 
| 16 16 | 
             
              requirement: !ruby/object:Gem::Requirement
         | 
| 17 17 | 
             
                requirements:
         | 
| 18 | 
            -
                - -  | 
| 18 | 
            +
                - - '>='
         | 
| 19 19 | 
             
                  - !ruby/object:Gem::Version
         | 
| 20 20 | 
             
                    version: '0'
         | 
| 21 21 | 
             
              type: :runtime
         | 
| 22 22 | 
             
              prerelease: false
         | 
| 23 23 | 
             
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 24 24 | 
             
                requirements:
         | 
| 25 | 
            -
                - -  | 
| 25 | 
            +
                - - '>='
         | 
| 26 26 | 
             
                  - !ruby/object:Gem::Version
         | 
| 27 27 | 
             
                    version: '0'
         | 
| 28 28 | 
             
            description: A careless caching client optimized for scraping.
         | 
| @@ -33,7 +33,7 @@ executables: [] | |
| 33 33 | 
             
            extensions: []
         | 
| 34 34 | 
             
            extra_rdoc_files: []
         | 
| 35 35 | 
             
            files:
         | 
| 36 | 
            -
            -  | 
| 36 | 
            +
            - .gitignore
         | 
| 37 37 | 
             
            - CHANGELOG.md
         | 
| 38 38 | 
             
            - README.md
         | 
| 39 39 | 
             
            - Rakefile
         | 
| @@ -50,17 +50,17 @@ require_paths: | |
| 50 50 | 
             
            - lib
         | 
| 51 51 | 
             
            required_ruby_version: !ruby/object:Gem::Requirement
         | 
| 52 52 | 
             
              requirements:
         | 
| 53 | 
            -
              - -  | 
| 53 | 
            +
              - - '>='
         | 
| 54 54 | 
             
                - !ruby/object:Gem::Version
         | 
| 55 55 | 
             
                  version: '0'
         | 
| 56 56 | 
             
            required_rubygems_version: !ruby/object:Gem::Requirement
         | 
| 57 57 | 
             
              requirements:
         | 
| 58 | 
            -
              - -  | 
| 58 | 
            +
              - - '>='
         | 
| 59 59 | 
             
                - !ruby/object:Gem::Version
         | 
| 60 60 | 
             
                  version: '0'
         | 
| 61 61 | 
             
            requirements: []
         | 
| 62 62 | 
             
            rubyforge_project: 
         | 
| 63 | 
            -
            rubygems_version: 2. | 
| 63 | 
            +
            rubygems_version: 2.4.6
         | 
| 64 64 | 
             
            signing_key: 
         | 
| 65 65 | 
             
            specification_version: 4
         | 
| 66 66 | 
             
            summary: A careless caching client optimized for scraping.
         |