net-http 0.1.1 → 0.4.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/Gemfile +2 -0
- data/README.md +1 -1
- data/Rakefile +0 -7
- data/doc/net-http/examples.rdoc +31 -0
- data/doc/net-http/included_getters.rdoc +3 -0
- data/lib/net/http/backward.rb +27 -13
- data/lib/net/http/exceptions.rb +28 -27
- data/lib/net/http/generic_request.rb +96 -21
- data/lib/net/http/header.rb +628 -163
- data/lib/net/http/proxy_delta.rb +1 -1
- data/lib/net/http/request.rb +73 -6
- data/lib/net/http/requests.rb +327 -25
- data/lib/net/http/response.rb +339 -28
- data/lib/net/http/responses.rb +1090 -223
- data/lib/net/http/status.rb +7 -6
- data/lib/net/http.rb +1458 -668
- data/lib/net/https.rb +1 -1
- data/net-http.gemspec +9 -6
- metadata +5 -20
- data/.github/workflows/test.yml +0 -24
- data/.gitignore +0 -8
- data/Gemfile.lock +0 -23
    
        data/lib/net/https.rb
    CHANGED
    
    
    
        data/net-http.gemspec
    CHANGED
    
    | @@ -2,9 +2,14 @@ | |
| 2 2 |  | 
| 3 3 | 
             
            name = File.basename(__FILE__, ".gemspec")
         | 
| 4 4 | 
             
            version = ["lib", Array.new(name.count("-")+1, "..").join("/")].find do |dir|
         | 
| 5 | 
            -
               | 
| 6 | 
            -
             | 
| 7 | 
            -
             | 
| 5 | 
            +
              file = File.join(__dir__, dir, "#{name.tr('-', '/')}.rb")
         | 
| 6 | 
            +
              begin
         | 
| 7 | 
            +
                break File.foreach(file, mode: "rb") do |line|
         | 
| 8 | 
            +
                  /^\s*VERSION\s*=\s*"(.*)"/ =~ line and break $1
         | 
| 9 | 
            +
                end
         | 
| 10 | 
            +
              rescue SystemCallError
         | 
| 11 | 
            +
                next
         | 
| 12 | 
            +
              end
         | 
| 8 13 | 
             
            end
         | 
| 9 14 |  | 
| 10 15 | 
             
            Gem::Specification.new do |spec|
         | 
| @@ -25,12 +30,10 @@ Gem::Specification.new do |spec| | |
| 25 30 | 
             
              # Specify which files should be added to the gem when it is released.
         | 
| 26 31 | 
             
              # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
         | 
| 27 32 | 
             
              spec.files         = Dir.chdir(File.expand_path('..', __FILE__)) do
         | 
| 28 | 
            -
                `git ls-files -z 2 | 
| 33 | 
            +
                `git ls-files -z 2>#{IO::NULL}`.split("\x0").reject { |f| f.match(%r{\A(?:(?:test|spec|features)/|\.git)}) }
         | 
| 29 34 | 
             
              end
         | 
| 30 35 | 
             
              spec.bindir        = "exe"
         | 
| 31 | 
            -
              spec.executables   = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
         | 
| 32 36 | 
             
              spec.require_paths = ["lib"]
         | 
| 33 37 |  | 
| 34 | 
            -
              spec.add_dependency "net-protocol"
         | 
| 35 38 | 
             
              spec.add_dependency "uri"
         | 
| 36 39 | 
             
            end
         | 
    
        metadata
    CHANGED
    
    | @@ -1,29 +1,15 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: net-http
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 0. | 
| 4 | 
            +
              version: 0.4.1
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - NARUSE, Yui
         | 
| 8 8 | 
             
            autorequire:
         | 
| 9 9 | 
             
            bindir: exe
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date:  | 
| 11 | 
            +
            date: 2024-01-05 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 | 
            -
            - !ruby/object:Gem::Dependency
         | 
| 14 | 
            -
              name: net-protocol
         | 
| 15 | 
            -
              requirement: !ruby/object:Gem::Requirement
         | 
| 16 | 
            -
                requirements:
         | 
| 17 | 
            -
                - - ">="
         | 
| 18 | 
            -
                  - !ruby/object:Gem::Version
         | 
| 19 | 
            -
                    version: '0'
         | 
| 20 | 
            -
              type: :runtime
         | 
| 21 | 
            -
              prerelease: false
         | 
| 22 | 
            -
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 23 | 
            -
                requirements:
         | 
| 24 | 
            -
                - - ">="
         | 
| 25 | 
            -
                  - !ruby/object:Gem::Version
         | 
| 26 | 
            -
                    version: '0'
         | 
| 27 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 28 14 | 
             
              name: uri
         | 
| 29 15 | 
             
              requirement: !ruby/object:Gem::Requirement
         | 
