emmy-http-client 0.1.0
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 +7 -0
- data/.gitignore +9 -0
- data/.rspec +2 -0
- data/.travis.yml +3 -0
- data/Gemfile +7 -0
- data/LICENSE.txt +21 -0
- data/README.md +56 -0
- data/Rakefile +1 -0
- data/TODO.md +3 -0
- data/bin/console +14 -0
- data/bin/setup +7 -0
- data/emmy-http-client.gemspec +29 -0
- data/lib/emmy_http/client.rb +20 -0
- data/lib/emmy_http/client/adapter.rb +19 -0
- data/lib/emmy_http/client/agent.rb +5 -0
- data/lib/emmy_http/client/client.rb +204 -0
- data/lib/emmy_http/client/cookie.rb +21 -0
- data/lib/emmy_http/client/encoding.rb +31 -0
- data/lib/emmy_http/client/monitor.rb +38 -0
- data/lib/emmy_http/client/parser.rb +60 -0
- data/lib/emmy_http/client/version.rb +5 -0
- metadata +148 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: e70c6816ddbf44129408eec3794af3c2fa080186
|
4
|
+
data.tar.gz: a905a21cf3b62df621016d2103a16ade3837efa2
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 12a64477a419e0111d6b03d508ca10bf800fa6cd92badf4f0a33af60ae6f1eaf2a4f3a7870767dbbf7870a2aa558735b55699cfad383d59b6becca9854697660
|
7
|
+
data.tar.gz: 56afff0f431c34a2b8303c8cb1d7e17f42bb3d7db1e6de164b0ea9b88357a4e4a98a5a64243fd6c8823b81f1ac49b167d4559a4eab4cefa85d8e70810e20e0bb
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.travis.yml
ADDED
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2015 che
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,56 @@
|
|
1
|
+
# Emmy::Http::Client
|
2
|
+
|
3
|
+
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/emmy/http/client`. To experiment with that code, run `bin/console` for an interactive prompt.
|
4
|
+
|
5
|
+
TODO: Delete this and the text above, and describe your gem
|
6
|
+
|
7
|
+
## Installation
|
8
|
+
|
9
|
+
Add this line to your application's Gemfile:
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
gem 'emmy-http-client'
|
13
|
+
```
|
14
|
+
|
15
|
+
And then execute:
|
16
|
+
|
17
|
+
$ bundle
|
18
|
+
|
19
|
+
Or install it yourself as:
|
20
|
+
|
21
|
+
$ gem install emmy-http-client
|
22
|
+
|
23
|
+
## Usage
|
24
|
+
|
25
|
+
Long way,
|
26
|
+
|
27
|
+
```ruby
|
28
|
+
request = EmmyHttp::Request.new(url: "http://google.com")
|
29
|
+
operation = EmmyHttp::Operation.new(request, EmmyHttp::Client::Adapter)
|
30
|
+
response = operation.sync
|
31
|
+
```
|
32
|
+
|
33
|
+
Short way,
|
34
|
+
|
35
|
+
```ruby
|
36
|
+
response = Emmy.http_request(url: "http://google.com").sync
|
37
|
+
```
|
38
|
+
|
39
|
+
|
40
|
+
```ruby
|
41
|
+
request = Emmy.http.defauls(post: "http://google.com", body: {param: 'foo'})
|
42
|
+
```
|
43
|
+
|
44
|
+
## Development
|
45
|
+
|
46
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `bin/console` for an interactive prompt that will allow you to experiment.
|
47
|
+
|
48
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release` to create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
49
|
+
|
50
|
+
## Contributing
|
51
|
+
|
52
|
+
1. Fork it ( https://github.com/inre/emmy-http-client/fork )
|
53
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
54
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
55
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
56
|
+
5. Create a new Pull Request
|
data/Rakefile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require "bundler/gem_tasks"
|
data/TODO.md
ADDED
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "emmy_http/client"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start
|
data/bin/setup
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'emmy_http/client/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "emmy-http-client"
|
8
|
+
spec.version = EmmyHttp::Client::VERSION
|
9
|
+
spec.authors = ["inre"]
|
10
|
+
spec.email = ["inre.storm@gmail.com"]
|
11
|
+
|
12
|
+
spec.summary = %q{HTTP request client}
|
13
|
+
spec.description = %q{EventMachine-based HTTP request client}
|
14
|
+
#spec.homepage = ""
|
15
|
+
spec.license = "MIT"
|
16
|
+
|
17
|
+
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
18
|
+
spec.bindir = "exe"
|
19
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
20
|
+
spec.require_paths = ["lib"]
|
21
|
+
|
22
|
+
spec.add_dependency "event_object"
|
23
|
+
spec.add_dependency "fibre"
|
24
|
+
spec.add_dependency "emmy-machine"
|
25
|
+
spec.add_dependency "emmy-http"
|
26
|
+
|
27
|
+
spec.add_development_dependency "bundler", "~> 1.9"
|
28
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
29
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
require 'event_object'
|
2
|
+
require 'emmy_http'
|
3
|
+
require 'fibre'
|
4
|
+
require 'emmy_machine'
|
5
|
+
|
6
|
+
require "emmy_http/client/version"
|
7
|
+
require "emmy_http/client/cookie"
|
8
|
+
require "emmy_http/client/parser"
|
9
|
+
require "emmy_http/client/adapter"
|
10
|
+
require "emmy_http/client/client"
|
11
|
+
require "emmy_http/client/encoding"
|
12
|
+
|
13
|
+
module EmmyHttp
|
14
|
+
module Client
|
15
|
+
USER_AGENT = 'emmy-http'.freeze
|
16
|
+
HTTP_VERSION = 'HTTP/1.1'.freeze
|
17
|
+
|
18
|
+
autoload :Monitor, "emmy_http/client/monitor"
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
module EmmyHttp
|
2
|
+
class Client::Adapter
|
3
|
+
include EmmyHttp::Adapter
|
4
|
+
|
5
|
+
attr_accessor :operation
|
6
|
+
attr_accessor :client
|
7
|
+
|
8
|
+
def delegate=(operation)
|
9
|
+
@operation = operation
|
10
|
+
@client = Client::Client.new(operation.request, self)
|
11
|
+
end
|
12
|
+
|
13
|
+
def to_a
|
14
|
+
client.to_a
|
15
|
+
end
|
16
|
+
|
17
|
+
#<<<
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,204 @@
|
|
1
|
+
module EmmyHttp
|
2
|
+
class Client::Client
|
3
|
+
using EventObject
|
4
|
+
|
5
|
+
events :change
|
6
|
+
|
7
|
+
attr_accessor :url
|
8
|
+
attr_accessor :request
|
9
|
+
attr_accessor :response
|
10
|
+
attr_accessor :state
|
11
|
+
|
12
|
+
attr_accessor :connection
|
13
|
+
attr_accessor :operation
|
14
|
+
attr_accessor :adapter
|
15
|
+
attr_accessor :parser
|
16
|
+
|
17
|
+
attr_accessor :redirects
|
18
|
+
|
19
|
+
def initialize(request, adapter)
|
20
|
+
@request = request
|
21
|
+
@adapter = adapter
|
22
|
+
@operation = adapter.operation
|
23
|
+
@redirects = 0
|
24
|
+
#@cookie = Cookie.new
|
25
|
+
prepare_url
|
26
|
+
change_state(:idle)
|
27
|
+
end
|
28
|
+
|
29
|
+
|
30
|
+
def initialize_connection(conn)
|
31
|
+
@connection = conn
|
32
|
+
@parser = Client::Parser.new
|
33
|
+
#@parser.header_value_type = :mixed
|
34
|
+
client = self
|
35
|
+
|
36
|
+
conn.pending_connect_timeout = request.timeouts.connect
|
37
|
+
conn.comm_inactivity_timeout = request.timeouts.inactivity
|
38
|
+
|
39
|
+
conn.on :connect do
|
40
|
+
send_request
|
41
|
+
change_state(:wait_response)
|
42
|
+
end
|
43
|
+
|
44
|
+
conn.on :data do |chunk|
|
45
|
+
begin
|
46
|
+
parser << chunk
|
47
|
+
rescue EmmyHttp::ParserError => e
|
48
|
+
conn.error!(e.message)
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
52
|
+
conn.on :close do
|
53
|
+
if state == :body && !client.response.content_length?
|
54
|
+
client.response.finish
|
55
|
+
end
|
56
|
+
|
57
|
+
if client.response && client.response.redirection?
|
58
|
+
change_state(:redirect)
|
59
|
+
client.url = URI(client.response.location)
|
60
|
+
client.response = nil
|
61
|
+
parser.reset!
|
62
|
+
operation.reconnect
|
63
|
+
end
|
64
|
+
|
65
|
+
if client.response && client.response.finished?
|
66
|
+
change_state(:success)
|
67
|
+
operation.success!(response, operation, connection)
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
71
|
+
conn.on :error do |message|
|
72
|
+
change_state(:catch_error)
|
73
|
+
end
|
74
|
+
|
75
|
+
conn.on :handshake do
|
76
|
+
|
77
|
+
end
|
78
|
+
|
79
|
+
conn.on :verify_peer do
|
80
|
+
|
81
|
+
end
|
82
|
+
|
83
|
+
parser.on :head do |headers|
|
84
|
+
#parser.http_version
|
85
|
+
change_state(:body)
|
86
|
+
client.response = EmmyHttp::Response.new(
|
87
|
+
status: parser.status_code, # for responses
|
88
|
+
headers: headers,
|
89
|
+
body: ''
|
90
|
+
)
|
91
|
+
operation.head!(response, operation, connection)
|
92
|
+
#parser.reset = true if request.no_body?
|
93
|
+
end
|
94
|
+
|
95
|
+
parser.on :body do |chunk|
|
96
|
+
response.data!(chunk)
|
97
|
+
end
|
98
|
+
|
99
|
+
parser.on :completed do
|
100
|
+
client.response.finish
|
101
|
+
stop
|
102
|
+
end
|
103
|
+
|
104
|
+
change_state(:wait_connect)
|
105
|
+
end
|
106
|
+
|
107
|
+
def send_request
|
108
|
+
headers = {}
|
109
|
+
body = prepare_body(headers)
|
110
|
+
|
111
|
+
prepare_headers(headers)
|
112
|
+
send_http_request(headers, body)
|
113
|
+
end
|
114
|
+
|
115
|
+
def prepare_url
|
116
|
+
@url = request.url
|
117
|
+
@url.path = request.path.to_s if request.path
|
118
|
+
@url.query = request.query.is_a?(Hash) ? Encoding.query(request.query) : request.query.to_s if request.query
|
119
|
+
end
|
120
|
+
|
121
|
+
def prepare_body(headers)
|
122
|
+
body, form, json, file = request.body, request.form, request.json, request.file
|
123
|
+
|
124
|
+
if body
|
125
|
+
raise "body cannot be hash use form attribute instead" if body.is_a?(Hash)
|
126
|
+
body_text = body.is_a?(Array) ? body.join : body.to_s
|
127
|
+
headers['Content-Length'] = body_text.bytesize
|
128
|
+
body_text
|
129
|
+
|
130
|
+
elsif form
|
131
|
+
form_encoded = form.is_a?(String) ? form : Encoding.www_form(form)
|
132
|
+
body_text = Encoding.rfc3986(form_encoded)
|
133
|
+
headers['Content-Type'] = 'application/x-www-form-urlencoded'
|
134
|
+
headers['Content-Length'] = body_text.bytesize
|
135
|
+
body_text
|
136
|
+
|
137
|
+
elsif json
|
138
|
+
json_string = json.is_a?(String) ? json : (json.respond_to?(:to_json) ? json.to_json : JSON.dump(json))
|
139
|
+
headers['Content-Length'] = json_string.size
|
140
|
+
headers['Content-Type'] = 'application/json'
|
141
|
+
json_string
|
142
|
+
|
143
|
+
elsif file
|
144
|
+
headers['Content-Length'] = File.size(file)
|
145
|
+
nil
|
146
|
+
else
|
147
|
+
headers['Content-Length'] = 0 if %w('POST PUT').include? request.type
|
148
|
+
'' # empty body
|
149
|
+
end
|
150
|
+
end
|
151
|
+
|
152
|
+
def prepare_headers(headers)
|
153
|
+
headers.merge!(EmmyHttp::Utils.convert_headers(request.headers))
|
154
|
+
|
155
|
+
# TODO: proxy authorization
|
156
|
+
|
157
|
+
# TODO: cookie
|
158
|
+
|
159
|
+
headers['Connection'] = 'close' unless request.keep_alive?
|
160
|
+
headers['User-Agent'] = Client::USER_AGENT unless headers.key? 'User-Agent'
|
161
|
+
headers['Authorization'] = url.userinfo.split(/:/, 2) if url.userinfo
|
162
|
+
|
163
|
+
unless headers.key? 'Host'
|
164
|
+
headers['Host'] = url.host
|
165
|
+
headers['Host'] += ":#{uri.port}" unless (url.scheme == 'http' && url.port == 80) ||
|
166
|
+
(url.scheme == 'https' && url.port == 443)
|
167
|
+
end
|
168
|
+
end
|
169
|
+
|
170
|
+
def send_http_request(headers, body)
|
171
|
+
|
172
|
+
# Send headers
|
173
|
+
|
174
|
+
head = "#{request.type.upcase} #{url_path} #{Client::HTTP_VERSION}\r\n"
|
175
|
+
head = headers.inject(head) { |r, (k, v)| "#{r}#{k}:#{v}\r\n" }
|
176
|
+
head += "\r\n"
|
177
|
+
connection.send_data head
|
178
|
+
|
179
|
+
# Send body
|
180
|
+
|
181
|
+
connection.send_data body if body
|
182
|
+
connection.send_stream_file_data request.file if request.file
|
183
|
+
end
|
184
|
+
|
185
|
+
def url_path
|
186
|
+
url.query ? '/' + url.path + '?' + url.query : '/' + url.path
|
187
|
+
end
|
188
|
+
|
189
|
+
def stop(reason='')
|
190
|
+
connection.close_connection if connection
|
191
|
+
end
|
192
|
+
|
193
|
+
def change_state(new_state)
|
194
|
+
@state = new_state
|
195
|
+
change!(state, self)
|
196
|
+
end
|
197
|
+
|
198
|
+
def to_a
|
199
|
+
["tcp://#{url.host}:#{url.port}", connection || EmmyMachine::Connection, method(:initialize_connection), self]
|
200
|
+
end
|
201
|
+
|
202
|
+
#<<<
|
203
|
+
end
|
204
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
module EmmyHttp
|
2
|
+
class Client::Cookie
|
3
|
+
|
4
|
+
attr_accessor :conductor
|
5
|
+
|
6
|
+
def initialize
|
7
|
+
@conductor = ::CookieJar::Jar.new
|
8
|
+
end
|
9
|
+
|
10
|
+
def set_cookie(uri, string)
|
11
|
+
@conductor.set_cookie(uri, string)
|
12
|
+
rescue nil
|
13
|
+
# ignore invalid cookies
|
14
|
+
end
|
15
|
+
|
16
|
+
def get_cookies(uri)
|
17
|
+
uri ? @jar.get_cookies(uri) : []
|
18
|
+
end
|
19
|
+
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
module EmmyHttp
|
2
|
+
module Encoding
|
3
|
+
extend self
|
4
|
+
|
5
|
+
def escape(str)
|
6
|
+
str.gsub(/([^a-zA-Z0-9_.-]+)/) { '%'+$1.unpack('H2'*$1.bytesize).join('%').upcase }
|
7
|
+
end
|
8
|
+
|
9
|
+
def rfc3986(str)
|
10
|
+
str.gsub(/([!'()*]+)/m) { '%'+$1.unpack('H2'*$1.bytesize).join('%').upcase }
|
11
|
+
end
|
12
|
+
|
13
|
+
def www_form(enum)
|
14
|
+
URI.encode_www_form(enum)
|
15
|
+
end
|
16
|
+
|
17
|
+
def query(query)
|
18
|
+
query.map { |k, v| param(k, v) }.join('&')
|
19
|
+
end
|
20
|
+
|
21
|
+
def param(k, v)
|
22
|
+
if v.is_a?(Array)
|
23
|
+
v.map { |e| escape(k) + "[]=" + escape(e) }.join("&")
|
24
|
+
else
|
25
|
+
escape(k) + "=" + escape(v)
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
#<<<
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
module EmmyHttp
|
2
|
+
class Client::Monitor
|
3
|
+
using EventObject
|
4
|
+
|
5
|
+
attr_accessor :logger
|
6
|
+
|
7
|
+
def bind(op)
|
8
|
+
@operation = op
|
9
|
+
|
10
|
+
# operation events
|
11
|
+
|
12
|
+
op.on :init do
|
13
|
+
logger.debug "connected"
|
14
|
+
end
|
15
|
+
|
16
|
+
op.on :head do
|
17
|
+
logger.debug "headers received"
|
18
|
+
end
|
19
|
+
|
20
|
+
op.on :success do |response, operation, conn|
|
21
|
+
logger.info("request success with status #{response.status}")
|
22
|
+
end
|
23
|
+
|
24
|
+
op.on :error do |message|
|
25
|
+
logger.error(message)
|
26
|
+
end
|
27
|
+
|
28
|
+
# client events
|
29
|
+
|
30
|
+
op.adapter.client.on :change do |state, client|
|
31
|
+
logger.debug "change state to #{state}"
|
32
|
+
end
|
33
|
+
|
34
|
+
end
|
35
|
+
|
36
|
+
#<<<
|
37
|
+
end
|
38
|
+
end
|
@@ -0,0 +1,60 @@
|
|
1
|
+
require 'http/parser'
|
2
|
+
|
3
|
+
module EmmyHttp
|
4
|
+
class Client::Parser
|
5
|
+
using EventObject
|
6
|
+
|
7
|
+
events :head, :body, :completed
|
8
|
+
|
9
|
+
attr_accessor :http_parser
|
10
|
+
attr_accessor :stop
|
11
|
+
attr_accessor :no_body
|
12
|
+
|
13
|
+
def initialize
|
14
|
+
@http_parser = HTTP::Parser.new
|
15
|
+
@http_parser.header_value_type = :mixed
|
16
|
+
@http_parser.on_headers_complete = proc do
|
17
|
+
head!(http_parser.headers, http_parser)
|
18
|
+
stop ? :stop : (no_body ? :reset : nil)
|
19
|
+
end
|
20
|
+
@http_parser.on_body = proc do |chunk|
|
21
|
+
body!(chunk)
|
22
|
+
end
|
23
|
+
@http_parser.on_message_complete = proc do
|
24
|
+
completed!
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
def <<(data)
|
29
|
+
@http_parser << data
|
30
|
+
rescue HTTP::Parser::Error => e
|
31
|
+
raise EmmyHttp::ParserError, e.to_s
|
32
|
+
end
|
33
|
+
|
34
|
+
def status_code
|
35
|
+
@http_parser.status_code
|
36
|
+
end
|
37
|
+
|
38
|
+
def http_method
|
39
|
+
@http_parser.http_method
|
40
|
+
end
|
41
|
+
|
42
|
+
def headers
|
43
|
+
@http_parser.headers
|
44
|
+
end
|
45
|
+
|
46
|
+
def http_version
|
47
|
+
@http_parser.http_version
|
48
|
+
end
|
49
|
+
|
50
|
+
def request_url
|
51
|
+
@http_parser.request_url
|
52
|
+
end
|
53
|
+
|
54
|
+
def reset!
|
55
|
+
@http_parser.reset!
|
56
|
+
end
|
57
|
+
|
58
|
+
#<<<
|
59
|
+
end
|
60
|
+
end
|
metadata
ADDED
@@ -0,0 +1,148 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: emmy-http-client
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- inre
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-04-19 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: event_object
|
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
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: fibre
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: emmy-machine
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: emmy-http
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: bundler
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '1.9'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '1.9'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: rake
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '10.0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '10.0'
|
97
|
+
description: EventMachine-based HTTP request client
|
98
|
+
email:
|
99
|
+
- inre.storm@gmail.com
|
100
|
+
executables: []
|
101
|
+
extensions: []
|
102
|
+
extra_rdoc_files: []
|
103
|
+
files:
|
104
|
+
- ".gitignore"
|
105
|
+
- ".rspec"
|
106
|
+
- ".travis.yml"
|
107
|
+
- Gemfile
|
108
|
+
- LICENSE.txt
|
109
|
+
- README.md
|
110
|
+
- Rakefile
|
111
|
+
- TODO.md
|
112
|
+
- bin/console
|
113
|
+
- bin/setup
|
114
|
+
- emmy-http-client.gemspec
|
115
|
+
- lib/emmy_http/client.rb
|
116
|
+
- lib/emmy_http/client/adapter.rb
|
117
|
+
- lib/emmy_http/client/agent.rb
|
118
|
+
- lib/emmy_http/client/client.rb
|
119
|
+
- lib/emmy_http/client/cookie.rb
|
120
|
+
- lib/emmy_http/client/encoding.rb
|
121
|
+
- lib/emmy_http/client/monitor.rb
|
122
|
+
- lib/emmy_http/client/parser.rb
|
123
|
+
- lib/emmy_http/client/version.rb
|
124
|
+
homepage:
|
125
|
+
licenses:
|
126
|
+
- MIT
|
127
|
+
metadata: {}
|
128
|
+
post_install_message:
|
129
|
+
rdoc_options: []
|
130
|
+
require_paths:
|
131
|
+
- lib
|
132
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
133
|
+
requirements:
|
134
|
+
- - ">="
|
135
|
+
- !ruby/object:Gem::Version
|
136
|
+
version: '0'
|
137
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
138
|
+
requirements:
|
139
|
+
- - ">="
|
140
|
+
- !ruby/object:Gem::Version
|
141
|
+
version: '0'
|
142
|
+
requirements: []
|
143
|
+
rubyforge_project:
|
144
|
+
rubygems_version: 2.4.3
|
145
|
+
signing_key:
|
146
|
+
specification_version: 4
|
147
|
+
summary: HTTP request client
|
148
|
+
test_files: []
|