rufus-jig 0.1.22 → 0.1.23
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.
- data/CHANGELOG.txt +6 -0
- data/Rakefile +2 -15
- data/lib/rufus/jig/adapters/net_persistent.rb +3 -25
- data/lib/rufus/jig/version.rb +1 -1
- data/rufus-jig.gemspec +5 -2
- metadata +16 -3
data/CHANGELOG.txt
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
= rufus-jig CHANGELOG.txt
|
|
3
3
|
|
|
4
4
|
|
|
5
|
+
== rufus-jig - 0.1.23 released 2010/10/01
|
|
6
|
+
|
|
7
|
+
- net-http-persistent 1.4 which contains the shutdown_in_all_threads patch
|
|
8
|
+
by Torsten Schoenebaum
|
|
9
|
+
|
|
10
|
+
|
|
5
11
|
== rufus-jig - 0.1.22 released 2010/09/30
|
|
6
12
|
|
|
7
13
|
- close methods are back
|
data/Rakefile
CHANGED
|
@@ -46,6 +46,7 @@ Jeweler::Tasks.new do |gem|
|
|
|
46
46
|
gem.add_development_dependency 'jeweler'
|
|
47
47
|
gem.add_development_dependency 'patron'
|
|
48
48
|
gem.add_development_dependency 'em-http-request'
|
|
49
|
+
gem.add_development_dependency 'net-http-persistent', '>= 1.4'
|
|
49
50
|
|
|
50
51
|
# gemspec spec : http://www.rubygems.org/read/chapter/20
|
|
51
52
|
end
|
|
@@ -55,20 +56,6 @@ Jeweler::GemcutterTasks.new
|
|
|
55
56
|
#
|
|
56
57
|
# DOC
|
|
57
58
|
|
|
58
|
-
#begin
|
|
59
|
-
# require 'yard'
|
|
60
|
-
# YARD::Rake::YardocTask.new do |doc|
|
|
61
|
-
# doc.options = [
|
|
62
|
-
# '-o', 'html/rufus-jig', '--title',
|
|
63
|
-
# "rufus-jig #{Rufus::Jig::VERSION}"
|
|
64
|
-
# ]
|
|
65
|
-
# end
|
|
66
|
-
#rescue LoadError
|
|
67
|
-
# task :yard do
|
|
68
|
-
# abort "YARD is not available : sudo gem install yard"
|
|
69
|
-
# end
|
|
70
|
-
#end
|
|
71
|
-
|
|
72
59
|
#
|
|
73
60
|
# make sure to have rdoc 2.5.x to run that
|
|
74
61
|
#
|
|
@@ -84,7 +71,7 @@ end
|
|
|
84
71
|
#
|
|
85
72
|
# TO THE WEB
|
|
86
73
|
|
|
87
|
-
task :
|
|
74
|
+
task :upload_rdoc => [ :clean, :rdoc ] do
|
|
88
75
|
|
|
89
76
|
account = 'jmettraux@rubyforge.org'
|
|
90
77
|
webdir = '/var/www/gforge-projects/rufus'
|
|
@@ -26,30 +26,6 @@
|
|
|
26
26
|
require 'rufus/jig/adapters/net_response'
|
|
27
27
|
|
|
28
28
|
|
|
29
|
-
#
|
|
30
|
-
# Re-opening Net::HTTP::Persistent to add a shutdown_in_all_threads method.
|
|
31
|
-
#
|
|
32
|
-
class Net::HTTP::Persistent
|
|
33
|
-
|
|
34
|
-
# Shuts down this instance's connection in all the threads.
|
|
35
|
-
#
|
|
36
|
-
# (to avoid too many open files issues).
|
|
37
|
-
#
|
|
38
|
-
def shutdown_in_all_threads
|
|
39
|
-
|
|
40
|
-
Thread.list.each do |t|
|
|
41
|
-
|
|
42
|
-
if cons = t[@connection_key]
|
|
43
|
-
cons.each { |_, connection| connection.finish rescue IOError }
|
|
44
|
-
end
|
|
45
|
-
|
|
46
|
-
t[@connection_key] = nil
|
|
47
|
-
t[@request_key] = nil
|
|
48
|
-
end
|
|
49
|
-
end
|
|
50
|
-
end
|
|
51
|
-
|
|
52
|
-
|
|
53
29
|
class Rufus::Jig::Http < Rufus::Jig::HttpCore
|
|
54
30
|
|
|
55
31
|
def initialize (*args)
|
|
@@ -59,7 +35,9 @@ class Rufus::Jig::Http < Rufus::Jig::HttpCore
|
|
|
59
35
|
@options[:user_agent] ||=
|
|
60
36
|
"#{self.class} #{Rufus::Jig::VERSION} (net/http/persistent)"
|
|
61
37
|
|
|
62
|
-
|
|
38
|
+
name = [ 'jig', @host, @port.to_s ].join('|')
|
|
39
|
+
|
|
40
|
+
@http = Net::HTTP::Persistent.new(name)
|
|
63
41
|
end
|
|
64
42
|
|
|
65
43
|
def variant
|
data/lib/rufus/jig/version.rb
CHANGED
data/rufus-jig.gemspec
CHANGED
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
|
|
6
6
|
Gem::Specification.new do |s|
|
|
7
7
|
s.name = %q{rufus-jig}
|
|
8
|
-
s.version = "0.1.
|
|
8
|
+
s.version = "0.1.23"
|
|
9
9
|
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
|
11
11
|
s.authors = ["John Mettraux", "Kenneth Kalmer"]
|
|
12
|
-
s.date = %q{2010-
|
|
12
|
+
s.date = %q{2010-10-01}
|
|
13
13
|
s.description = %q{
|
|
14
14
|
Json Interwebs Get.
|
|
15
15
|
|
|
@@ -92,6 +92,7 @@ Gem::Specification.new do |s|
|
|
|
92
92
|
s.add_development_dependency(%q<jeweler>, [">= 0"])
|
|
93
93
|
s.add_development_dependency(%q<patron>, [">= 0"])
|
|
94
94
|
s.add_development_dependency(%q<em-http-request>, [">= 0"])
|
|
95
|
+
s.add_development_dependency(%q<net-http-persistent>, [">= 1.4"])
|
|
95
96
|
else
|
|
96
97
|
s.add_dependency(%q<rufus-lru>, [">= 0"])
|
|
97
98
|
s.add_dependency(%q<rufus-json>, [">= 0.2.5"])
|
|
@@ -100,6 +101,7 @@ Gem::Specification.new do |s|
|
|
|
100
101
|
s.add_dependency(%q<jeweler>, [">= 0"])
|
|
101
102
|
s.add_dependency(%q<patron>, [">= 0"])
|
|
102
103
|
s.add_dependency(%q<em-http-request>, [">= 0"])
|
|
104
|
+
s.add_dependency(%q<net-http-persistent>, [">= 1.4"])
|
|
103
105
|
end
|
|
104
106
|
else
|
|
105
107
|
s.add_dependency(%q<rufus-lru>, [">= 0"])
|
|
@@ -109,6 +111,7 @@ Gem::Specification.new do |s|
|
|
|
109
111
|
s.add_dependency(%q<jeweler>, [">= 0"])
|
|
110
112
|
s.add_dependency(%q<patron>, [">= 0"])
|
|
111
113
|
s.add_dependency(%q<em-http-request>, [">= 0"])
|
|
114
|
+
s.add_dependency(%q<net-http-persistent>, [">= 1.4"])
|
|
112
115
|
end
|
|
113
116
|
end
|
|
114
117
|
|
metadata
CHANGED
|
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
|
5
5
|
segments:
|
|
6
6
|
- 0
|
|
7
7
|
- 1
|
|
8
|
-
-
|
|
9
|
-
version: 0.1.
|
|
8
|
+
- 23
|
|
9
|
+
version: 0.1.23
|
|
10
10
|
platform: ruby
|
|
11
11
|
authors:
|
|
12
12
|
- John Mettraux
|
|
@@ -15,7 +15,7 @@ autorequire:
|
|
|
15
15
|
bindir: bin
|
|
16
16
|
cert_chain: []
|
|
17
17
|
|
|
18
|
-
date: 2010-
|
|
18
|
+
date: 2010-10-01 00:00:00 +09:00
|
|
19
19
|
default_executable:
|
|
20
20
|
dependencies:
|
|
21
21
|
- !ruby/object:Gem::Dependency
|
|
@@ -104,6 +104,19 @@ dependencies:
|
|
|
104
104
|
version: "0"
|
|
105
105
|
type: :development
|
|
106
106
|
version_requirements: *id007
|
|
107
|
+
- !ruby/object:Gem::Dependency
|
|
108
|
+
name: net-http-persistent
|
|
109
|
+
prerelease: false
|
|
110
|
+
requirement: &id008 !ruby/object:Gem::Requirement
|
|
111
|
+
requirements:
|
|
112
|
+
- - ">="
|
|
113
|
+
- !ruby/object:Gem::Version
|
|
114
|
+
segments:
|
|
115
|
+
- 1
|
|
116
|
+
- 4
|
|
117
|
+
version: "1.4"
|
|
118
|
+
type: :development
|
|
119
|
+
version_requirements: *id008
|
|
107
120
|
description: "\n Json Interwebs Get.\n\n An HTTP client, greedy with JSON content, GETting conditionally.\n\n Uses Patron and Yajl-ruby whenever possible.\n "
|
|
108
121
|
email: jmettraux@gmail.com
|
|
109
122
|
executables: []
|