jirafe 0.1.0
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/.autotest +5 -0
- data/.gitignore +23 -0
- data/.rbenv-version +1 -0
- data/.rspec +2 -0
- data/.travis.yml +11 -0
- data/Gemfile +8 -0
- data/LICENSE +13 -0
- data/README.md +104 -0
- data/Rakefile +27 -0
- data/fixtures/responses/application_get_with_cloud_token.yml +40 -0
- data/fixtures/responses/application_get_with_invalid_token.yml +41 -0
- data/fixtures/responses/application_get_with_master_token.yml +784 -0
- data/fixtures/responses/application_get_with_reporting_token.yml +38 -0
- data/fixtures/responses/application_post_with_app_token.yml +38 -0
- data/fixtures/responses/application_post_with_cloud_token.yml +76 -0
- data/fixtures/responses/application_post_with_invalid_token.yml +79 -0
- data/fixtures/responses/application_post_with_master_token.yml +784 -0
- data/fixtures/responses/application_post_with_master_token_blank_name.yml +79 -0
- data/fixtures/responses/application_post_with_master_token_dupe_name.yml +76 -0
- data/fixtures/responses/application_post_with_master_token_no_name.yml +79 -0
- data/fixtures/responses/application_post_with_reporting_token.yml +76 -0
- data/fixtures/responses/application_put_with_cloud_token.yml +68 -0
- data/fixtures/responses/application_put_with_invalid_token.yml +145 -0
- data/fixtures/responses/application_put_with_master_token.yml +68 -0
- data/fixtures/responses/application_put_with_reporting_token.yml +68 -0
- data/fixtures/responses/application_sites_get_with_master_token.yml +38 -0
- data/fixtures/responses/callback_event_post_event.yml +2000 -0
- data/fixtures/responses/callback_event_post_event_fetch_token.yml +1473 -0
- data/fixtures/responses/jirafe_resource_get_status_url.yml +38 -0
- data/fixtures/responses/jirafe_resource_get_status_url_with_query_param.yml +38 -0
- data/fixtures/responses/site_abandon_rate_get_with_master_token.yml +49 -0
- data/fixtures/responses/site_abandoned_average_ordervalue_get_with_master_token.yml +49 -0
- data/fixtures/responses/site_abandoned_carts_get_with_master_token.yml +49 -0
- data/fixtures/responses/site_abandoned_revenue_get_with_master_token.yml +49 -0
- data/fixtures/responses/site_average_order_value_get_with_master_token.yml +49 -0
- data/fixtures/responses/site_bounces_rate_get_with_master_token.yml +49 -0
- data/fixtures/responses/site_cart_segmentation_get_with_master_token.yml +38 -0
- data/fixtures/responses/site_conversion_rate_get_with_master_token.yml +49 -0
- data/fixtures/responses/site_conversions_get_with_master_token.yml +49 -0
- data/fixtures/responses/site_customers_get_with_master_token.yml +49 -0
- data/fixtures/responses/site_dashboard_get_with_master_token.yml +60 -0
- data/fixtures/responses/site_get_with_master_token.yml +73 -0
- data/fixtures/responses/site_keywords_get_with_master_token.yml +38 -0
- data/fixtures/responses/site_orders_status_get_with_master_token.yml +38 -0
- data/fixtures/responses/site_origins_get_with_master_token.yml +38 -0
- data/fixtures/responses/site_period_data_get_with_master_token.yml +38 -0
- data/fixtures/responses/site_post_with_app_token.yml +727 -0
- data/fixtures/responses/site_post_with_master_token.yml +1569 -0
- data/fixtures/responses/site_products_get_with_master_token.yml +38 -0
- data/fixtures/responses/site_referers_get_with_master_token.yml +38 -0
- data/fixtures/responses/site_revenues_average_get_with_master_token.yml +49 -0
- data/fixtures/responses/site_revenues_get_with_master_token.yml +49 -0
- data/fixtures/responses/site_segments_carts_get_with_admin_token.yml +108 -0
- data/fixtures/responses/site_segments_sales_get_with_admin_token.yml +143 -0
- data/fixtures/responses/site_total_carts_get_with_master_token.yml +49 -0
- data/fixtures/responses/site_translations__get_with_master_token.yml +155 -0
- data/fixtures/responses/site_translations_de_get_with_master_token.yml +156 -0
- data/fixtures/responses/site_translations_es_get_with_master_token.yml +155 -0
- data/fixtures/responses/site_translations_fr_get_with_master_token.yml +178 -0
- data/fixtures/responses/site_translations_german_get_with_master_token.yml +156 -0
- data/fixtures/responses/site_translations_get_with_master_token.yml +865 -0
- data/fixtures/responses/site_translations_xx_get_with_master_token.yml +155 -0
- data/fixtures/responses/site_visits_get_with_master_token.yml +49 -0
- data/fixtures/responses/status_get.yml +38 -0
- data/fixtures/responses/status_get_500.yml +31 -0
- data/fixtures/responses/test.yml +7364 -0
- data/fixtures/responses/version_get.yml +38 -0
- data/jirafe.gemspec +29 -0
- data/lib/jirafe.rb +64 -0
- data/lib/jirafe/callback/event.rb +57 -0
- data/lib/jirafe/callback/events/order.rb +48 -0
- data/lib/jirafe/callback/events/refund.rb +32 -0
- data/lib/jirafe/callback/jirafe_callback.rb +50 -0
- data/lib/jirafe/configuration.rb +47 -0
- data/lib/jirafe/error.rb +57 -0
- data/lib/jirafe/resource/application.rb +18 -0
- data/lib/jirafe/resource/jirafe_resource.rb +188 -0
- data/lib/jirafe/resource/site.rb +21 -0
- data/lib/jirafe/resource/sites/abandon_rate.rb +16 -0
- data/lib/jirafe/resource/sites/abandoned_average_order_value.rb +17 -0
- data/lib/jirafe/resource/sites/abandoned_carts.rb +16 -0
- data/lib/jirafe/resource/sites/abandoned_revenue.rb +16 -0
- data/lib/jirafe/resource/sites/average_order_value.rb +16 -0
- data/lib/jirafe/resource/sites/bounces_rate.rb +16 -0
- data/lib/jirafe/resource/sites/cart_segmentation.rb +11 -0
- data/lib/jirafe/resource/sites/conversion_rate.rb +16 -0
- data/lib/jirafe/resource/sites/conversions.rb +17 -0
- data/lib/jirafe/resource/sites/customers.rb +16 -0
- data/lib/jirafe/resource/sites/dashboard.rb +27 -0
- data/lib/jirafe/resource/sites/keywords.rb +11 -0
- data/lib/jirafe/resource/sites/orders_status.rb +15 -0
- data/lib/jirafe/resource/sites/origins.rb +11 -0
- data/lib/jirafe/resource/sites/period_data.rb +16 -0
- data/lib/jirafe/resource/sites/products.rb +12 -0
- data/lib/jirafe/resource/sites/referers.rb +12 -0
- data/lib/jirafe/resource/sites/revenues.rb +16 -0
- data/lib/jirafe/resource/sites/revenues_average.rb +16 -0
- data/lib/jirafe/resource/sites/segments_carts.rb +14 -0
- data/lib/jirafe/resource/sites/segments_sales.rb +14 -0
- data/lib/jirafe/resource/sites/total_carts.rb +16 -0
- data/lib/jirafe/resource/sites/translations.rb +18 -0
- data/lib/jirafe/resource/sites/visitors_interest.rb +14 -0
- data/lib/jirafe/resource/sites/visits.rb +16 -0
- data/lib/jirafe/resource/status.rb +19 -0
- data/lib/jirafe/resource/sync_service.rb +1 -0
- data/lib/jirafe/resource/time_series.rb +29 -0
- data/lib/jirafe/resource/user.rb +32 -0
- data/lib/jirafe/resource/version.rb +9 -0
- data/spec/jirafe/callback/event_spec.rb +85 -0
- data/spec/jirafe/configuration_spec.rb +150 -0
- data/spec/jirafe/jirafe_spec.rb +23 -0
- data/spec/jirafe/resource/application_spec.rb +220 -0
- data/spec/jirafe/resource/jirafe_resource_spec.rb +188 -0
- data/spec/jirafe/resource/site_spec.rb +61 -0
- data/spec/jirafe/resource/sites/abandon_rate_spec.rb +11 -0
- data/spec/jirafe/resource/sites/abandoned_average_order_value_spec.rb +11 -0
- data/spec/jirafe/resource/sites/abandoned_carts_spec.rb +11 -0
- data/spec/jirafe/resource/sites/abandoned_revenue_spec.rb +11 -0
- data/spec/jirafe/resource/sites/average_order_value_spec.rb +11 -0
- data/spec/jirafe/resource/sites/bounces_rate_spec.rb +11 -0
- data/spec/jirafe/resource/sites/cart_segmentation_spec.rb +11 -0
- data/spec/jirafe/resource/sites/conversion_rate_spec.rb +11 -0
- data/spec/jirafe/resource/sites/conversions_spec.rb +11 -0
- data/spec/jirafe/resource/sites/customers_spec.rb +11 -0
- data/spec/jirafe/resource/sites/dashboard_spec.rb +29 -0
- data/spec/jirafe/resource/sites/keywords_spec.rb +11 -0
- data/spec/jirafe/resource/sites/orders_status_spec.rb +34 -0
- data/spec/jirafe/resource/sites/origins_spec.rb +11 -0
- data/spec/jirafe/resource/sites/period_data_spec.rb +22 -0
- data/spec/jirafe/resource/sites/products_spec.rb +11 -0
- data/spec/jirafe/resource/sites/referers_spec.rb +11 -0
- data/spec/jirafe/resource/sites/revenues_average_spec.rb +11 -0
- data/spec/jirafe/resource/sites/revenues_spec.rb +11 -0
- data/spec/jirafe/resource/sites/segments_carts_spec.rb +29 -0
- data/spec/jirafe/resource/sites/segments_sales_spec.rb +29 -0
- data/spec/jirafe/resource/sites/total_carts_spec.rb +11 -0
- data/spec/jirafe/resource/sites/translations_spec.rb +76 -0
- data/spec/jirafe/resource/sites/visitors_interest_spec.rb +8 -0
- data/spec/jirafe/resource/sites/visits_spec.rb +11 -0
- data/spec/jirafe/resource/status_spec.rb +31 -0
- data/spec/jirafe/resource/version_spec.rb +15 -0
- data/spec/spec_helper.rb +58 -0
- data/spec/support/callback_server.rb +11 -0
- data/spec/support/response_helper.rb +31 -0
- data/spec/support/shared_examples/empty_resource.rb +17 -0
- data/spec/support/shared_examples/time_series.rb +31 -0
- data/spec/test_configuration.rb +15 -0
- metadata +360 -0
@@ -0,0 +1,79 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: http://api.jirafe.dev/v1/applications?body%5Bname%5D=&body%5Burl%5D=&token=user_master_token
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers: {}
|
10
|
+
response:
|
11
|
+
status:
|
12
|
+
code: 400
|
13
|
+
message: Bad Request
|
14
|
+
headers:
|
15
|
+
Server:
|
16
|
+
- nginx/1.2.2
|
17
|
+
Content-Type:
|
18
|
+
- text/html; charset=UTF-8
|
19
|
+
Transfer-Encoding:
|
20
|
+
- chunked
|
21
|
+
Connection:
|
22
|
+
- keep-alive
|
23
|
+
Keep-Alive:
|
24
|
+
- timeout=10
|
25
|
+
X-Powered-By:
|
26
|
+
- PHP/5.3.15
|
27
|
+
Cache-Control:
|
28
|
+
- no-cache
|
29
|
+
Date:
|
30
|
+
- Tue, 04 Sep 2012 18:41:30 GMT
|
31
|
+
X-Debug-Token:
|
32
|
+
- 50464b5a311fe
|
33
|
+
body:
|
34
|
+
encoding: US-ASCII
|
35
|
+
string: ! '{"error":{"code":400,"message":"Invalid Application resource provided.","data":["[name]()
|
36
|
+
- Application name cannot be blank"]}}
|
37
|
+
|
38
|
+
'
|
39
|
+
http_version:
|
40
|
+
recorded_at: Tue, 04 Sep 2012 18:41:30 GMT
|
41
|
+
- request:
|
42
|
+
method: post
|
43
|
+
uri: http://api.jirafe.dev/v1/applications?token=user_master_token
|
44
|
+
body:
|
45
|
+
encoding: US-ASCII
|
46
|
+
string: name=&url=
|
47
|
+
headers: {}
|
48
|
+
response:
|
49
|
+
status:
|
50
|
+
code: 400
|
51
|
+
message: Bad Request
|
52
|
+
headers:
|
53
|
+
Server:
|
54
|
+
- nginx/1.2.2
|
55
|
+
Content-Type:
|
56
|
+
- text/html; charset=UTF-8
|
57
|
+
Transfer-Encoding:
|
58
|
+
- chunked
|
59
|
+
Connection:
|
60
|
+
- keep-alive
|
61
|
+
Keep-Alive:
|
62
|
+
- timeout=10
|
63
|
+
X-Powered-By:
|
64
|
+
- PHP/5.3.15
|
65
|
+
Cache-Control:
|
66
|
+
- no-cache
|
67
|
+
Date:
|
68
|
+
- Wed, 05 Sep 2012 19:49:43 GMT
|
69
|
+
X-Debug-Token:
|
70
|
+
- 5047acd7b791b
|
71
|
+
body:
|
72
|
+
encoding: US-ASCII
|
73
|
+
string: ! '{"error":{"code":400,"message":"Invalid Application resource provided.","data":["[name]()
|
74
|
+
- Application name cannot be blank"]}}
|
75
|
+
|
76
|
+
'
|
77
|
+
http_version:
|
78
|
+
recorded_at: Wed, 05 Sep 2012 19:49:43 GMT
|
79
|
+
recorded_with: VCR 2.2.4
|
@@ -0,0 +1,76 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: http://api.jirafe.dev/v1/applications?body%5Bname%5D=my%20application&body%5Burl%5D=&token=user_master_token
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers: {}
|
10
|
+
response:
|
11
|
+
status:
|
12
|
+
code: 400
|
13
|
+
message: Bad Request
|
14
|
+
headers:
|
15
|
+
Server:
|
16
|
+
- nginx/1.2.2
|
17
|
+
Content-Type:
|
18
|
+
- text/html; charset=UTF-8
|
19
|
+
Transfer-Encoding:
|
20
|
+
- chunked
|
21
|
+
Connection:
|
22
|
+
- keep-alive
|
23
|
+
Keep-Alive:
|
24
|
+
- timeout=10
|
25
|
+
X-Powered-By:
|
26
|
+
- PHP/5.3.15
|
27
|
+
Cache-Control:
|
28
|
+
- no-cache
|
29
|
+
Date:
|
30
|
+
- Tue, 04 Sep 2012 18:41:30 GMT
|
31
|
+
X-Debug-Token:
|
32
|
+
- 50464b5a17b4e
|
33
|
+
body:
|
34
|
+
encoding: US-ASCII
|
35
|
+
string: ! '{"error":{"code":400,"message":"Invalid Application resource provided.","data":["[name]()
|
36
|
+
- Application name cannot be blank"]}}
|
37
|
+
|
38
|
+
'
|
39
|
+
http_version:
|
40
|
+
recorded_at: Tue, 04 Sep 2012 18:41:30 GMT
|
41
|
+
- request:
|
42
|
+
method: post
|
43
|
+
uri: http://api.jirafe.dev/v1/applications?token=user_master_token
|
44
|
+
body:
|
45
|
+
encoding: US-ASCII
|
46
|
+
string: name=my%20application&url=
|
47
|
+
headers: {}
|
48
|
+
response:
|
49
|
+
status:
|
50
|
+
code: 200
|
51
|
+
message: OK
|
52
|
+
headers:
|
53
|
+
Server:
|
54
|
+
- nginx/1.2.2
|
55
|
+
Content-Type:
|
56
|
+
- application/json
|
57
|
+
Transfer-Encoding:
|
58
|
+
- chunked
|
59
|
+
Connection:
|
60
|
+
- keep-alive
|
61
|
+
Keep-Alive:
|
62
|
+
- timeout=10
|
63
|
+
X-Powered-By:
|
64
|
+
- PHP/5.3.15
|
65
|
+
Cache-Control:
|
66
|
+
- no-cache
|
67
|
+
Date:
|
68
|
+
- Wed, 05 Sep 2012 19:49:43 GMT
|
69
|
+
X-Debug-Token:
|
70
|
+
- 5047acd7a51f8
|
71
|
+
body:
|
72
|
+
encoding: US-ASCII
|
73
|
+
string: ! '{"app_id":"224","name":"my application","token":"93a546c97c986e4a95d960d3a66f61db"}'
|
74
|
+
http_version:
|
75
|
+
recorded_at: Wed, 05 Sep 2012 19:49:43 GMT
|
76
|
+
recorded_with: VCR 2.2.4
|
@@ -0,0 +1,79 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: http://api.jirafe.dev/v1/applications?body%5Bname%5D=&body%5Burl%5D=&token=user_master_token
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers: {}
|
10
|
+
response:
|
11
|
+
status:
|
12
|
+
code: 400
|
13
|
+
message: Bad Request
|
14
|
+
headers:
|
15
|
+
Server:
|
16
|
+
- nginx/1.2.2
|
17
|
+
Content-Type:
|
18
|
+
- text/html; charset=UTF-8
|
19
|
+
Transfer-Encoding:
|
20
|
+
- chunked
|
21
|
+
Connection:
|
22
|
+
- keep-alive
|
23
|
+
Keep-Alive:
|
24
|
+
- timeout=10
|
25
|
+
X-Powered-By:
|
26
|
+
- PHP/5.3.15
|
27
|
+
Cache-Control:
|
28
|
+
- no-cache
|
29
|
+
Date:
|
30
|
+
- Tue, 04 Sep 2012 18:41:30 GMT
|
31
|
+
X-Debug-Token:
|
32
|
+
- 50464b5a45748
|
33
|
+
body:
|
34
|
+
encoding: US-ASCII
|
35
|
+
string: ! '{"error":{"code":400,"message":"Invalid Application resource provided.","data":["[name]()
|
36
|
+
- Application name cannot be blank"]}}
|
37
|
+
|
38
|
+
'
|
39
|
+
http_version:
|
40
|
+
recorded_at: Tue, 04 Sep 2012 18:41:30 GMT
|
41
|
+
- request:
|
42
|
+
method: post
|
43
|
+
uri: http://api.jirafe.dev/v1/applications?token=user_master_token
|
44
|
+
body:
|
45
|
+
encoding: US-ASCII
|
46
|
+
string: name=&url=
|
47
|
+
headers: {}
|
48
|
+
response:
|
49
|
+
status:
|
50
|
+
code: 400
|
51
|
+
message: Bad Request
|
52
|
+
headers:
|
53
|
+
Server:
|
54
|
+
- nginx/1.2.2
|
55
|
+
Content-Type:
|
56
|
+
- text/html; charset=UTF-8
|
57
|
+
Transfer-Encoding:
|
58
|
+
- chunked
|
59
|
+
Connection:
|
60
|
+
- keep-alive
|
61
|
+
Keep-Alive:
|
62
|
+
- timeout=10
|
63
|
+
X-Powered-By:
|
64
|
+
- PHP/5.3.15
|
65
|
+
Cache-Control:
|
66
|
+
- no-cache
|
67
|
+
Date:
|
68
|
+
- Wed, 05 Sep 2012 19:49:43 GMT
|
69
|
+
X-Debug-Token:
|
70
|
+
- 5047acd7ca7dd
|
71
|
+
body:
|
72
|
+
encoding: US-ASCII
|
73
|
+
string: ! '{"error":{"code":400,"message":"Invalid Application resource provided.","data":["[name]()
|
74
|
+
- Application name cannot be blank"]}}
|
75
|
+
|
76
|
+
'
|
77
|
+
http_version:
|
78
|
+
recorded_at: Wed, 05 Sep 2012 19:49:43 GMT
|
79
|
+
recorded_with: VCR 2.2.4
|
@@ -0,0 +1,76 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: http://api.jirafe.dev/v1/applications?body%5Bname%5D=my%20new%20app&body%5Burl%5D=&token=user_reporting_app_token
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers: {}
|
10
|
+
response:
|
11
|
+
status:
|
12
|
+
code: 400
|
13
|
+
message: Bad Request
|
14
|
+
headers:
|
15
|
+
Server:
|
16
|
+
- nginx/1.2.2
|
17
|
+
Content-Type:
|
18
|
+
- text/html; charset=UTF-8
|
19
|
+
Transfer-Encoding:
|
20
|
+
- chunked
|
21
|
+
Connection:
|
22
|
+
- keep-alive
|
23
|
+
Keep-Alive:
|
24
|
+
- timeout=10
|
25
|
+
X-Powered-By:
|
26
|
+
- PHP/5.3.15
|
27
|
+
Cache-Control:
|
28
|
+
- no-cache
|
29
|
+
Date:
|
30
|
+
- Tue, 04 Sep 2012 18:41:30 GMT
|
31
|
+
X-Debug-Token:
|
32
|
+
- 50464b5a74339
|
33
|
+
body:
|
34
|
+
encoding: US-ASCII
|
35
|
+
string: ! '{"error":{"code":400,"message":"Invalid Application resource provided.","data":["[name]()
|
36
|
+
- Application name cannot be blank"]}}
|
37
|
+
|
38
|
+
'
|
39
|
+
http_version:
|
40
|
+
recorded_at: Tue, 04 Sep 2012 18:41:30 GMT
|
41
|
+
- request:
|
42
|
+
method: post
|
43
|
+
uri: http://api.jirafe.dev/v1/applications?token=user_reporting_app_token
|
44
|
+
body:
|
45
|
+
encoding: US-ASCII
|
46
|
+
string: name=my%20new%20app&url=
|
47
|
+
headers: {}
|
48
|
+
response:
|
49
|
+
status:
|
50
|
+
code: 200
|
51
|
+
message: OK
|
52
|
+
headers:
|
53
|
+
Server:
|
54
|
+
- nginx/1.2.2
|
55
|
+
Content-Type:
|
56
|
+
- application/json
|
57
|
+
Transfer-Encoding:
|
58
|
+
- chunked
|
59
|
+
Connection:
|
60
|
+
- keep-alive
|
61
|
+
Keep-Alive:
|
62
|
+
- timeout=10
|
63
|
+
X-Powered-By:
|
64
|
+
- PHP/5.3.15
|
65
|
+
Cache-Control:
|
66
|
+
- no-cache
|
67
|
+
Date:
|
68
|
+
- Wed, 05 Sep 2012 19:49:43 GMT
|
69
|
+
X-Debug-Token:
|
70
|
+
- 5047acd7f2957
|
71
|
+
body:
|
72
|
+
encoding: US-ASCII
|
73
|
+
string: ! '{"app_id":"226","name":"my new app","token":"7961f215d32503668b4d4f0f9c914d8f"}'
|
74
|
+
http_version:
|
75
|
+
recorded_at: Wed, 05 Sep 2012 19:49:44 GMT
|
76
|
+
recorded_with: VCR 2.2.4
|
@@ -0,0 +1,68 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: put
|
5
|
+
uri: http://api.jirafe.dev/v1/applications/1?body%5Bname%5D=my%20new%20app&body%5Burl%5D=&token=user_reporting_app_token
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers: {}
|
10
|
+
response:
|
11
|
+
status:
|
12
|
+
code: 411
|
13
|
+
message: Length Required
|
14
|
+
headers:
|
15
|
+
Server:
|
16
|
+
- nginx/1.2.2
|
17
|
+
Date:
|
18
|
+
- Tue, 04 Sep 2012 18:41:30 GMT
|
19
|
+
Content-Type:
|
20
|
+
- text/html
|
21
|
+
Content-Length:
|
22
|
+
- '180'
|
23
|
+
Connection:
|
24
|
+
- close
|
25
|
+
body:
|
26
|
+
encoding: US-ASCII
|
27
|
+
string: ! "<html>\r\n<head><title>411 Length Required</title></head>\r\n<body
|
28
|
+
bgcolor=\"white\">\r\n<center><h1>411 Length Required</h1></center>\r\n<hr><center>nginx/1.2.2</center>\r\n</body>\r\n</html>\r\n"
|
29
|
+
http_version:
|
30
|
+
recorded_at: Tue, 04 Sep 2012 18:41:30 GMT
|
31
|
+
- request:
|
32
|
+
method: put
|
33
|
+
uri: http://api.jirafe.dev/v1/applications/1?token=user_reporting_app_token
|
34
|
+
body:
|
35
|
+
encoding: US-ASCII
|
36
|
+
string: name=my%20new%20app&url=
|
37
|
+
headers: {}
|
38
|
+
response:
|
39
|
+
status:
|
40
|
+
code: 403
|
41
|
+
message: Forbidden
|
42
|
+
headers:
|
43
|
+
Server:
|
44
|
+
- nginx/1.2.2
|
45
|
+
Content-Type:
|
46
|
+
- text/html; charset=UTF-8
|
47
|
+
Transfer-Encoding:
|
48
|
+
- chunked
|
49
|
+
Connection:
|
50
|
+
- keep-alive
|
51
|
+
Keep-Alive:
|
52
|
+
- timeout=10
|
53
|
+
X-Powered-By:
|
54
|
+
- PHP/5.3.15
|
55
|
+
Cache-Control:
|
56
|
+
- no-cache
|
57
|
+
Date:
|
58
|
+
- Wed, 05 Sep 2012 19:49:44 GMT
|
59
|
+
X-Debug-Token:
|
60
|
+
- 5047acd87b901
|
61
|
+
body:
|
62
|
+
encoding: US-ASCII
|
63
|
+
string: ! '{"error":{"code":403,"message":"Access denied."}}
|
64
|
+
|
65
|
+
'
|
66
|
+
http_version:
|
67
|
+
recorded_at: Wed, 05 Sep 2012 19:49:44 GMT
|
68
|
+
recorded_with: VCR 2.2.4
|
@@ -0,0 +1,145 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: http://api.jirafe.dev/v1/applications/1?body%5Bname%5D=my%20new%20app&body%5Burl%5D=&token=__invalid_token__
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers: {}
|
10
|
+
response:
|
11
|
+
status:
|
12
|
+
code: 401
|
13
|
+
message: Unauthorized
|
14
|
+
headers:
|
15
|
+
Server:
|
16
|
+
- nginx/1.2.2
|
17
|
+
Content-Type:
|
18
|
+
- text/html; charset=UTF-8
|
19
|
+
Transfer-Encoding:
|
20
|
+
- chunked
|
21
|
+
Connection:
|
22
|
+
- keep-alive
|
23
|
+
Keep-Alive:
|
24
|
+
- timeout=10
|
25
|
+
X-Powered-By:
|
26
|
+
- PHP/5.3.15
|
27
|
+
Cache-Control:
|
28
|
+
- no-cache
|
29
|
+
Date:
|
30
|
+
- Tue, 04 Sep 2012 18:41:30 GMT
|
31
|
+
X-Debug-Token:
|
32
|
+
- 50464b5ac69a2
|
33
|
+
body:
|
34
|
+
encoding: US-ASCII
|
35
|
+
string: ! '{"error":{"code":401,"message":"Jirafe API authentication failed
|
36
|
+
using token '__invalid_token__'."}}
|
37
|
+
|
38
|
+
'
|
39
|
+
http_version:
|
40
|
+
recorded_at: Tue, 04 Sep 2012 18:41:30 GMT
|
41
|
+
- request:
|
42
|
+
method: put
|
43
|
+
uri: http://api.jirafe.dev/v1/applications/1?body%5Bname%5D=my%20new%20app&body%5Burl%5D=&token=__invalid_token__
|
44
|
+
body:
|
45
|
+
encoding: US-ASCII
|
46
|
+
string: ''
|
47
|
+
headers: {}
|
48
|
+
response:
|
49
|
+
status:
|
50
|
+
code: 411
|
51
|
+
message: Length Required
|
52
|
+
headers:
|
53
|
+
Server:
|
54
|
+
- nginx/1.2.2
|
55
|
+
Date:
|
56
|
+
- Tue, 04 Sep 2012 18:41:30 GMT
|
57
|
+
Content-Type:
|
58
|
+
- text/html
|
59
|
+
Content-Length:
|
60
|
+
- '180'
|
61
|
+
Connection:
|
62
|
+
- close
|
63
|
+
body:
|
64
|
+
encoding: US-ASCII
|
65
|
+
string: ! "<html>\r\n<head><title>411 Length Required</title></head>\r\n<body
|
66
|
+
bgcolor=\"white\">\r\n<center><h1>411 Length Required</h1></center>\r\n<hr><center>nginx/1.2.2</center>\r\n</body>\r\n</html>\r\n"
|
67
|
+
http_version:
|
68
|
+
recorded_at: Tue, 04 Sep 2012 18:41:30 GMT
|
69
|
+
- request:
|
70
|
+
method: post
|
71
|
+
uri: http://api.jirafe.dev/v1/applications/1?token=__invalid_token__
|
72
|
+
body:
|
73
|
+
encoding: US-ASCII
|
74
|
+
string: name=my%20new%20app&url=
|
75
|
+
headers: {}
|
76
|
+
response:
|
77
|
+
status:
|
78
|
+
code: 401
|
79
|
+
message: Unauthorized
|
80
|
+
headers:
|
81
|
+
Server:
|
82
|
+
- nginx/1.2.2
|
83
|
+
Content-Type:
|
84
|
+
- text/html; charset=UTF-8
|
85
|
+
Transfer-Encoding:
|
86
|
+
- chunked
|
87
|
+
Connection:
|
88
|
+
- keep-alive
|
89
|
+
Keep-Alive:
|
90
|
+
- timeout=10
|
91
|
+
X-Powered-By:
|
92
|
+
- PHP/5.3.15
|
93
|
+
Cache-Control:
|
94
|
+
- no-cache
|
95
|
+
Date:
|
96
|
+
- Wed, 05 Sep 2012 19:49:44 GMT
|
97
|
+
X-Debug-Token:
|
98
|
+
- 5047acd843a87
|
99
|
+
body:
|
100
|
+
encoding: US-ASCII
|
101
|
+
string: ! '{"error":{"code":401,"message":"Jirafe API authentication failed
|
102
|
+
using token '__invalid_token__'."}}
|
103
|
+
|
104
|
+
'
|
105
|
+
http_version:
|
106
|
+
recorded_at: Wed, 05 Sep 2012 19:49:44 GMT
|
107
|
+
- request:
|
108
|
+
method: put
|
109
|
+
uri: http://api.jirafe.dev/v1/applications/1?token=__invalid_token__
|
110
|
+
body:
|
111
|
+
encoding: US-ASCII
|
112
|
+
string: name=my%20new%20app&url=
|
113
|
+
headers: {}
|
114
|
+
response:
|
115
|
+
status:
|
116
|
+
code: 401
|
117
|
+
message: Unauthorized
|
118
|
+
headers:
|
119
|
+
Server:
|
120
|
+
- nginx/1.2.2
|
121
|
+
Content-Type:
|
122
|
+
- text/html; charset=UTF-8
|
123
|
+
Transfer-Encoding:
|
124
|
+
- chunked
|
125
|
+
Connection:
|
126
|
+
- keep-alive
|
127
|
+
Keep-Alive:
|
128
|
+
- timeout=10
|
129
|
+
X-Powered-By:
|
130
|
+
- PHP/5.3.15
|
131
|
+
Cache-Control:
|
132
|
+
- no-cache
|
133
|
+
Date:
|
134
|
+
- Wed, 05 Sep 2012 19:49:44 GMT
|
135
|
+
X-Debug-Token:
|
136
|
+
- 5047acd89cfec
|
137
|
+
body:
|
138
|
+
encoding: US-ASCII
|
139
|
+
string: ! '{"error":{"code":401,"message":"Jirafe API authentication failed
|
140
|
+
using token '__invalid_token__'."}}
|
141
|
+
|
142
|
+
'
|
143
|
+
http_version:
|
144
|
+
recorded_at: Wed, 05 Sep 2012 19:49:44 GMT
|
145
|
+
recorded_with: VCR 2.2.4
|