iudex-httpclient-3 1.4.0-java → 1.7.0-java

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.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 0b3f8d829a0b88702247db11c32eb870b6342d8d
4
+ data.tar.gz: b16e0a5eed0ae505b218bf26e71f14260dca95fa
5
+ SHA512:
6
+ metadata.gz: c76fe32383b183a756bb76dde6d2a28664294ef713bb246924d77ff86893cf84a56ae79e8a2c6913439cd797f54c3a29ab68e36fca0f97b78ffca1188bbe858d
7
+ data.tar.gz: 31f13d0e4d45d3a515996d960166033379c918631b4d2c444c02978f0f9f0f39c6f8c3c90567aa680b68d634fe098dc344d57394719b42bb82f2be63cabca4a2
@@ -1,3 +1,7 @@
1
+ === 1.7.0 (2015-5-3)
2
+ * Upgrade to iudex-* ~> 1.7 dependencies
3
+ * Add POST method and request content support
4
+
1
5
  === 1.4.0 (2013-10-29)
2
6
  * Upgrade to iudex-* ~> 1.4.0 dependencies
3
7
  * Upgrade to minitest ~> 4.7.4 (dev)
@@ -7,4 +7,4 @@ lib/iudex-httpclient-3/base.rb
7
7
  lib/iudex-httpclient-3.rb
8
8
  test/setup.rb
9
9
  test/test_httpclient.rb
10
- lib/iudex-httpclient-3/iudex-httpclient-3-1.4.0.jar
10
+ lib/iudex-httpclient-3/iudex-httpclient-3-1.7.0.jar
@@ -11,7 +11,7 @@ the iudex-http interfaces.
11
11
 
12
12
  == License
13
13
 
14
- Copyright (c) 2008-2013 David Kellum
14
+ Copyright (c) 2008-2015 David Kellum
15
15
 
16
16
  Licensed under the Apache License, Version 2.0 (the "License"); you
17
17
  may not use this file except in compliance with the License. You
@@ -1,5 +1,5 @@
1
1
  #--
2
- # Copyright (c) 2008-2013 David Kellum
2
+ # Copyright (c) 2008-2015 David Kellum
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you
5
5
  # may not use this file except in compliance with the License. You
@@ -1,5 +1,5 @@
1
1
  #--
2
- # Copyright (c) 2008-2013 David Kellum
2
+ # Copyright (c) 2008-2015 David Kellum
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you
5
5
  # may not use this file except in compliance with the License. You
@@ -16,7 +16,7 @@
16
16
 
17
17
  module Iudex
18
18
  module HTTPClient3
19
- VERSION = '1.4.0'
19
+ VERSION = '1.7.0'
20
20
 
21
21
  LIB_DIR = File.dirname( __FILE__ ) # :nodoc:
22
22
  end
data/pom.xml CHANGED
@@ -5,13 +5,13 @@
5
5
  <groupId>iudex</groupId>
6
6
  <artifactId>iudex-httpclient-3</artifactId>
7
7
  <packaging>jar</packaging>
8
- <version>1.4.0</version>
8
+ <version>1.7.0</version>
9
9
  <name>Iudex HTTP Client 3</name>
10
10
 
11
11
  <parent>
12
12
  <groupId>iudex</groupId>
13
13
  <artifactId>iudex-parent</artifactId>
14
- <version>1.4.0</version>
14
+ <version>1.7.0</version>
15
15
  <relativePath>..</relativePath>
16
16
  </parent>
17
17
 
@@ -20,7 +20,7 @@
20
20
  <dependency>
21
21
  <groupId>iudex</groupId>
22
22
  <artifactId>iudex-http</artifactId>
23
- <version>[1.4.0,1.4.999)</version>
23
+ <version>[1.7.0,1.999)</version>
24
24
  </dependency>
25
25
 
26
26
  <dependency>
@@ -1,5 +1,5 @@
1
1
  #--
2
- # Copyright (c) 2008-2013 David Kellum
2
+ # Copyright (c) 2008-2015 David Kellum
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you
5
5
  # may not use this file except in compliance with the License. You
@@ -2,7 +2,7 @@
2
2
  #.hashdot.profile += jruby-shortlived
3
3
 
4
4
  #--
5
- # Copyright (c) 2008-2013 David Kellum
5
+ # Copyright (c) 2008-2015 David Kellum
6
6
  #
7
7
  # Licensed under the Apache License, Version 2.0 (the "License"); you
8
8
  # may not use this file except in compliance with the License. You
@@ -24,8 +24,6 @@ require 'iudex-httpclient-3'
24
24
  require 'iudex-http-test/helper'
25
25
  require 'iudex-http-test/broken_server'
26
26
 
27
- require 'thread'
28
-
29
27
  class TestHTTPClient < MiniTest::Unit::TestCase
30
28
  include Iudex
31
29
  include Iudex::HTTP
@@ -248,9 +246,7 @@ class TestHTTPClient < MiniTest::Unit::TestCase
248
246
  bs = BrokenServer.new
