iudex-http 1.0.0-java → 1.1.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.
- data/.gemtest +0 -0
- data/History.rdoc +10 -0
- data/Manifest.txt +2 -1
- data/Rakefile +3 -3
- data/lib/iudex-http/base.rb +1 -1
- data/lib/iudex-http/iudex-http-1.1.0.jar +0 -0
- data/lib/iudex-http.rb +7 -1
- data/pom.xml +2 -2
- data/test/test_content_type_set.rb +58 -0
- metadata +11 -13
- data/lib/iudex-http/iudex-http-1.0.0.jar +0 -0
data/.gemtest
ADDED
File without changes
|
data/History.rdoc
CHANGED
@@ -1,2 +1,12 @@
|
|
1
|
+
=== 1.1.0 (2011-11-13)
|
2
|
+
* New general ContentTypeSet with Content-Type match test.
|
3
|
+
* ResponseHandler simplified to a single sessionCompleted() callback.
|
4
|
+
* New HostAccessListener,Listenable interfaces for track host
|
5
|
+
connection usage.
|
6
|
+
* HTTPSession constants for psuedo-HTTP status error codes, other
|
7
|
+
additions.
|
8
|
+
* Update to minitest ~> 2.3
|
9
|
+
* Update to gravitext-util ~> 1.5.1 (for UniMap.toString)
|
10
|
+
|
1
11
|
=== 1.0.0 (2011-04-04)
|
2
12
|
* Initial release.
|
data/Manifest.txt
CHANGED
data/Rakefile
CHANGED
@@ -4,7 +4,7 @@ $LOAD_PATH << './lib'
|
|
4
4
|
require 'iudex-http/base'
|
5
5
|
|
6
6
|
require 'rubygems'
|
7
|
-
gem 'rjack-tarpit', '~> 1.
|
7
|
+
gem 'rjack-tarpit', '~> 1.4'
|
8
8
|
require 'rjack-tarpit'
|
9
9
|
|
10
10
|
t = RJack::TarPit.new( 'iudex-http',
|
@@ -14,10 +14,10 @@ t = RJack::TarPit.new( 'iudex-http',
|
|
14
14
|
t.specify do |h|
|
15
15
|
h.developer( "David Kellum", "dek-oss@gravitext.com" )
|
16
16
|
h.extra_deps += [ [ 'rjack-slf4j', '~> 1.6.1' ],
|
17
|
-
[ 'gravitext-util', '~> 1.5.
|
17
|
+
[ 'gravitext-util', '~> 1.5.1' ] ]
|
18
18
|
|
19
19
|
h.testlib = :minitest
|
20
|
-
h.extra_dev_deps += [ [ 'minitest', '
|
20
|
+
h.extra_dev_deps += [ [ 'minitest', '~> 2.3' ],
|
21
21
|
[ 'rjack-logback', '~> 1.0' ] ]
|
22
22
|
end
|
23
23
|
|
data/lib/iudex-http/base.rb
CHANGED
Binary file
|
data/lib/iudex-http.rb
CHANGED
@@ -25,9 +25,15 @@ module Iudex
|
|
25
25
|
module HTTP
|
26
26
|
require "#{LIB_DIR}/iudex-http-#{VERSION}.jar"
|
27
27
|
|
28
|
+
import "iudex.http.BaseResponseHandler"
|
29
|
+
import "iudex.http.ContentType"
|
30
|
+
import "iudex.http.ContentTypeSet"
|
28
31
|
import "iudex.http.HTTPClient"
|
29
|
-
import "iudex.http.HTTPSession"
|
30
32
|
import "iudex.http.HTTPKeys"
|
33
|
+
import "iudex.http.HTTPSession"
|
31
34
|
import "iudex.http.Header"
|
35
|
+
import "iudex.http.Headers"
|
36
|
+
import "iudex.http.ResponseHandler"
|
37
|
+
|
32
38
|
end
|
33
39
|
end
|
data/pom.xml
CHANGED
@@ -5,13 +5,13 @@
|
|
5
5
|
<groupId>iudex</groupId>
|
6
6
|
<artifactId>iudex-http</artifactId>
|
7
7
|
<packaging>jar</packaging>
|
8
|
-
<version>1.
|
8
|
+
<version>1.1.0</version>
|
9
9
|
<name>Iudex HTTP Interface</name>
|
10
10
|
|
11
11
|
<parent>
|
12
12
|
<groupId>iudex</groupId>
|
13
13
|
<artifactId>iudex-parent</artifactId>
|
14
|
-
<version>1.
|
14
|
+
<version>1.1</version>
|
15
15
|
<relativePath>..</relativePath>
|
16
16
|
</parent>
|
17
17
|
|
@@ -0,0 +1,58 @@
|
|
1
|
+
#!/usr/bin/env jruby
|
2
|
+
#.hashdot.profile += jruby-shortlived
|
3
|
+
|
4
|
+
#--
|
5
|
+
# Copyright (c) 2011 David Kellum
|
6
|
+
#
|
7
|
+
# Licensed under the Apache License, Version 2.0 (the "License"); you
|
8
|
+
# may not use this file except in compliance with the License. You
|
9
|
+
# may obtain a copy of the License at
|
10
|
+
#
|
11
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
12
|
+
#
|
13
|
+
# Unless required by applicable law or agreed to in writing, software
|
14
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
15
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
16
|
+
# implied. See the License for the specific language governing
|
17
|
+
# permissions and limitations under the License.
|
18
|
+
#++
|
19
|
+
require File.join( File.dirname( __FILE__ ), "setup" )
|
20
|
+
|
21
|
+
require 'iudex-http'
|
22
|
+
|
23
|
+
class TestContentTypeSet < MiniTest::Unit::TestCase
|
24
|
+
include Iudex::HTTP
|
25
|
+
|
26
|
+
class Iudex::HTTP::ContentTypeSet
|
27
|
+
def match?( val )
|
28
|
+
contains( val && Iudex::HTTP::ContentType.parse( val ) )
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
def test_any
|
33
|
+
set = ContentTypeSet::ANY
|
34
|
+
|
35
|
+
assert set.match?( "text/html" )
|
36
|
+
assert set.match?( "" )
|
37
|
+
assert set.match?( nil )
|
38
|
+
end
|
39
|
+
|
40
|
+
def test_pattern
|
41
|
+
set = ContentTypeSet.new( [ "text/*" ] )
|
42
|
+
|
43
|
+
assert set.match?( "teXt/html" )
|
44
|
+
|
45
|
+
refute set.match?( "textual" )
|
46
|
+
refute set.match?( nil )
|
47
|
+
end
|
48
|
+
|
49
|
+
def test_exact
|
50
|
+
set = ContentTypeSet.new( [ "text/plain", "text/html" ] )
|
51
|
+
|
52
|
+
assert set.match?( "teXt/html; charset=utf-8" )
|
53
|
+
|
54
|
+
refute set.match?( "textual" )
|
55
|
+
refute set.match?( nil )
|
56
|
+
end
|
57
|
+
|
58
|
+
end
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: iudex-http
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 1.
|
5
|
+
version: 1.1.0
|
6
6
|
platform: java
|
7
7
|
authors:
|
8
8
|
- David Kellum
|
@@ -10,8 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2011-
|
14
|
-
default_executable:
|
13
|
+
date: 2011-11-13 00:00:00 Z
|
15
14
|
dependencies:
|
16
15
|
- !ruby/object:Gem::Dependency
|
17
16
|
name: rjack-slf4j
|
@@ -32,7 +31,7 @@ dependencies:
|
|
32
31
|
requirements:
|
33
32
|
- - ~>
|
34
33
|
- !ruby/object:Gem::Version
|
35
|
-
version: 1.5.
|
34
|
+
version: 1.5.1
|
36
35
|
type: :runtime
|
37
36
|
version_requirements: *id002
|
38
37
|
- !ruby/object:Gem::Dependency
|
@@ -41,12 +40,9 @@ dependencies:
|
|
41
40
|
requirement: &id003 !ruby/object:Gem::Requirement
|
42
41
|
none: false
|
43
42
|
requirements:
|
44
|
-
- -
|
45
|
-
- !ruby/object:Gem::Version
|
46
|
-
version: 1.7.1
|
47
|
-
- - <
|
43
|
+
- - ~>
|
48
44
|
- !ruby/object:Gem::Version
|
49
|
-
version: "2.
|
45
|
+
version: "2.3"
|
50
46
|
type: :development
|
51
47
|
version_requirements: *id003
|
52
48
|
- !ruby/object:Gem::Dependency
|
@@ -68,7 +64,7 @@ dependencies:
|
|
68
64
|
requirements:
|
69
65
|
- - ~>
|
70
66
|
- !ruby/object:Gem::Version
|
71
|
-
version: 1.
|
67
|
+
version: 1.4.0
|
72
68
|
type: :development
|
73
69
|
version_requirements: *id005
|
74
70
|
description: |-
|
@@ -94,9 +90,10 @@ files:
|
|
94
90
|
- lib/iudex-http/base.rb
|
95
91
|
- lib/iudex-http.rb
|
96
92
|
- test/setup.rb
|
93
|
+
- test/test_content_type_set.rb
|
97
94
|
- test/test_http.rb
|
98
|
-
- lib/iudex-http/iudex-http-1.
|
99
|
-
|
95
|
+
- lib/iudex-http/iudex-http-1.1.0.jar
|
96
|
+
- .gemtest
|
100
97
|
homepage: http://github.com/dekellum/iudex
|
101
98
|
licenses: []
|
102
99
|
|
@@ -121,9 +118,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
121
118
|
requirements: []
|
122
119
|
|
123
120
|
rubyforge_project: iudex-http
|
124
|
-
rubygems_version: 1.
|
121
|
+
rubygems_version: 1.8.9
|
125
122
|
signing_key:
|
126
123
|
specification_version: 3
|
127
124
|
summary: Iudex is a general purpose web crawler and feed processor in ruby/java
|
128
125
|
test_files:
|
126
|
+
- test/test_content_type_set.rb
|
129
127
|
- test/test_http.rb
|
Binary file
|