| @@ -45,15 +31,14 @@ executables: [] | |
| 45 31 | 
             
            extensions: []
         | 
| 46 32 | 
             
            extra_rdoc_files: []
         | 
| 47 33 | 
             
            files:
         | 
| 48 | 
            -
            - ".github/workflows/test.yml"
         | 
| 49 | 
            -
            - ".gitignore"
         | 
| 50 34 | 
             
            - Gemfile
         | 
| 51 | 
            -
            - Gemfile.lock
         | 
| 52 35 | 
             
            - LICENSE.txt
         | 
| 53 36 | 
             
            - README.md
         | 
| 54 37 | 
             
            - Rakefile
         | 
| 55 38 | 
             
            - bin/console
         | 
| 56 39 | 
             
            - bin/setup
         | 
| 40 | 
            +
            - doc/net-http/examples.rdoc
         | 
| 41 | 
            +
            - doc/net-http/included_getters.rdoc
         | 
| 57 42 | 
             
            - lib/net/http.rb
         | 
| 58 43 | 
             
            - lib/net/http/backward.rb
         | 
| 59 44 | 
             
            - lib/net/http/exceptions.rb
         | 
| @@ -89,7 +74,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement | |
| 89 74 | 
             
                - !ruby/object:Gem::Version
         | 
| 90 75 | 
             
                  version: '0'
         | 
| 91 76 | 
             
            requirements: []
         | 
| 92 | 
            -
            rubygems_version: 3. | 
| 77 | 
            +
            rubygems_version: 3.6.0.dev
         | 
| 93 78 | 
             
            signing_key:
         | 
| 94 79 | 
             
            specification_version: 4
         | 
| 95 80 | 
             
            summary: HTTP client api for Ruby.
         | 
    
        data/.github/workflows/test.yml
    DELETED
    
    | @@ -1,24 +0,0 @@ | |
| 1 | 
            -
            name: ubuntu
         | 
| 2 | 
            -
             | 
| 3 | 
            -
            on: [push, pull_request]
         | 
| 4 | 
            -
             | 
| 5 | 
            -
            jobs:
         | 
| 6 | 
            -
              build:
         | 
| 7 | 
            -
                name: build (${{ matrix.ruby }} / ${{ matrix.os }})
         | 
| 8 | 
            -
                strategy:
         | 
| 9 | 
            -
                  matrix:
         | 
| 10 | 
            -
                    ruby: [ 2.7, 2.6, head ]
         | 
| 11 | 
            -
                    os: [ ubuntu-latest, macos-latest ]
         | 
| 12 | 
            -
                runs-on: ${{ matrix.os }}
         | 
| 13 | 
            -
                steps:
         | 
| 14 | 
            -
                - uses: actions/checkout@master
         | 
| 15 | 
            -
                - name: Set up Ruby
         | 
| 16 | 
            -
                  uses: ruby/setup-ruby@v1
         | 
| 17 | 
            -
                  with:
         | 
| 18 | 
            -
                    ruby-version: ${{ matrix.ruby }}
         | 
| 19 | 
            -
                - name: Install dependencies
         | 
| 20 | 
            -
                  run: |
         | 
| 21 | 
            -
                    gem install bundler --no-document
         | 
| 22 | 
            -
                    bundle install
         | 
| 23 | 
            -
                - name: Run test
         | 
| 24 | 
            -
                  run: rake test
         | 
    
        data/.gitignore
    DELETED
    
    
    
        data/Gemfile.lock
    DELETED
    
    | @@ -1,23 +0,0 @@ | |
| 1 | 
            -
            PATH
         | 
| 2 | 
            -
              remote: .
         | 
| 3 | 
            -
              specs:
         | 
| 4 | 
            -
                net-http (0.1.0)
         | 
| 5 | 
            -
             | 
| 6 | 
            -
            GEM
         | 
| 7 | 
            -
              remote: https://rubygems.org/
         | 
| 8 | 
            -
              specs:
         | 
| 9 | 
            -
                power_assert (1.1.5)
         | 
| 10 | 
            -
                rake (13.0.1)
         | 
| 11 | 
            -
                test-unit (3.3.5)
         | 
| 12 | 
            -
                  power_assert
         | 
| 13 | 
            -
             | 
| 14 | 
            -
            PLATFORMS
         | 
| 15 | 
            -
              ruby
         | 
| 16 | 
            -
             | 
| 17 | 
            -
            DEPENDENCIES
         | 
| 18 | 
            -
              net-http!
         | 
| 19 | 
            -
              rake
         | 
| 20 | 
            -
              test-unit
         | 
| 21 | 
            -
             | 
| 22 | 
            -
            BUNDLED WITH
         | 
| 23 | 
            -
               2.1.4
         |