diff --git a/.autotest b/.autotest deleted file mode 100644 index b7dde7e..0000000 --- a/.autotest +++ /dev/null @@ -1,9 +0,0 @@ -# -*- ruby -*- - -require 'autotest/restart' - -Autotest.add_hook :initialize do |at| - at.add_exception '.git' - at.add_exception '.rdoc' -end - diff --git a/.gemtest b/.gemtest deleted file mode 100644 index e69de29..0000000 diff --git a/.gitignore b/.gitignore index ac60f41..50e30ae 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ /doc /pkg .idea +Gemfile.lock diff --git a/.travis.yml b/.travis.yml index 21ab797..4fd0e80 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,15 +1,12 @@ --- -after_script: -- rake travis:after -t -before_script: -- gem install hoe-travis --no-rdoc --no-ri -- rake travis:before -t language: ruby notifications: email: - drbrain@segment7.net rvm: -- 2.1.10 -- 2.2.5 -- 2.3.1 -script: rake travis +- 2.1 +- 2.2 +- 2.3 +- 2.4 +- 2.5 +- 2.6 diff --git a/Gemfile b/Gemfile new file mode 100644 index 0000000..b7dfd55 --- /dev/null +++ b/Gemfile @@ -0,0 +1,8 @@ +source "https://rubygems.org" + +gemspec + +gem "rake" +gem "bump" +gem "minitest" +gem "net-http-pipeline" diff --git a/Manifest.txt b/Manifest.txt deleted file mode 100644 index e94aa62..0000000 --- a/Manifest.txt +++ /dev/null @@ -1,13 +0,0 @@ -.autotest -.gemtest -.travis.yml -History.txt -Manifest.txt -README.rdoc -Rakefile -lib/net/http/persistent.rb -lib/net/http/persistent/connection.rb -lib/net/http/persistent/pool.rb -lib/net/http/persistent/timed_stack_multi.rb -test/test_net_http_persistent.rb -test/test_net_http_persistent_timed_stack_multi.rb diff --git a/README.rdoc b/README.rdoc index 82c4861..16647b8 100644 --- a/README.rdoc +++ b/README.rdoc @@ -1,11 +1,10 @@ = net-http-persistent -* http://docs.seattlerb.org/net-http-persistent * https://github.com/drbrain/net-http-persistent == DESCRIPTION: -Manages persistent connections using Net::HTTP plus a speed fix for Ruby 1.8. +Manages persistent connections using Net::HTTP. It's thread-safe too! Using persistent HTTP connections can dramatically increase the speed of HTTP. @@ -21,7 +20,6 @@ and retry according to RFC 2616. * Supports SSL * Thread-safe * Pure ruby -* Timeout-less speed boost for Ruby 1.8 (by Aaron Patterson) == SYNOPSIS @@ -54,7 +52,7 @@ including SSL connection verification, header handling and tunable options. == INSTALL: - gem install net-http-persistent + gem install net-http-persistent == LICENSE: diff --git a/Rakefile b/Rakefile index 499d465..4622523 100644 --- a/Rakefile +++ b/Rakefile @@ -1,27 +1,6 @@ -# -*- ruby -*- +require 'bundler/setup' +require 'bundler/gem_tasks' +require 'rake/testtask' +require 'bump/tasks' -require 'rubygems' -require 'hoe' - -Hoe.plugin :git -Hoe.plugin :minitest -Hoe.plugin :travis - -Hoe.spec 'net-http-persistent' do - developer 'Eric Hodel', 'drbrain@segment7.net' - - self.readme_file = 'README.rdoc' - self.extra_rdoc_files += Dir['*.rdoc'] - - self.require_ruby_version '~> 2.1' - - license 'MIT' - - rdoc_locations << - 'docs.seattlerb.org:/data/www/docs.seattlerb.org/net-http-persistent/' - - dependency 'connection_pool', '~> 2.2' - dependency 'minitest', '~> 5.2', :development -end - -# vim: syntax=Ruby +Rake::TestTask.new :default diff --git a/net-http-persistent.gemspec b/net-http-persistent.gemspec new file mode 100644 index 0000000..0b37ea9 --- /dev/null +++ b/net-http-persistent.gemspec @@ -0,0 +1,11 @@ +Gem::Specification.new 'net-http-persistent', '3.0.1' do |s| + s.summary = "Manages persistent connections using Net::HTTP" + s.description = "Manages persistent connections using Net::HTTP. It's thread-safe too! Using persistent HTTP connections can dramatically increase the speed of HTTP. Creating a new HTTP connection for every request involves an extra TCP round-trip and causes TCP congestion avoidance negotiation to start over. Net::HTTP supports persistent connections with some API methods but does not handle reconnection gracefully. Net::HTTP::Persistent supports reconnection and retry according to RFC 2616." + s.authors = ["Eric Hodel"] + s.email = "drbrain@segment7.net" + s.homepage = "https://github.com/drbrain/net-http-persistent" + s.files = `git ls-files lib History.txt Readme.rdoc`.split("\n") + s.license = "MIT" + s.required_ruby_version = '~> 2.1' + s.add_runtime_dependency 'connection_pool', '~> 2.2' +end diff --git a/test/test_net_http_persistent.rb b/test/test_net_http_persistent.rb index 86eb044..dfe3ef8 100644 --- a/test/test_net_http_persistent.rb +++ b/test/test_net_http_persistent.rb @@ -751,7 +751,7 @@ def test_pipeline skip 'net-http-pipeline not installed' unless defined?(Net::HTTP::Pipeline) cached = basic_connection - cached.start + cached.http.start requests = [ Net::HTTP::Get.new((@uri + '1').request_uri),