249
247
  bs.start
250
248
 
251
- sthread = Thread.new do
252
- bs.accept { |sock| sock.write "FU Stinky\r\n" }
253
- end
249
+ sthread = bs.accept_thread { |sock| sock.write "FU Stinky\r\n" }
254
250
 
255
251
  #FIXME: SocketTimeoutException on bad HTTP response line?
256
252
  with_new_client do |client|
@@ -269,9 +265,7 @@ class TestHTTPClient < MiniTest::Unit::TestCase
269
265
  bs = BrokenServer.new
270
266
  bs.start
271
267
 
272
- sthread = Thread.new do
273
- bs.accept { |sock| sock.close }
274
- end
268
+ sthread = bs.accept_thread { |sock| sock.close }
275
269
 
276
270
  with_new_client do |client|
277
271
  with_session_handler( client, "http://localhost:19293/" ) do |s,x|
@@ -315,7 +309,23 @@ class TestHTTPClient < MiniTest::Unit::TestCase
315
309
  end
316
310
  end
317
311
 
318
- def with_session_handler( client, uri, headers = {}, &block )
312
+ def test_post
313
+ with_new_client do |client|
314
+ smod = Proc.new do |s|
315
+ s.method = HTTPSession::Method::POST
316
+ s.requestContent =
317
+ RequestContent.new( "a=1+2&b=3".to_java_bytes,
318
+ "application/x-www-form-urlencoded" )
319
+ end
320
+ with_session_handler( client, "/post_to", {}, smod ) do |s,x|
321
+ output_bomb( s ) unless s.status_code == 200
322
+ assert_equal( 200, s.status_code, "see bomb.out" )
323
+ assert_equal( %Q[{"a"=>"1 2", "b"=>"3"}], s.response_stream.to_io.read )
324
+ end
325
+ end
326
+ end
327
+
328
+ def with_session_handler( client, uri, headers = {}, smod = nil, &block )
319
329
  session = client.create_session
320
330
  uri = "http://localhost:#{server.port}#{uri}" unless uri =~ /^http:/
321
331
  session.url = uri
@@ -323,6 +333,7 @@ class TestHTTPClient < MiniTest::Unit::TestCase
323
333
  session.add_request_header( Java::iudex.http.Header.new( k, v ) )
324
334
  end
325
335
 
336
+ smod.call( session ) if smod
326
337
  handler = TestHandler.new( &block )
327
338
  client.request( session, handler )
328
339
 
metadata CHANGED
@@ -1,128 +1,113 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: iudex-httpclient-3
3
3
  version: !ruby/object:Gem::Version
4
- prerelease:
5
- version: 1.4.0
4
+ version: 1.7.0
6
5
  platform: java
7
6
  authors:
8
7
  - David Kellum
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-10-30 00:00:00.000000000 Z
11
+ date: 2015-05-04 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
- name: iudex-http
16
- version_requirements: !ruby/object:Gem::Requirement
17
- requirements:
18
- - - ~>
19
- - !ruby/object:Gem::Version
20
- version: 1.4.0
21
- none: false
22
14
  requirement: !ruby/object:Gem::Requirement
23
15
  requirements:
24
16
  - - ~>
25
17
  - !ruby/object:Gem::Version
26
- version: 1.4.0
27
- none: false
18
+ version: '1.7'
19
+ name: iudex-http
28
20
  prerelease: false
29
21
  type: :runtime
30
- - !ruby/object:Gem::Dependency
31
- name: rjack-httpclient-3
32
22
  version_requirements: !ruby/object:Gem::Requirement
33
23
  requirements:
34
24
  - - ~>
35
25
  - !ruby/object:Gem::Version
36
- version: 3.1.3
37
- none: false
26
+ version: '1.7'
27
+ - !ruby/object:Gem::Dependency
38
28
  requirement: !ruby/object:Gem::Requirement
39
29
  requirements:
40
30
  - - ~>
41
31
  - !ruby/object:Gem::Version
42
32
  version: 3.1.3
43
- none: false
33
+ name: rjack-httpclient-3
44
34
  prerelease: false
45
35
  type: :runtime
46
- - !ruby/object:Gem::Dependency
47
- name: hooker
48
36
  version_requirements: !ruby/object:Gem::Requirement
49
37
  requirements:
50
38
  - - ~>
51
39
  - !ruby/object:Gem::Version
52
- version: 1.0.0
53
- none: false
40
+ version: 3.1.3
41
+ - !ruby/object:Gem::Dependency
54
42
  requirement: !ruby/object:Gem::Requirement
55
43
  requirements:
56
44
  - - ~>
57
45
  - !ruby/object:Gem::Version
58
46
  version: 1.0.0
59
- none: false
47
+ name: hooker
60
48
  prerelease: false
61
49
  type: :runtime
62
- - !ruby/object:Gem::Dependency
63
- name: minitest
64
50
  version_requirements: !ruby/object:Gem::Requirement
