Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get tests running / convert to bundler #101

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions .autotest

This file was deleted.

Empty file removed .gemtest
Empty file.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
/doc
/pkg
.idea
Gemfile.lock
15 changes: 6 additions & 9 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -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:
- [email protected]
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
8 changes: 8 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
source "https://rubygems.org"

gemspec

gem "rake"
gem "bump"
gem "minitest"
gem "net-http-pipeline"
13 changes: 0 additions & 13 deletions Manifest.txt

This file was deleted.

6 changes: 2 additions & 4 deletions README.rdoc
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -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

Expand Down Expand Up @@ -54,7 +52,7 @@ including SSL connection verification, header handling and tunable options.

== INSTALL:

gem install net-http-persistent
gem install net-http-persistent
drbrain marked this conversation as resolved.
Show resolved Hide resolved

== LICENSE:

Expand Down
31 changes: 5 additions & 26 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -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', '[email protected]'

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/'
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The docs are no longer published and I don't think bundler's publishing tasks have this capability for a rake release.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we use a more standard docs host ... or just remove hosting docs in favor of directing people to just read the docs/readme on github ? (removes lots of complications ... and this is a tiny gem anyway, so no need for fancy docs)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

... or leave that for "whenever someone care enough to fix it" ... because I'd love to actually fix the code and not be blocked by this docs issue :(

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so no need for fancy docs

I spent a lot of time writing comprehensive documentation that's accessible from standard tools. Pretending like they don't exist and that they'll maintain themselves means they'll decay.

Reading documentation out of source files isn't discoverable or easy for people who aren't experienced rubyists or aren't familiar with the library. Having a first-class experience as an introduction to a library is essential.

I've fixed the docs issue by fixing hoe-travis (1.4.1 release) and creating seattlerb/hoe#89. The tests now run and pass on master on travis.


dependency 'connection_pool', '~> 2.2'
dependency 'minitest', '~> 5.2', :development
end

# vim: syntax=Ruby
Rake::TestTask.new :default
11 changes: 11 additions & 0 deletions net-http-persistent.gemspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Gem::Specification.new 'net-http-persistent', '3.0.1' do |s|
grosser marked this conversation as resolved.
Show resolved Hide resolved
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 = "[email protected]"
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
2 changes: 1 addition & 1 deletion test/test_net_http_persistent.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down