analysand 1.1.0 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +8 -1
- data/Rakefile +14 -0
- data/lib/analysand/change_watcher.rb +1 -1
- data/lib/analysand/config_response.rb +24 -0
- data/lib/analysand/database.rb +13 -74
- data/lib/analysand/errors.rb +16 -0
- data/lib/analysand/http.rb +80 -0
- data/lib/analysand/instance.rb +128 -83
- data/lib/analysand/response.rb +8 -18
- data/lib/analysand/response_headers.rb +18 -0
- data/lib/analysand/session_response.rb +16 -0
- data/lib/analysand/status_code_predicates.rb +17 -0
- data/lib/analysand/streaming_view_response.rb +6 -16
- data/lib/analysand/version.rb +1 -1
- data/lib/analysand/viewing.rb +4 -4
- data/spec/analysand/a_response.rb +45 -1
- data/spec/analysand/a_session_grantor.rb +1 -1
- data/spec/analysand/database_spec.rb +14 -0
- data/spec/analysand/instance_spec.rb +104 -37
- data/spec/analysand/view_streaming_spec.rb +1 -1
- data/spec/fixtures/vcr_cassettes/get_config.yml +40 -0
- data/spec/fixtures/vcr_cassettes/get_many_config.yml +40 -0
- data/spec/fixtures/vcr_cassettes/reload_config.yml +114 -0
- data/spec/fixtures/vcr_cassettes/set_config.yml +77 -0
- data/spec/fixtures/vcr_cassettes/unauthorized_set_config.yml +43 -0
- data/spec/fixtures/vcr_cassettes/view.yml +1 -1
- data/spec/smoke/database_thread_spec.rb +59 -0
- metadata +215 -123
- data/spec/fixtures/vcr_cassettes/get_session_does_not_refresh_cookie.yml +0 -73
- data/spec/fixtures/vcr_cassettes/get_session_refreshes_cookie.yml +0 -75
@@ -1,73 +0,0 @@
|
|
1
|
-
---
|
2
|
-
http_interactions:
|
3
|
-
- request:
|
4
|
-
method: post
|
5
|
-
uri: http://localhost:5984/_session
|
6
|
-
body:
|
7
|
-
string: name=admin&password=admin
|
8
|
-
headers:
|
9
|
-
Connection:
|
10
|
-
- keep-alive
|
11
|
-
Accept:
|
12
|
-
- "*/*"
|
13
|
-
Keep-Alive:
|
14
|
-
- 30
|
15
|
-
Content-Type:
|
16
|
-
- application/x-www-form-urlencoded
|
17
|
-
response:
|
18
|
-
status:
|
19
|
-
code: 200
|
20
|
-
message: OK
|
21
|
-
headers:
|
22
|
-
Date:
|
23
|
-
- Sat, 31 Mar 2012 22:35:18 GMT
|
24
|
-
Set-Cookie:
|
25
|
-
- AuthSession=YWRtaW46NEY3Nzg2QTY6WVqDNxuHpu4OPp07rib-n9WQLt8; Version=1; Path=/; HttpOnly
|
26
|
-
Server:
|
27
|
-
- CouchDB/1.3.0a-d0a5bf0-git (Erlang OTP/R14B02)
|
28
|
-
Content-Length:
|
29
|
-
- "56"
|
30
|
-
Content-Type:
|
31
|
-
- text/plain; charset=utf-8
|
32
|
-
Cache-Control:
|
33
|
-
- must-revalidate
|
34
|
-
body:
|
35
|
-
string: |
|
36
|
-
{"ok":true,"name":null,"roles":["_admin","site_admin"]}
|
37
|
-
recorded_at: Sat, 31 Mar 2012 22:35:18 GMT
|
38
|
-
- request:
|
39
|
-
method: get
|
40
|
-
uri: http://localhost:5984/_session
|
41
|
-
headers:
|
42
|
-
Cookie:
|
43
|
-
- AuthSession=YWRtaW46NEY3Nzg2QTY6WVqDNxuHpu4OPp07rib-n9WQLt8; Version=1; Path=/; HttpOnly
|
44
|
-
Connection:
|
45
|
-
- keep-alive
|
46
|
-
Accept:
|
47
|
-
- "*/*"
|
48
|
-
Keep-Alive:
|
49
|
-
- 30
|
50
|
-
Content-Type:
|
51
|
-
- application/x-www-form-urlencoded
|
52
|
-
response:
|
53
|
-
status:
|
54
|
-
code: 200
|
55
|
-
message: OK
|
56
|
-
headers:
|
57
|
-
Date:
|
58
|
-
- Sat, 31 Mar 2012 22:35:18 GMT
|
59
|
-
Server:
|
60
|
-
- CouchDB/1.3.0a-d0a5bf0-git (Erlang OTP/R14B02)
|
61
|
-
Content-Length:
|
62
|
-
- "56"
|
63
|
-
Content-Type:
|
64
|
-
- text/plain; charset=utf-8
|
65
|
-
Cache-Control:
|
66
|
-
- must-revalidate
|
67
|
-
body:
|
68
|
-
string: |
|
69
|
-
{"ok":true,"userCtx":{"name":null,"roles":["_admin","site_admin"]},"info":{"authentication_db":"_users","authentication_handlers":["oauth","cookie","default"]}}
|
70
|
-
|
71
|
-
http_version:
|
72
|
-
recorded_at: Sat, 31 Mar 2012 22:35:18 GMT
|
73
|
-
recorded_with: VCR 2.0.1
|
@@ -1,75 +0,0 @@
|
|
1
|
-
---
|
2
|
-
http_interactions:
|
3
|
-
- request:
|
4
|
-
method: post
|
5
|
-
uri: http://localhost:5984/_session
|
6
|
-
body:
|
7
|
-
string: name=admin&password=admin
|
8
|
-
headers:
|
9
|
-
Connection:
|
10
|
-
- keep-alive
|
11
|
-
Accept:
|
12
|
-
- "*/*"
|
13
|
-
Keep-Alive:
|
14
|
-
- 30
|
15
|
-
Content-Type:
|
16
|
-
- application/x-www-form-urlencoded
|
17
|
-
response:
|
18
|
-
status:
|
19
|
-
code: 200
|
20
|
-
message: OK
|
21
|
-
headers:
|
22
|
-
Date:
|
23
|
-
- Sat, 31 Mar 2012 22:35:18 GMT
|
24
|
-
Set-Cookie:
|
25
|
-
- AuthSession=YWRtaW46NEY3Nzg2QTY6WVqDNxuHpu4OPp07rib-n9WQLt8; Version=1; Path=/; HttpOnly
|
26
|
-
Server:
|
27
|
-
- CouchDB/1.3.0a-d0a5bf0-git (Erlang OTP/R14B02)
|
28
|
-
Content-Length:
|
29
|
-
- "56"
|
30
|
-
Content-Type:
|
31
|
-
- text/plain; charset=utf-8
|
32
|
-
Cache-Control:
|
33
|
-
- must-revalidate
|
34
|
-
body:
|
35
|
-
string: |
|
36
|
-
{"ok":true,"name":null,"roles":["_admin","site_admin"]}
|
37
|
-
recorded_at: Sat, 31 Mar 2012 22:35:18 GMT
|
38
|
-
- request:
|
39
|
-
method: get
|
40
|
-
uri: http://localhost:5984/_session
|
41
|
-
headers:
|
42
|
-
Cookie:
|
43
|
-
- AuthSession=YWRtaW46NEY3Nzg2QTY6WVqDNxuHpu4OPp07rib-n9WQLt8; Version=1; Path=/; HttpOnly
|
44
|
-
Connection:
|
45
|
-
- keep-alive
|
46
|
-
Accept:
|
47
|
-
- "*/*"
|
48
|
-
Keep-Alive:
|
49
|
-
- 30
|
50
|
-
Content-Type:
|
51
|
-
- application/x-www-form-urlencoded
|
52
|
-
response:
|
53
|
-
status:
|
54
|
-
code: 200
|
55
|
-
message: OK
|
56
|
-
headers:
|
57
|
-
Date:
|
58
|
-
- Sat, 31 Mar 2012 22:35:18 GMT
|
59
|
-
Set-Cookie:
|
60
|
-
- AuthSession=YWRtaW46NEY3Nzg3RTk6Lj1LSc4dWHBMZoFKm9ZMxq0L3Ec; Version=1; Path=/; HttpOnly
|
61
|
-
Server:
|
62
|
-
- CouchDB/1.3.0a-d0a5bf0-git (Erlang OTP/R14B02)
|
63
|
-
Content-Length:
|
64
|
-
- "56"
|
65
|
-
Content-Type:
|
66
|
-
- text/plain; charset=utf-8
|
67
|
-
Cache-Control:
|
68
|
-
- must-revalidate
|
69
|
-
body:
|
70
|
-
string: |
|
71
|
-
{"ok":true,"userCtx":{"name":null,"roles":["_admin","site_admin"]},"info":{"authentication_db":"_users","authentication_handlers":["oauth","cookie","default"]}}
|
72
|
-
|
73
|
-
http_version:
|
74
|
-
recorded_at: Sat, 31 Mar 2012 22:35:18 GMT
|
75
|
-
recorded_with: VCR 2.0.1
|