65
51
  requirements:
66
52
  - - ~>
67
53
  - !ruby/object:Gem::Version
68
- version: 4.7.4
69
- none: false
54
+ version: 1.0.0
55
+ - !ruby/object:Gem::Dependency
70
56
  requirement: !ruby/object:Gem::Requirement
71
57
  requirements:
72
58
  - - ~>
73
59
  - !ruby/object:Gem::Version
74
60
  version: 4.7.4
75
- none: false
61
+ name: minitest
76
62
  prerelease: false
77
63
  type: :development
78
- - !ruby/object:Gem::Dependency
79
- name: iudex-http-test
80
64
  version_requirements: !ruby/object:Gem::Requirement
81
65
  requirements:
82
66
  - - ~>
83
67
  - !ruby/object:Gem::Version
84
- version: 1.4.0
85
- none: false
68
+ version: 4.7.4
69
+ - !ruby/object:Gem::Dependency
86
70
  requirement: !ruby/object:Gem::Requirement
87
71
  requirements:
88
72
  - - ~>
89
73
  - !ruby/object:Gem::Version
90
- version: 1.4.0
91
- none: false
74
+ version: '1.7'
75
+ name: iudex-http-test
92
76
  prerelease: false
93
77
  type: :development
94
- - !ruby/object:Gem::Dependency
95
- name: rjack-logback
96
78
  version_requirements: !ruby/object:Gem::Requirement
97
79
  requirements:
98
80
  - - ~>
99
81
  - !ruby/object:Gem::Version
100
- version: '1.5'
101
- none: false
82
+ version: '1.7'
83
+ - !ruby/object:Gem::Dependency
102
84
  requirement: !ruby/object:Gem::Requirement
103
85
  requirements:
104
86
  - - ~>
105
87
  - !ruby/object:Gem::Version
106
88
  version: '1.5'
107
- none: false
89
+ name: rjack-logback
108
90
  prerelease: false
109
91
  type: :development
110
- - !ruby/object:Gem::Dependency
111
- name: rjack-tarpit
112
92
  version_requirements: !ruby/object:Gem::Requirement
113
93
  requirements:
114
94
  - - ~>
115
95
  - !ruby/object:Gem::Version
116
- version: '2.0'
117
- none: false
96
+ version: '1.5'
97
+ - !ruby/object:Gem::Dependency
118
98
  requirement: !ruby/object:Gem::Requirement
119
99
  requirements:
120
100
  - - ~>
121
101
  - !ruby/object:Gem::Version
122
- version: '2.0'
123
- none: false
102
+ version: '2.1'
103
+ name: rjack-tarpit
124
104
  prerelease: false
125
105
  type: :development
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ~>
109
+ - !ruby/object:Gem::Version
110
+ version: '2.1'
126
111
  description: Iudex is a general purpose web crawler and feed processor in ruby/java. This gem is an rjack-httpclient-3 based implementation of the iudex-http interfaces.
127
112
  email:
128
113
  - dek-oss@gravitext.com
@@ -136,14 +121,16 @@ files:
136
121
  - Manifest.txt
137
122
  - README.rdoc
138
123
  - Rakefile
139
- - pom.xml
140
- - lib/iudex-httpclient-3/base.rb
141
124
  - lib/iudex-httpclient-3.rb
125
+ - lib/iudex-httpclient-3/base.rb
126
+ - lib/iudex-httpclient-3/iudex-httpclient-3-1.7.0.jar
127
+ - pom.xml
142
128
  - test/setup.rb
143
129
  - test/test_httpclient.rb
144
- - lib/iudex-httpclient-3/iudex-httpclient-3-1.4.0.jar
145
130
  homepage: http://iudex.gravitext.com
146
- licenses: []
131
+ licenses:
132
+ - Apache-2.0
133
+ metadata: {}
147
134
  post_install_message:
148
135
  rdoc_options:
149
136
  - --main
@@ -152,27 +139,18 @@ require_paths:
152
139
  - lib
153
140
  required_ruby_version: !ruby/object:Gem::Requirement
154
141
  requirements:
155
- - - ! '>='
142
+ - - '>='
156
143
  - !ruby/object:Gem::Version
157
- version: '0'
158
- segments:
159
- - 0
160
- hash: 2
161
- none: false
144
+ version: 1.8.7
162
145
  required_rubygems_version: !ruby/object:Gem::Requirement
163
146
  requirements:
164
- - - ! '>='
147
+ - - '>='
165
148
  - !ruby/object:Gem::Version
166
149
  version: '0'
167
- segments:
168
- - 0
169
- hash: 2
170
- none: false
171
150
  requirements: []
172
151
  rubyforge_project:
173
- rubygems_version: 1.8.24
152
+ rubygems_version: 2.4.5
174
153
  signing_key:
175
- specification_version: 3
154
+ specification_version: 4
176
155
  summary: Iudex is a general purpose web crawler and feed processor in ruby/java.
177
156
  test_files: []
178
- ...