redbooth-ruby 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/spec/cassettes/RedboothRuby_Conversation/_create/.yml +47 -0
- data/spec/cassettes/RedboothRuby_Conversation/_create/makes_a_new_POST_request_using_the_correct_API_endpoint_to_create_a_specific_conversation.yml +47 -0
- data/spec/cassettes/RedboothRuby_Conversation/_delete/makes_a_new_DELETE_request_using_the_correct_API_endpoint_to_delete_a_specific_conversation.yml +84 -0
- data/spec/cassettes/RedboothRuby_Conversation/_index/.yml +99 -0
- data/spec/cassettes/RedboothRuby_Conversation/_index/makes_a_new_GET_request_using_the_correct_API_endpoint_to_receive_conversations_collection.yml +99 -0
- data/spec/cassettes/RedboothRuby_Conversation/_initialize/.yml +45 -0
- data/spec/cassettes/RedboothRuby_Conversation/_show/.yml +45 -0
- data/spec/cassettes/RedboothRuby_Conversation/_show/makes_a_new_GET_request_using_the_correct_API_endpoint_to_receive_a_specific_conversation.yml +45 -0
- data/spec/cassettes/RedboothRuby_Conversation/_update/.yml +47 -0
- data/spec/cassettes/RedboothRuby_Conversation/_update/makes_a_new_PUT_request_using_the_correct_API_endpoint_to_receive_a_specific_conversation.yml +47 -0
- data/spec/cassettes/{Redbooth_Me → RedboothRuby_Me}/_initialize/.yml +0 -0
- data/spec/cassettes/{Redbooth_Me → RedboothRuby_Me}/_show/.yml +0 -0
- data/spec/cassettes/{Redbooth_Me → RedboothRuby_Me}/_show/makes_a_new_GET_request_using_the_correct_API_endpoint_to_receive_a_specific_user.yml +0 -0
- data/spec/cassettes/{Redbooth_Me → RedboothRuby_Me}/_update/.yml +0 -0
- data/spec/cassettes/{Redbooth_Me → RedboothRuby_Me}/_update/integration/.yml +0 -0
- data/spec/cassettes/RedboothRuby_Membership/_create/integration/.yml +83 -0
- data/spec/cassettes/RedboothRuby_Membership/_delete/makes_a_new_DELETE_request_using_the_correct_API_endpoint_to_delete_a_specific_membership.yml +83 -0
- data/spec/cassettes/RedboothRuby_Membership/_index/.yml +58 -0
- data/spec/cassettes/RedboothRuby_Membership/_index/makes_a_new_PUT_request_using_the_correct_API_endpoint_to_receive_a_specific_membership.yml +58 -0
- data/spec/cassettes/RedboothRuby_Membership/_initialize/.yml +44 -0
- data/spec/cassettes/RedboothRuby_Membership/_show/.yml +44 -0
- data/spec/cassettes/RedboothRuby_Membership/_show/makes_a_new_GET_request_using_the_correct_API_endpoint_to_receive_a_specific_membership.yml +44 -0
- data/spec/cassettes/RedboothRuby_Membership/_update/.yml +46 -0
- data/spec/cassettes/RedboothRuby_Membership/_update/makes_a_new_PUT_request_using_the_correct_API_endpoint_to_receive_a_specific_membership.yml +46 -0
- data/spec/cassettes/{Redbooth_Organization → RedboothRuby_Organization}/_create/.yml +0 -0
- data/spec/cassettes/{Redbooth_Organization → RedboothRuby_Organization}/_create/makes_a_new_POST_request_using_the_correct_API_endpoint_to_create_a_specific_organization.yml +0 -0
- data/spec/cassettes/{Redbooth_Organization → RedboothRuby_Organization}/_delete/makes_a_new_DELETE_request_using_the_correct_API_endpoint_to_delete_a_specific_organization.yml +0 -0
- data/spec/cassettes/{Redbooth_Organization → RedboothRuby_Organization}/_index/.yml +0 -0
- data/spec/cassettes/{Redbooth_Organization → RedboothRuby_Organization}/_index/makes_a_new_PUT_request_using_the_correct_API_endpoint_to_receive_a_specific_organization.yml +0 -0
- data/spec/cassettes/{Redbooth_Organization → RedboothRuby_Organization}/_initialize/.yml +0 -0
- data/spec/cassettes/{Redbooth_Organization → RedboothRuby_Organization}/_show/.yml +0 -0
- data/spec/cassettes/{Redbooth_Organization → RedboothRuby_Organization}/_show/makes_a_new_GET_request_using_the_correct_API_endpoint_to_receive_a_specific_organization.yml +0 -0
- data/spec/cassettes/{Redbooth_Organization → RedboothRuby_Organization}/_update/.yml +0 -0
- data/spec/cassettes/{Redbooth_Organization → RedboothRuby_Organization}/_update/makes_a_new_PUT_request_using_the_correct_API_endpoint_to_receive_a_specific_organization.yml +0 -0
- data/spec/cassettes/{Redbooth_Person → RedboothRuby_Person}/_create/integration/.yml +0 -0
- data/spec/cassettes/{Redbooth_Person → RedboothRuby_Person}/_create/makes_a_new_POST_request_using_the_correct_API_endpoint_to_create_a_specific_person.yml +0 -0
- data/spec/cassettes/{Redbooth_Person → RedboothRuby_Person}/_delete/makes_a_new_DELETE_request_using_the_correct_API_endpoint_to_delete_a_specific_person.yml +0 -0
- data/spec/cassettes/{Redbooth_Person → RedboothRuby_Person}/_index/.yml +0 -0
- data/spec/cassettes/{Redbooth_Person → RedboothRuby_Person}/_index/makes_a_new_PUT_request_using_the_correct_API_endpoint_to_receive_a_specific_person.yml +0 -0
- data/spec/cassettes/{Redbooth_Person → RedboothRuby_Person}/_initialize/.yml +0 -0
- data/spec/cassettes/{Redbooth_Person → RedboothRuby_Person}/_show/.yml +0 -0
- data/spec/cassettes/{Redbooth_Person → RedboothRuby_Person}/_show/makes_a_new_GET_request_using_the_correct_API_endpoint_to_receive_a_specific_person.yml +0 -0
- data/spec/cassettes/{Redbooth_Person → RedboothRuby_Person}/_update/.yml +0 -0
- data/spec/cassettes/{Redbooth_Person → RedboothRuby_Person}/_update/makes_a_new_PUT_request_using_the_correct_API_endpoint_to_receive_a_specific_person.yml +0 -0
- data/spec/cassettes/{Redbooth_Project → RedboothRuby_Project}/_create/.yml +0 -0
- data/spec/cassettes/{Redbooth_Project → RedboothRuby_Project}/_create/makes_a_new_POST_request_using_the_correct_API_endpoint_to_create_a_specific_project.yml +0 -0
- data/spec/cassettes/{Redbooth_Project → RedboothRuby_Project}/_delete/makes_a_new_DELETE_request_using_the_correct_API_endpoint_to_delete_a_specific_project.yml +0 -0
- data/spec/cassettes/{Redbooth_Project → RedboothRuby_Project}/_index/.yml +0 -0
- data/spec/cassettes/{Redbooth_Project → RedboothRuby_Project}/_index/makes_a_new_PUT_request_using_the_correct_API_endpoint_to_receive_a_specific_project.yml +0 -0
- data/spec/cassettes/{Redbooth_Project → RedboothRuby_Project}/_initialize/.yml +0 -0
- data/spec/cassettes/{Redbooth_Project → RedboothRuby_Project}/_show/.yml +0 -0
- data/spec/cassettes/{Redbooth_Project → RedboothRuby_Project}/_show/makes_a_new_GET_request_using_the_correct_API_endpoint_to_receive_a_specific_project.yml +0 -0
- data/spec/cassettes/{Redbooth_Project → RedboothRuby_Project}/_update/.yml +0 -0
- data/spec/cassettes/{Redbooth_Project → RedboothRuby_Project}/_update/makes_a_new_PUT_request_using_the_correct_API_endpoint_to_receive_a_specific_project.yml +0 -0
- data/spec/cassettes/{Redbooth_Request_Collection → RedboothRuby_Request_Collection}/_all/.yml +0 -0
- data/spec/cassettes/{Redbooth_Request_Collection → RedboothRuby_Request_Collection}/_count/.yml +0 -0
- data/spec/cassettes/{Redbooth_Request_Collection → RedboothRuby_Request_Collection}/_current_page/.yml +0 -0
- data/spec/cassettes/{Redbooth_Request_Collection → RedboothRuby_Request_Collection}/_current_page/where_endpoint_is_not_paginated/.yml +0 -0
- data/spec/cassettes/{Redbooth_Request_Collection → RedboothRuby_Request_Collection}/_initialize/.yml +0 -0
- data/spec/cassettes/{Redbooth_Request_Collection → RedboothRuby_Request_Collection}/_next_page/.yml +0 -0
- data/spec/cassettes/{Redbooth_Request_Collection → RedboothRuby_Request_Collection}/_next_page/where_endpoint_is_not_paginated/.yml +0 -0
- data/spec/cassettes/{Redbooth_Request_Collection → RedboothRuby_Request_Collection}/_next_page/where_is_the_last_page/.yml +0 -0
- data/spec/cassettes/{Redbooth_Request_Collection → RedboothRuby_Request_Collection}/_per_page/.yml +0 -0
- data/spec/cassettes/{Redbooth_Request_Collection → RedboothRuby_Request_Collection}/_per_page/where_endpoint_is_not_paginated/.yml +0 -0
- data/spec/cassettes/{Redbooth_Request_Collection → RedboothRuby_Request_Collection}/_prev_page/.yml +0 -0
- data/spec/cassettes/{Redbooth_Request_Collection → RedboothRuby_Request_Collection}/_prev_page/where_endpoint_is_not_paginated/.yml +0 -0
- data/spec/cassettes/{Redbooth_Request_Collection → RedboothRuby_Request_Collection}/_prev_page/where_is_the_first_page/.yml +0 -0
- data/spec/cassettes/{Redbooth_Request_Collection → RedboothRuby_Request_Collection}/_total_pages/.yml +0 -0
- data/spec/cassettes/{Redbooth_Request_Collection → RedboothRuby_Request_Collection}/_total_pages/where_endpoint_is_not_paginated/.yml +0 -0
- data/spec/cassettes/{Redbooth_Task → RedboothRuby_Task}/_create/.yml +0 -0
- data/spec/cassettes/{Redbooth_Task → RedboothRuby_Task}/_create/makes_a_new_POST_request_using_the_correct_API_endpoint_to_create_a_specific_task.yml +0 -0
- data/spec/cassettes/{Redbooth_Task → RedboothRuby_Task}/_delete/makes_a_new_DELETE_request_using_the_correct_API_endpoint_to_delete_a_specific_task.yml +0 -0
- data/spec/cassettes/{Redbooth_Task → RedboothRuby_Task}/_index/.yml +0 -0
- data/spec/cassettes/{Redbooth_Task → RedboothRuby_Task}/_index/makes_a_new_PUT_request_using_the_correct_API_endpoint_to_receive_a_specific_task.yml +0 -0
- data/spec/cassettes/{Redbooth_Task → RedboothRuby_Task}/_initialize/.yml +0 -0
- data/spec/cassettes/{Redbooth_Task → RedboothRuby_Task}/_show/makes_a_new_GET_request_using_the_correct_API_endpoint_to_receive_a_specific_task.yml +0 -0
- data/spec/cassettes/{Redbooth_Task → RedboothRuby_Task}/_show/returns_a_task_with_the_correct_assigned_id.yml +0 -0
- data/spec/cassettes/{Redbooth_Task → RedboothRuby_Task}/_show/returns_a_task_with_the_correct_id.yml +0 -0
- data/spec/cassettes/{Redbooth_Task → RedboothRuby_Task}/_show/returns_a_task_with_the_correct_name.yml +0 -0
- data/spec/cassettes/{Redbooth_Task → RedboothRuby_Task}/_show/returns_a_task_with_the_correct_project_id.yml +0 -0
- data/spec/cassettes/{Redbooth_Task → RedboothRuby_Task}/_update/.yml +0 -0
- data/spec/cassettes/{Redbooth_Task → RedboothRuby_Task}/_update/makes_a_new_PUT_request_using_the_correct_API_endpoint_to_receive_a_specific_task.yml +0 -0
- data/spec/cassettes/{Redbooth_User → RedboothRuby_User}/_create/.yml +0 -0
- data/spec/cassettes/{Redbooth_User → RedboothRuby_User}/_create/makes_a_new_POST_request_using_the_correct_API_endpoint_to_create_a_specific_task.yml +0 -0
- data/spec/cassettes/{Redbooth_User → RedboothRuby_User}/_create/makes_a_new_PUT_request_using_the_correct_API_endpoint_to_receive_a_specific_task.yml +0 -0
- data/spec/cassettes/{Redbooth_User → RedboothRuby_User}/_create/name/.yml +0 -0
- data/spec/cassettes/{Redbooth_User → RedboothRuby_User}/_create/project_id/.yml +0 -0
- data/spec/cassettes/{Redbooth_User → RedboothRuby_User}/_create/task_list_id/.yml +0 -0
- data/spec/cassettes/{Redbooth_User → RedboothRuby_User}/_delete/makes_a_new_DELETE_request_using_the_correct_API_endpoint_to_delete_a_specific_task.yml +0 -0
- data/spec/cassettes/{Redbooth_User → RedboothRuby_User}/_index/.yml +0 -0
- data/spec/cassettes/{Redbooth_User → RedboothRuby_User}/_index/class/.yml +0 -0
- data/spec/cassettes/{Redbooth_User → RedboothRuby_User}/_index/makes_a_new_PUT_request_using_the_correct_API_endpoint_to_receive_a_specific_task.yml +0 -0
- data/spec/cassettes/{Redbooth_User → RedboothRuby_User}/_initialize/.yml +0 -0
- data/spec/cassettes/{Redbooth_User → RedboothRuby_User}/_initialize/assigned_id/.yml +0 -0
- data/spec/cassettes/{Redbooth_User → RedboothRuby_User}/_initialize/description/.yml +0 -0
- data/spec/cassettes/{Redbooth_User → RedboothRuby_User}/_initialize/due_on/.yml +0 -0
- data/spec/cassettes/{Redbooth_User → RedboothRuby_User}/_initialize/id/.yml +0 -0
- data/spec/cassettes/{Redbooth_User → RedboothRuby_User}/_initialize/initializes_all_attributes_correctly.yml +0 -0
- data/spec/cassettes/{Redbooth_User → RedboothRuby_User}/_initialize/name/.yml +0 -0
- data/spec/cassettes/{Redbooth_User → RedboothRuby_User}/_initialize/project_id/.yml +0 -0
- data/spec/cassettes/{Redbooth_User → RedboothRuby_User}/_show/.yml +0 -0
- data/spec/cassettes/{Redbooth_User → RedboothRuby_User}/_show/makes_a_new_GET_request_using_the_correct_API_endpoint_to_receive_a_specific_task.yml +0 -0
- data/spec/cassettes/{Redbooth_User → RedboothRuby_User}/_show/makes_a_new_GET_request_using_the_correct_API_endpoint_to_receive_a_specific_user.yml +0 -0
- data/spec/cassettes/{Redbooth_User → RedboothRuby_User}/_show/returns_a_task_with_the_correct_assigned_id.yml +0 -0
- data/spec/cassettes/{Redbooth_User → RedboothRuby_User}/_show/returns_a_task_with_the_correct_id.yml +0 -0
- data/spec/cassettes/{Redbooth_User → RedboothRuby_User}/_show/returns_a_task_with_the_correct_name.yml +0 -0
- data/spec/cassettes/{Redbooth_User → RedboothRuby_User}/_show/returns_a_task_with_the_correct_project_id.yml +0 -0
- data/spec/cassettes/{Redbooth_User → RedboothRuby_User}/_show/returns_a_user_with_the_correct_email.yml +0 -0
- data/spec/cassettes/{Redbooth_User → RedboothRuby_User}/_show/returns_a_user_with_the_correct_first_name.yml +0 -0
- data/spec/cassettes/{Redbooth_User → RedboothRuby_User}/_show/returns_a_user_with_the_correct_id.yml +0 -0
- data/spec/cassettes/{Redbooth_User → RedboothRuby_User}/_show/returns_a_user_with_the_correct_last_name.yml +0 -0
- data/spec/cassettes/{Redbooth_User → RedboothRuby_User}/_update/.yml +0 -0
- data/spec/cassettes/{Redbooth_User → RedboothRuby_User}/_update/id/.yml +0 -0
- data/spec/cassettes/{Redbooth_User → RedboothRuby_User}/_update/makes_a_new_PUT_request_using_the_correct_API_endpoint_to_receive_a_specific_task.yml +0 -0
- data/spec/cassettes/{Redbooth_User → RedboothRuby_User}/_update/name/.yml +0 -0
- data/spec/{redbooth → redbooth-ruby}/base_spec.rb +2 -2
- data/spec/{redbooth → redbooth-ruby}/client_spec.rb +11 -11
- data/spec/redbooth-ruby/conversation_spec.rb +83 -0
- data/spec/{redbooth → redbooth-ruby}/me_spec.rb +4 -4
- data/spec/redbooth-ruby/membership_spec.rb +85 -0
- data/spec/{redbooth → redbooth-ruby}/organization_spec.rb +8 -8
- data/spec/{redbooth → redbooth-ruby}/person_spec.rb +7 -7
- data/spec/{redbooth → redbooth-ruby}/project_spec.rb +8 -8
- data/spec/{redbooth → redbooth-ruby}/request/base_spec.rb +9 -9
- data/spec/{redbooth → redbooth-ruby}/request/collection_spec.rb +7 -7
- data/spec/{redbooth → redbooth-ruby}/request/connection_spec.rb +10 -10
- data/spec/{redbooth → redbooth-ruby}/request/info_spec.rb +4 -4
- data/spec/{redbooth → redbooth-ruby}/request/response_spec.rb +3 -3
- data/spec/{redbooth → redbooth-ruby}/request/validator_spec.rb +9 -9
- data/spec/{redbooth → redbooth-ruby}/task_spec.rb +12 -12
- data/spec/{redbooth → redbooth-ruby}/user_spec.rb +4 -4
- data/spec/redbooth_spec.rb +12 -12
- data/spec/shared/authentication_context.rb +3 -3
- data/spec/spec_helper.rb +5 -1
- metadata +264 -222
@@ -0,0 +1,44 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://localhost:3000/api/3/memberships/1
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Faraday v0.9.0
|
12
|
+
Authorization:
|
13
|
+
- Bearer _frank_access_token_
|
14
|
+
Accept-Encoding:
|
15
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
16
|
+
Accept:
|
17
|
+
- '*/*'
|
18
|
+
response:
|
19
|
+
status:
|
20
|
+
code: 200
|
21
|
+
message: OK
|
22
|
+
headers:
|
23
|
+
Content-Type:
|
24
|
+
- application/json; charset=utf-8
|
25
|
+
X-Ua-Compatible:
|
26
|
+
- IE=Edge,chrome=1
|
27
|
+
Etag:
|
28
|
+
- '"e29a6be8cb28645d926c60197da1b4f5"'
|
29
|
+
Cache-Control:
|
30
|
+
- max-age=0, private, must-revalidate
|
31
|
+
X-Request-Id:
|
32
|
+
- d78ee03b5f934de47adf89ad430c1090
|
33
|
+
X-Runtime:
|
34
|
+
- '0.115732'
|
35
|
+
Connection:
|
36
|
+
- close
|
37
|
+
Server:
|
38
|
+
- thin 1.6.1 codename Death Proof
|
39
|
+
body:
|
40
|
+
encoding: UTF-8
|
41
|
+
string: '{"type":"Membership","id":1,"user_id":1,"organization_id":1,"role":"admin"}'
|
42
|
+
http_version:
|
43
|
+
recorded_at: Mon, 10 Nov 2014 12:38:50 GMT
|
44
|
+
recorded_with: VCR 2.9.3
|
@@ -0,0 +1,44 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://localhost:3000/api/3/memberships/1
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Faraday v0.9.0
|
12
|
+
Authorization:
|
13
|
+
- Bearer _frank_access_token_
|
14
|
+
Accept-Encoding:
|
15
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
16
|
+
Accept:
|
17
|
+
- '*/*'
|
18
|
+
response:
|
19
|
+
status:
|
20
|
+
code: 200
|
21
|
+
message: OK
|
22
|
+
headers:
|
23
|
+
Content-Type:
|
24
|
+
- application/json; charset=utf-8
|
25
|
+
X-Ua-Compatible:
|
26
|
+
- IE=Edge,chrome=1
|
27
|
+
Etag:
|
28
|
+
- '"e29a6be8cb28645d926c60197da1b4f5"'
|
29
|
+
Cache-Control:
|
30
|
+
- max-age=0, private, must-revalidate
|
31
|
+
X-Request-Id:
|
32
|
+
- eaa31f164460e89c253f772a2b508d30
|
33
|
+
X-Runtime:
|
34
|
+
- '0.111009'
|
35
|
+
Connection:
|
36
|
+
- close
|
37
|
+
Server:
|
38
|
+
- thin 1.6.1 codename Death Proof
|
39
|
+
body:
|
40
|
+
encoding: UTF-8
|
41
|
+
string: '{"type":"Membership","id":1,"user_id":1,"organization_id":1,"role":"admin"}'
|
42
|
+
http_version:
|
43
|
+
recorded_at: Mon, 10 Nov 2014 12:40:12 GMT
|
44
|
+
recorded_with: VCR 2.9.3
|
@@ -0,0 +1,46 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: put
|
5
|
+
uri: http://localhost:3000/api/3/memberships/6
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: role=admin
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Faraday v0.9.0
|
12
|
+
Authorization:
|
13
|
+
- Bearer _frank_access_token_
|
14
|
+
Content-Type:
|
15
|
+
- application/x-www-form-urlencoded
|
16
|
+
Accept-Encoding:
|
17
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
18
|
+
Accept:
|
19
|
+
- '*/*'
|
20
|
+
response:
|
21
|
+
status:
|
22
|
+
code: 200
|
23
|
+
message: OK
|
24
|
+
headers:
|
25
|
+
Content-Type:
|
26
|
+
- application/json; charset=utf-8
|
27
|
+
X-Ua-Compatible:
|
28
|
+
- IE=Edge,chrome=1
|
29
|
+
Etag:
|
30
|
+
- '"70f240df27035d463d6279313484441d"'
|
31
|
+
Cache-Control:
|
32
|
+
- max-age=0, private, must-revalidate
|
33
|
+
X-Request-Id:
|
34
|
+
- 979eed84790d5adf8ca2f859c6404ac9
|
35
|
+
X-Runtime:
|
36
|
+
- '0.484166'
|
37
|
+
Connection:
|
38
|
+
- close
|
39
|
+
Server:
|
40
|
+
- thin 1.6.1 codename Death Proof
|
41
|
+
body:
|
42
|
+
encoding: UTF-8
|
43
|
+
string: '{"type":"Membership","id":6,"user_id":1,"organization_id":2,"role":"admin"}'
|
44
|
+
http_version:
|
45
|
+
recorded_at: Mon, 10 Nov 2014 12:38:50 GMT
|
46
|
+
recorded_with: VCR 2.9.3
|
@@ -0,0 +1,46 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: put
|
5
|
+
uri: http://localhost:3000/api/3/memberships/6
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: role=admin
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Faraday v0.9.0
|
12
|
+
Authorization:
|
13
|
+
- Bearer _frank_access_token_
|
14
|
+
Content-Type:
|
15
|
+
- application/x-www-form-urlencoded
|
16
|
+
Accept-Encoding:
|
17
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
18
|
+
Accept:
|
19
|
+
- '*/*'
|
20
|
+
response:
|
21
|
+
status:
|
22
|
+
code: 200
|
23
|
+
message: OK
|
24
|
+
headers:
|
25
|
+
Content-Type:
|
26
|
+
- application/json; charset=utf-8
|
27
|
+
X-Ua-Compatible:
|
28
|
+
- IE=Edge,chrome=1
|
29
|
+
Etag:
|
30
|
+
- '"70f240df27035d463d6279313484441d"'
|
31
|
+
Cache-Control:
|
32
|
+
- max-age=0, private, must-revalidate
|
33
|
+
X-Request-Id:
|
34
|
+
- 2506ae29e13a868573a1c53f20801fbd
|
35
|
+
X-Runtime:
|
36
|
+
- '0.130428'
|
37
|
+
Connection:
|
38
|
+
- close
|
39
|
+
Server:
|
40
|
+
- thin 1.6.1 codename Death Proof
|
41
|
+
body:
|
42
|
+
encoding: UTF-8
|
43
|
+
string: '{"type":"Membership","id":6,"user_id":1,"organization_id":2,"role":"admin"}'
|
44
|
+
http_version:
|
45
|
+
recorded_at: Mon, 10 Nov 2014 12:40:12 GMT
|
46
|
+
recorded_with: VCR 2.9.3
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/spec/cassettes/{Redbooth_Request_Collection → RedboothRuby_Request_Collection}/_all/.yml
RENAMED
File without changes
|
data/spec/cassettes/{Redbooth_Request_Collection → RedboothRuby_Request_Collection}/_count/.yml
RENAMED
File without changes
|
File without changes
|
File without changes
|
data/spec/cassettes/{Redbooth_Request_Collection → RedboothRuby_Request_Collection}/_initialize/.yml
RENAMED
File without changes
|
data/spec/cassettes/{Redbooth_Request_Collection → RedboothRuby_Request_Collection}/_next_page/.yml
RENAMED
File without changes
|
File without changes
|
File without changes
|
data/spec/cassettes/{Redbooth_Request_Collection → RedboothRuby_Request_Collection}/_per_page/.yml
RENAMED
File without changes
|
File without changes
|
data/spec/cassettes/{Redbooth_Request_Collection → RedboothRuby_Request_Collection}/_prev_page/.yml
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/spec/cassettes/{Redbooth_Task → RedboothRuby_Task}/_show/returns_a_task_with_the_correct_id.yml
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/spec/cassettes/{Redbooth_User → RedboothRuby_User}/_show/returns_a_task_with_the_correct_id.yml
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/spec/cassettes/{Redbooth_User → RedboothRuby_User}/_show/returns_a_user_with_the_correct_id.yml
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -1,10 +1,10 @@
|
|
1
1
|
require "spec_helper"
|
2
2
|
|
3
|
-
describe
|
3
|
+
describe RedboothRuby::Base do
|
4
4
|
describe "#parse_timestamps" do
|
5
5
|
context "given #created_time is present" do
|
6
6
|
it "creates a Time object" do
|
7
|
-
base =
|
7
|
+
base = RedboothRuby::Base.new(created_time: 1358300444)
|
8
8
|
expect(base.created_time.class).to eql(Time)
|
9
9
|
end
|
10
10
|
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
require "spec_helper"
|
2
2
|
|
3
|
-
describe
|
3
|
+
describe RedboothRuby::Client do
|
4
4
|
let(:consumer_key) { '_your_consumen_key_' }
|
5
5
|
let(:consumer_secret) { '_your_consumen_secret_' }
|
6
6
|
let(:access_token) do
|
@@ -9,22 +9,22 @@ describe Redbooth::Client do
|
|
9
9
|
secret: '_your_secret_token_'
|
10
10
|
}
|
11
11
|
end
|
12
|
-
let(:client) {
|
13
|
-
let(:session) {
|
12
|
+
let(:client) { RedboothRuby::Client.new(session) }
|
13
|
+
let(:session) { RedboothRuby::Session.new(access_token) }
|
14
14
|
let(:valid_attributes) { JSON.parse('{}') }
|
15
15
|
|
16
16
|
before :each do
|
17
|
-
allow(
|
17
|
+
allow(RedboothRuby).to receive(:request).and_return(valid_attributes)
|
18
18
|
end
|
19
19
|
|
20
20
|
describe '#initialize' do
|
21
21
|
it 'initializes attributes correctly' do
|
22
22
|
expect(client.session).to eql(session)
|
23
23
|
end
|
24
|
-
it 'raises
|
24
|
+
it 'raises RedboothRuby::AuthenticationError if session is invalid' do
|
25
25
|
allow(session).to receive(:valid?).and_return(false)
|
26
26
|
|
27
|
-
expect{client}.to raise_error{
|
27
|
+
expect{client}.to raise_error{ RedboothRuby::AuthenticationError }
|
28
28
|
end
|
29
29
|
end
|
30
30
|
|
@@ -32,13 +32,13 @@ describe Redbooth::Client do
|
|
32
32
|
it 'is private' do
|
33
33
|
expect{client.perform!(:user, :show)}.to raise_error
|
34
34
|
end
|
35
|
-
it 'raises
|
35
|
+
it 'raises RedboothRuby::AuthenticationError if session is invalid' do
|
36
36
|
allow(client).to receive(:session).and_return(nil)
|
37
|
-
expect{client.perform!(:user, :show)}.to raise_error{
|
37
|
+
expect{client.perform!(:user, :show)}.to raise_error{ RedboothRuby::AuthenticationError }
|
38
38
|
end
|
39
39
|
it 'calls to the given resource' do
|
40
|
-
allow(
|
41
|
-
expect(
|
40
|
+
allow(RedboothRuby::User).to receive(:show).and_return(RedboothRuby::User.new)
|
41
|
+
expect(RedboothRuby::User).to receive(:show).with({ session: session })
|
42
42
|
|
43
43
|
client.send(:perform!, :user, :show)
|
44
44
|
end
|
@@ -59,7 +59,7 @@ describe Redbooth::Client do
|
|
59
59
|
expect{client.resource('user')}.to raise_error
|
60
60
|
end
|
61
61
|
it 'gives the correct api resource class' do
|
62
|
-
expect(client.send(:resource, 'user')).to eql(
|
62
|
+
expect(client.send(:resource, 'user')).to eql(RedboothRuby::User)
|
63
63
|
end
|
64
64
|
it 'gives nil if there is no resource for the given name' do
|
65
65
|
expect(client.send(:resource, 'icecream')).to be_nil
|