debian/0000755000000000000000000000000012331154471007167 5ustar debian/changelog0000644000000000000000000000352012331154413011035 0ustar ruby-em-http-request (1.1.2-2) unstable; urgency=medium * Team upload [ Per Andersson ] * Add ruby-em-socksify to Depends (Closes: #745667) -- Per Andersson Wed, 23 Apr 2014 23:31:14 +0200 ruby-em-http-request (1.1.2-1) unstable; urgency=medium * Team upload. [ Praveen Arimbrathodiyil ] * d/p/disable_rubygems: - remove extra characters at end of line - refresh disable_rubygems patch * add .pc to .gitignore * use ruby-tests.rake * remove spec_adjust_require patch * d/control: - update build dep, uncomment vcs - add bdep on ruby-cookiejar [ Cédric Boutillier ] * use canonical URI in Vcs-* fields * debian/copyright: use copyright-format/1.0 official URL for Format field [ Jonas Genannt ] * Imported Upstream version 1.1.2 (Closes: #725571, #710044) * d/control: - bumped standards version to 3.9.5 (no changes needed) - wrap-sort - added depend ruby-multi-json - changed from ruby-http-parser to ruby-http-parser.rb - added ruby-cookiejar as depend - switched XS-Ruby-Versions to all - change Architecture to all - no c ext included anymore - added ruby-simple-oauth as Suggests * d/p/diasble-rubygems.patch: - refreshed - fixed typo in patch name - added DEP3 header * added patch to disable network test * added patch to usw WEBrick not Mongrel - webrick strips default ports - webrick sends no 0 as content lengh, its empty - disabled failing tests because of mongrel/webrick switch * d/copyright - removed old c ext copyright - copyright for debian/ is missing, see #739711 / pending -- Jonas Genannt Wed, 12 Mar 2014 18:42:14 +0100 ruby-em-http-request (0.3.0-1) unstable; urgency=low * Initial release -- Tollef Fog Heen Wed, 27 Jun 2012 21:19:09 +0200 debian/copyright0000644000000000000000000000234712331154333011125 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: em-http-request Source: https://github.com/igrigorik/em-http-request Files: * Copyright: 2011 Ilya Grigorik License: MIT Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: . The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. . THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. debian/control0000644000000000000000000000334412331154413010572 0ustar Source: ruby-em-http-request Section: ruby Priority: optional Maintainer: Debian Ruby Extras Maintainers Uploaders: Tollef Fog Heen Build-Depends: debhelper (>= 7.0.50~), gem2deb (>= 0.2.13~), ruby-addressable, ruby-cookiejar, ruby-em-socksify, ruby-escape-utils, ruby-eventmachine, ruby-http-parser.rb, ruby-rack, ruby-rspec, ruby-multi-json Standards-Version: 3.9.5 Vcs-Git: git://anonscm.debian.org/pkg-ruby-extras/ruby-em-http-request.git Vcs-Browser: http://anonscm.debian.org/gitweb?p=pkg-ruby-extras/ruby-em-http-request.git;a=summary Homepage: http://github.com/igrigorik/em-http-request XS-Ruby-Versions: all Package: ruby-em-http-request Architecture: all XB-Ruby-Versions: ${ruby:Versions} Depends: ruby | ruby-interpreter, ruby-addressable (>= 2.0.0), ruby-escape-utils, ruby-http-parser.rb, ruby-eventmachine (>= 0.12.9), ruby-em-socksify, ruby-multi-json, ruby-cookiejar, ${misc:Depends}, ${shlibs:Depends} Suggests: ruby-simple-oauth Description: EventMachine based, async HTTP Request client em-http-client is an asynchronous HTTP client based on EventMachine with support for: . * Asynchronous HTTP API for single & parallel request execution * Keep-Alive and HTTP pipelining support * Auto-follow 3xx redirects with max depth * Automatic gzip & deflate decoding * Streaming response processing * Streaming file uploads * HTTP proxy and SOCKS5 support * Basic Auth & OAuth * Connection-level & Global middleware support debian/ruby-em-http-request.docs0000644000000000000000000000001212265226454014064 0ustar README.md debian/patches/0000755000000000000000000000000012331154333010613 5ustar debian/patches/change_mongrel_to_webrick.patch0000644000000000000000000000635512331154333017025 0ustar Description: change to WEBrick, Mongrel is not available. Also change tests, because WEBrick strips default ports from .location changed and removed some tests, because WEBrick do stuff different. Bug: https://github.com/igrigorik/em-http-request/issues/263 Author: Jonas Genannt Forwarded: not-needed --- a/spec/stallion.rb +++ b/spec/stallion.rb @@ -2,6 +2,9 @@ # Includes portion originally Copyright (C)2008 Michael Fellinger # license See file LICENSE for details # #-- +Encoding.default_external = "UTF-8" +Encoding.default_internal = "UTF-8" + require 'rack' @@ -53,7 +56,7 @@ def self.run(options = {}) options = {:Host => "127.0.0.1", :Port => 8090}.merge(options) - Rack::Handler::Mongrel.run(Rack::Lint.new(self), options) + Rack::Handler::WEBrick.run(Rack::Lint.new(self), options) end def self.call(env) --- a/spec/redirect_spec.rb +++ b/spec/redirect_spec.rb @@ -345,7 +345,7 @@ conn = EventMachine::HttpRequest.new('http://127.0.0.1:8090/redirect/http_with_port') http = conn.get :redirects => 1 http.errback { - http.last_effective_url.to_s.should == 'http://host:80/' + http.last_effective_url.to_s.should == 'http://host/' EM.stop } } @@ -356,7 +356,7 @@ conn = EventMachine::HttpRequest.new('http://127.0.0.1:8090/redirect/https_with_port') http = conn.get :redirects => 1 http.errback { - http.last_effective_url.to_s.should == 'https://host:443/' + http.last_effective_url.to_s.should == 'https://host/' EM.stop } } --- a/spec/client_spec.rb +++ b/spec/client_spec.rb @@ -236,7 +236,7 @@ http.callback { http.response_header.status.should == 200 - http.response.strip.split(':')[1].should == '0' + http.response.strip.split(':')[1].should == nil EventMachine.stop } } @@ -777,23 +777,6 @@ end end } - end - - it "should report error if connection was closed by server on client keepalive requests" do - EventMachine.run { - conn = EM::HttpRequest.new('http://127.0.0.1:8090/') - req = conn.get :keepalive => true - - req.callback do - req = conn.get - - req.callback { failed(http) } - req.errback do - req.error.should match('connection closed by server') - EventMachine.stop - end - end - } end it 'should handle malformed Content-Type header repetitions' do --- a/spec/dns_spec.rb +++ b/spec/dns_spec.rb @@ -7,19 +7,7 @@ http = EventMachine::HttpRequest.new('http://127.0.0.1:8090/redirect/badhost', :connect_timeout => 0.1).get :redirects => 1 http.callback { failed(http) } http.errback { - http.error.should match('unable to resolve server address') - EventMachine.stop - } - } - end - - it "should fail GET on DNS timeout" do - EventMachine.run { - EventMachine.heartbeat_interval = 0.1 - http = EventMachine::HttpRequest.new('http://127.1.1.1/', :connect_timeout => 0.1).get - http.callback { failed(http) } - http.errback { - http.response_header.status.should == 0 + http.error.should match('connection closed by server') EventMachine.stop } } debian/patches/series0000644000000000000000000000012512331154333012026 0ustar disable-rubygems.patch require_connection_test.patch change_mongrel_to_webrick.patch debian/patches/require_connection_test.patch0000644000000000000000000000057112331154333016571 0ustar Description: disable all test, that require network access Author: Jonas Genannt Forwarded: not-needed --- a/spec/helper.rb +++ b/spec/helper.rb @@ -15,7 +15,7 @@ def failed(http = nil) end def requires_connection(&blk) - blk.call if system('ping -t1 -c1 google.com 2>&1 > /dev/null') + blk.call if nil end def requires_port(port, &blk) debian/patches/disable-rubygems.patch0000644000000000000000000000061412331154333015073 0ustar Description: remove usage of bundler and rubygems for tests Author: Tollef Fog Heen Forwarded: not-needed --- a/spec/helper.rb +++ b/spec/helper.rb @@ -1,5 +1,6 @@ -require 'rubygems' -require 'bundler/setup' +# We don't need rubygems, dependencies are handled by apt +# require 'rubygems' +# require 'bundler/setup' require 'em-http' require 'em-http/middleware/oauth2' debian/ruby-tests.rake0000644000000000000000000000022312331154333012146 0ustar require 'rspec/core/rake_task' RSpec::Core::RakeTask.new(:spec) do |spec| spec.pattern = './spec/**/*_spec.rb' end task :default => :spec debian/compat0000644000000000000000000000000212265226454010374 0ustar 7 debian/watch0000644000000000000000000000016312265226454010227 0ustar version=3 http://pkg-ruby-extras.alioth.debian.org/cgi-bin/gemwatch/em-http-request .*/em-http-request-(.*).tar.gz debian/rules0000755000000000000000000000070112265226454010254 0ustar #!/usr/bin/make -f #export DH_VERBOSE=1 # # Uncomment to ignore all test failures (but the tests will run anyway) #export DH_RUBY_IGNORE_TESTS=all # # Uncomment to ignore some test failures (but the tests will run anyway). # Valid values: #export DH_RUBY_IGNORE_TESTS=ruby1.8 ruby1.9.1 require-rubygems # # If you need to specify the .gemspec (eg there is more than one) #export DH_RUBY_GEMSPEC=gem.gemspec %: dh $@ --buildsystem=ruby --with ruby debian/ruby-em-http-request.examples0000644000000000000000000000001312265226454014753 0ustar examples/* debian/source/0000755000000000000000000000000012265226454010476 5ustar debian/source/format0000644000000000000000000000001412265226454011704 0ustar 3.0 (quilt)