httprb 0.1.4 → 0.1.5
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/lib/httprb/http_cache.rb +1 -0
- data/lib/httprb/request.rb +2 -1
- data/lib/httprb/version.rb +1 -1
- metadata +12 -5
- data/tests/disabled/test_collisions.rb +0 -30
data/lib/httprb/http_cache.rb
CHANGED
data/lib/httprb/request.rb
CHANGED
data/lib/httprb/version.rb
CHANGED
metadata
CHANGED
@@ -1,12 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: httprb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
+
hash: 17
|
4
5
|
prerelease: false
|
5
6
|
segments:
|
6
7
|
- 0
|
7
8
|
- 1
|
8
|
-
-
|
9
|
-
version: 0.1.
|
9
|
+
- 5
|
10
|
+
version: 0.1.5
|
10
11
|
platform: ruby
|
11
12
|
authors:
|
12
13
|
- thomas metge
|
@@ -14,7 +15,7 @@ autorequire:
|
|
14
15
|
bindir: bin
|
15
16
|
cert_chain: []
|
16
17
|
|
17
|
-
date: 2010-11-
|
18
|
+
date: 2010-11-17 00:00:00 -07:00
|
18
19
|
default_executable:
|
19
20
|
dependencies: []
|
20
21
|
|
@@ -33,6 +34,9 @@ files:
|
|
33
34
|
- lib/httprb/request.rb
|
34
35
|
- lib/httprb/version.rb
|
35
36
|
- lib/httprb.rb
|
37
|
+
- tests/test_dsl.rb
|
38
|
+
- tests/test_http_cache.rb
|
39
|
+
- tests/test_request.rb
|
36
40
|
has_rdoc: true
|
37
41
|
homepage: http://github.com/tommetge/httprb
|
38
42
|
licenses: []
|
@@ -43,28 +47,31 @@ rdoc_options: []
|
|
43
47
|
require_paths:
|
44
48
|
- lib
|
45
49
|
required_ruby_version: !ruby/object:Gem::Requirement
|
50
|
+
none: false
|
46
51
|
requirements:
|
47
52
|
- - ">="
|
48
53
|
- !ruby/object:Gem::Version
|
54
|
+
hash: 3
|
49
55
|
segments:
|
50
56
|
- 0
|
51
57
|
version: "0"
|
52
58
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
59
|
+
none: false
|
53
60
|
requirements:
|
54
61
|
- - ">="
|
55
62
|
- !ruby/object:Gem::Version
|
63
|
+
hash: 3
|
56
64
|
segments:
|
57
65
|
- 0
|
58
66
|
version: "0"
|
59
67
|
requirements: []
|
60
68
|
|
61
69
|
rubyforge_project:
|
62
|
-
rubygems_version: 1.3.
|
70
|
+
rubygems_version: 1.3.7
|
63
71
|
signing_key:
|
64
72
|
specification_version: 3
|
65
73
|
summary: "http the ruby way: sinatra-like http client DSL"
|
66
74
|
test_files:
|
67
|
-
- tests/disabled/test_collisions.rb
|
68
75
|
- tests/test_dsl.rb
|
69
76
|
- tests/test_http_cache.rb
|
70
77
|
- tests/test_request.rb
|
@@ -1,30 +0,0 @@
|
|
1
|
-
require 'test/unit'
|
2
|
-
|
3
|
-
$:.unshift File.join(File.dirname(File.dirname(__FILE__)), 'lib')
|
4
|
-
require 'httprb'
|
5
|
-
|
6
|
-
class TestDSL < Test::Unit::TestCase
|
7
|
-
def setup
|
8
|
-
end
|
9
|
-
|
10
|
-
def teardown
|
11
|
-
end
|
12
|
-
|
13
|
-
def test_collisions
|
14
|
-
assert_not_nil res = client_get('http://mozy.com')
|
15
|
-
assert_not_nil res = client_head('mozy.com')
|
16
|
-
assert_not_nil res = client_put('mozy.com')
|
17
|
-
assert_not_nil res = client_post('mozy.com')
|
18
|
-
assert_not_nil res = client_delete('mozy.com')
|
19
|
-
end
|
20
|
-
|
21
|
-
def test_custom_prefix
|
22
|
-
ENV['HTTPRB_COLLISION_PREFIX'] = 'my_client'
|
23
|
-
load 'httprb.rb'
|
24
|
-
assert_not_nil res = my_client_get('mozy.com')
|
25
|
-
assert_not_nil res = my_client_head('mozy.com')
|
26
|
-
assert_not_nil res = my_client_put('mozy.com')
|
27
|
-
assert_not_nil res = my_client_post('mozy.com')
|
28
|
-
assert_not_nil res = my_client_delete('mozy.com')
|
29
|
-
end
|
30
|
-
end
|