rufus-jig 0.1.21 → 0.1.22

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,37 @@
1
+
2
+ #
3
+ # testing rufus-jig
4
+ #
5
+ # Fri Sep 24 17:11:26 JST 2010
6
+ #
7
+
8
+ require File.join(File.dirname(__FILE__), 'base')
9
+
10
+
11
+ class UtAuthTest < Test::Unit::TestCase
12
+
13
+ def setup
14
+ @h = Rufus::Jig::Http.new(
15
+ '127.0.0.1', 4567, :basic_auth => %w[ admin nimda ])
16
+ end
17
+ def teardown
18
+ @h.close
19
+ end
20
+
21
+ def test_denied
22
+
23
+ h = Rufus::Jig::Http.new('127.0.0.1', 4567)
24
+
25
+ assert_raise Rufus::Jig::HttpError do
26
+ h.get('/protected')
27
+ end
28
+ end
29
+
30
+ def test_authorized
31
+
32
+ assert_equal(
33
+ { 'info' => 'secretive' },
34
+ @h.get('/protected'))
35
+ end
36
+ end
37
+
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 1
8
- - 21
9
- version: 0.1.21
8
+ - 22
9
+ version: 0.1.22
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-09-21 00:00:00 +09:00
18
+ date: 2010-09-30 00:00:00 +09:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -125,6 +125,8 @@ files:
125
125
  - lib/rufus/jig.rb
126
126
  - lib/rufus/jig/adapters/em.rb
127
127
  - lib/rufus/jig/adapters/net.rb
128
+ - lib/rufus/jig/adapters/net_persistent.rb
129
+ - lib/rufus/jig/adapters/net_response.rb
128
130
  - lib/rufus/jig/adapters/patron.rb
129
131
  - lib/rufus/jig/couch.rb
130
132
  - lib/rufus/jig/http.rb
@@ -132,14 +134,18 @@ files:
132
134
  - lib/rufus/jig/version.rb
133
135
  - rufus-jig.gemspec
134
136
  - test/base.rb
137
+ - test/bm/bm0.rb
138
+ - test/bm/bm1.rb
135
139
  - test/conc/put_vs_delete.rb
136
140
  - test/couch_base.rb
141
+ - test/couch_url.txt
137
142
  - test/ct_0_couch.rb
138
143
  - test/ct_1_couchdb.rb
139
144
  - test/ct_2_couchdb_options.rb
140
145
  - test/ct_3_couchdb_views.rb
141
146
  - test/ct_4_attachments.rb
142
147
  - test/ct_5_couchdb_continuous.rb
148
+ - test/cut_0_auth_couch.rb
143
149
  - test/server.rb
144
150
  - test/test.rb
145
151
  - test/to.sh
@@ -153,6 +159,7 @@ files:
153
159
  - test/ut_5_http_misc.rb
154
160
  - test/ut_6_args.rb
155
161
  - test/ut_7_parse_uri.rb
162
+ - test/ut_8_auth.rb
156
163
  has_rdoc: true
157
164
  homepage: http://github.com/jmettraux/rufus-jig/
158
165
  licenses: []