protocol-http 0.20.0 → 0.20.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.editorconfig +0 -1
- data/.github/workflows/development.yml +44 -0
- data/.gitignore +2 -1
- data/README.md +13 -13
- data/bake.rb +37 -0
- data/{Gemfile → gems.rb} +5 -0
- data/lib/protocol/http/body/buffered.rb +1 -0
- data/lib/protocol/http/version.rb +1 -1
- data/protocol-http.gemspec +1 -2
- metadata +11 -24
- data/.travis.yml +0 -22
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5f14e6a0192840efd07d2ba8e8e3a8bd9312eb5fa8b976f1e12baaf14ee49696
|
4
|
+
data.tar.gz: 2548bc880b20a5e162cad7fdcbbece9a0cdfae429861b8a5f1bbd68cf904cb9b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b1e6692c96818aed1ed11c02b976169598ba9df9afc1f73109745168f62d85a75b6bf9abe530cac1daa39a3a40b5a815e06280581d8912b6c32f7e488f35fac0
|
7
|
+
data.tar.gz: 747e961c97c027258a46fbbd70f9845eead55d0c3dc6d108dae0083b99693bf5384f3868c9d50e5270d06337341879d265dc362a7907a16d22ecca73149e8223
|
data/.editorconfig
CHANGED
@@ -0,0 +1,44 @@
|
|
1
|
+
name: Development
|
2
|
+
|
3
|
+
on: [push, pull_request]
|
4
|
+
|
5
|
+
jobs:
|
6
|
+
test:
|
7
|
+
runs-on: ${{matrix.os}}-latest
|
8
|
+
continue-on-error: ${{matrix.experimental}}
|
9
|
+
|
10
|
+
strategy:
|
11
|
+
matrix:
|
12
|
+
os:
|
13
|
+
- ubuntu
|
14
|
+
- macos
|
15
|
+
|
16
|
+
ruby:
|
17
|
+
- 2.5
|
18
|
+
- 2.6
|
19
|
+
- 2.7
|
20
|
+
|
21
|
+
experimental: [false]
|
22
|
+
env: [""]
|
23
|
+
|
24
|
+
include:
|
25
|
+
- os: ubuntu
|
26
|
+
ruby: truffleruby
|
27
|
+
experimental: true
|
28
|
+
- os: ubuntu
|
29
|
+
ruby: jruby
|
30
|
+
experimental: true
|
31
|
+
- os: ubuntu
|
32
|
+
ruby: head
|
33
|
+
experimental: true
|
34
|
+
|
35
|
+
steps:
|
36
|
+
- uses: actions/checkout@v2
|
37
|
+
- uses: ioquatix/setup-ruby@master
|
38
|
+
with:
|
39
|
+
ruby-version: ${{matrix.ruby}}
|
40
|
+
bundler-cache: true
|
41
|
+
|
42
|
+
- name: Run tests
|
43
|
+
timeout-minutes: 5
|
44
|
+
run: ${{matrix.env}} bundle exec rspec
|
data/.gitignore
CHANGED
data/README.md
CHANGED
@@ -2,29 +2,29 @@
|
|
2
2
|
|
3
3
|
Provides abstractions for working with the HTTP protocol.
|
4
4
|
|
5
|
-
[![
|
5
|
+
[![Development Status](https://github.com/socketry/protocol-http/workflows/Development/badge.svg)](https://github.com/socketry/protocol-http/actions?workflow=Development)
|
6
6
|
|
7
7
|
## Installation
|
8
8
|
|
9
9
|
Add this line to your application's Gemfile:
|
10
10
|
|
11
|
-
```ruby
|
11
|
+
``` ruby
|
12
12
|
gem 'protocol-http'
|
13
13
|
```
|
14
14
|
|
15
15
|
And then execute:
|
16
16
|
|
17
|
-
|
17
|
+
$ bundle
|
18
18
|
|
19
19
|
Or install it yourself as:
|
20
20
|
|
21
|
-
|
21
|
+
$ gem install protocol-http
|
22
22
|
|
23
23
|
## Usage
|
24
24
|
|
25
25
|
### Headers
|
26
26
|
|
27
|
-
```ruby
|
27
|
+
``` ruby
|
28
28
|
require 'protocol/http/headers'
|
29
29
|
|
30
30
|
headers = Protocol::HTTP::Headers.new
|
@@ -37,7 +37,7 @@ headers['content-type']
|
|
37
37
|
|
38
38
|
### Reference
|
39
39
|
|
40
|
-
```ruby
|
40
|
+
``` ruby
|
41
41
|
require 'protocol/http/reference'
|
42
42
|
|
43
43
|
reference = Protocol::HTTP::Reference.new("/search", q: 'kittens')
|
@@ -48,7 +48,7 @@ reference.to_s
|
|
48
48
|
|
49
49
|
### URL
|
50
50
|
|
51
|
-
```ruby
|
51
|
+
``` ruby
|
52
52
|
require 'protocol/http/url'
|
53
53
|
|
54
54
|
reference = Protocol::HTTP::Reference.parse("/search?q=kittens")
|
@@ -59,17 +59,17 @@ parameters = Protocol::HTTP::URL.decode(reference.query_string)
|
|
59
59
|
|
60
60
|
## Contributing
|
61
61
|
|
62
|
-
1.
|
63
|
-
2.
|
64
|
-
3.
|
65
|
-
4.
|
66
|
-
5.
|
62
|
+
1. Fork it
|
63
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
64
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
65
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
66
|
+
5. Create new Pull Request
|
67
67
|
|
68
68
|
## License
|
69
69
|
|
70
70
|
Released under the MIT license.
|
71
71
|
|
72
|
-
Copyright, 2019, by [Samuel G. D. Williams](http://www.codeotaku.com/samuel-williams).
|
72
|
+
Copyright, 2019, by [Samuel G. D. Williams](http://www.codeotaku.com/samuel-williams).
|
73
73
|
|
74
74
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
75
75
|
of this software and associated documentation files (the "Software"), to deal
|
data/bake.rb
ADDED
@@ -0,0 +1,37 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
def external
|
4
|
+
require 'bundler'
|
5
|
+
|
6
|
+
Bundler.with_unbundled_env do
|
7
|
+
clone_and_test("protocol-http1")
|
8
|
+
clone_and_test("protocol-http2")
|
9
|
+
clone_and_test("async-websocket")
|
10
|
+
clone_and_test("async-http")
|
11
|
+
clone_and_test("async-rest")
|
12
|
+
clone_and_test("falcon")
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
private
|
17
|
+
|
18
|
+
def clone_and_test(name)
|
19
|
+
path = "external/#{name}"
|
20
|
+
|
21
|
+
unless File.exist?(path)
|
22
|
+
system("git", "clone", "https://git@github.com/socketry/#{name}", path)
|
23
|
+
end
|
24
|
+
|
25
|
+
gemfile = [
|
26
|
+
File.join(path, "gems.rb"),
|
27
|
+
File.join(path, "Gemfile"),
|
28
|
+
].find{|path| File.exist?(path)}
|
29
|
+
|
30
|
+
system("git", "checkout", "-f", File.basename(gemfile), chdir: path)
|
31
|
+
|
32
|
+
File.open(gemfile, "a") do |file|
|
33
|
+
file.puts('', 'gem "protocol-http", path: "../../"')
|
34
|
+
end
|
35
|
+
|
36
|
+
system("bundle install && bundle exec rspec", chdir: path)
|
37
|
+
end
|
data/{Gemfile → gems.rb}
RENAMED
data/protocol-http.gemspec
CHANGED
@@ -15,12 +15,11 @@ Gem::Specification.new do |spec|
|
|
15
15
|
f.match(%r{^(test|spec|features)/})
|
16
16
|
end
|
17
17
|
|
18
|
-
spec.required_ruby_version = '
|
18
|
+
spec.required_ruby_version = '>= 2.5'
|
19
19
|
|
20
20
|
spec.require_paths = ["lib"]
|
21
21
|
|
22
22
|
spec.add_development_dependency "covered"
|
23
23
|
spec.add_development_dependency "bundler"
|
24
|
-
spec.add_development_dependency "bake-bundler"
|
25
24
|
spec.add_development_dependency "rspec"
|
26
25
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: protocol-http
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.20.
|
4
|
+
version: 0.20.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Williams
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-09-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: covered
|
@@ -38,20 +38,6 @@ dependencies:
|
|
38
38
|
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
|
-
- !ruby/object:Gem::Dependency
|
42
|
-
name: bake-bundler
|
43
|
-
requirement: !ruby/object:Gem::Requirement
|
44
|
-
requirements:
|
45
|
-
- - ">="
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
version: '0'
|
48
|
-
type: :development
|
49
|
-
prerelease: false
|
50
|
-
version_requirements: !ruby/object:Gem::Requirement
|
51
|
-
requirements:
|
52
|
-
- - ">="
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
version: '0'
|
55
41
|
- !ruby/object:Gem::Dependency
|
56
42
|
name: rspec
|
57
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -66,7 +52,7 @@ dependencies:
|
|
66
52
|
- - ">="
|
67
53
|
- !ruby/object:Gem::Version
|
68
54
|
version: '0'
|
69
|
-
description:
|
55
|
+
description:
|
70
56
|
email:
|
71
57
|
- samuel.williams@oriontransfer.co.nz
|
72
58
|
executables: []
|
@@ -74,11 +60,12 @@ extensions: []
|
|
74
60
|
extra_rdoc_files: []
|
75
61
|
files:
|
76
62
|
- ".editorconfig"
|
63
|
+
- ".github/workflows/development.yml"
|
77
64
|
- ".gitignore"
|
78
65
|
- ".rspec"
|
79
|
-
- ".travis.yml"
|
80
|
-
- Gemfile
|
81
66
|
- README.md
|
67
|
+
- bake.rb
|
68
|
+
- gems.rb
|
82
69
|
- lib/protocol/http.rb
|
83
70
|
- lib/protocol/http/accept_encoding.rb
|
84
71
|
- lib/protocol/http/body/buffered.rb
|
@@ -119,13 +106,13 @@ homepage: https://github.com/socketry/protocol-http
|
|
119
106
|
licenses:
|
120
107
|
- MIT
|
121
108
|
metadata: {}
|
122
|
-
post_install_message:
|
109
|
+
post_install_message:
|
123
110
|
rdoc_options: []
|
124
111
|
require_paths:
|
125
112
|
- lib
|
126
113
|
required_ruby_version: !ruby/object:Gem::Requirement
|
127
114
|
requirements:
|
128
|
-
- - "
|
115
|
+
- - ">="
|
129
116
|
- !ruby/object:Gem::Version
|
130
117
|
version: '2.5'
|
131
118
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
@@ -134,8 +121,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
134
121
|
- !ruby/object:Gem::Version
|
135
122
|
version: '0'
|
136
123
|
requirements: []
|
137
|
-
rubygems_version: 3.
|
138
|
-
signing_key:
|
124
|
+
rubygems_version: 3.0.3
|
125
|
+
signing_key:
|
139
126
|
specification_version: 4
|
140
127
|
summary: Provides abstractions to handle HTTP protocols.
|
141
128
|
test_files: []
|
data/.travis.yml
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
language: ruby
|
2
|
-
dist: xenial
|
3
|
-
cache: bundler
|
4
|
-
|
5
|
-
script: bundle exec rspec
|
6
|
-
|
7
|
-
matrix:
|
8
|
-
include:
|
9
|
-
- rvm: 2.5
|
10
|
-
- rvm: 2.6
|
11
|
-
- rvm: 2.7
|
12
|
-
- rvm: 2.6
|
13
|
-
env: COVERAGE=PartialSummary,Coveralls
|
14
|
-
- rvm: 2.7
|
15
|
-
- rvm: truffleruby
|
16
|
-
- rvm: jruby-head
|
17
|
-
env: JRUBY_OPTS="--debug -X+O"
|
18
|
-
- rvm: ruby-head
|
19
|
-
allow_failures:
|
20
|
-
- rvm: truffleruby
|
21
|
-
- rvm: ruby-head
|
22
|
-
- rvm: jruby-head
|