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.
Files changed (136) hide show
  1. checksums.yaml +4 -4
  2. data/spec/cassettes/RedboothRuby_Conversation/_create/.yml +47 -0
  3. data/spec/cassettes/RedboothRuby_Conversation/_create/makes_a_new_POST_request_using_the_correct_API_endpoint_to_create_a_specific_conversation.yml +47 -0
  4. data/spec/cassettes/RedboothRuby_Conversation/_delete/makes_a_new_DELETE_request_using_the_correct_API_endpoint_to_delete_a_specific_conversation.yml +84 -0
  5. data/spec/cassettes/RedboothRuby_Conversation/_index/.yml +99 -0
  6. data/spec/cassettes/RedboothRuby_Conversation/_index/makes_a_new_GET_request_using_the_correct_API_endpoint_to_receive_conversations_collection.yml +99 -0
  7. data/spec/cassettes/RedboothRuby_Conversation/_initialize/.yml +45 -0
  8. data/spec/cassettes/RedboothRuby_Conversation/_show/.yml +45 -0
  9. data/spec/cassettes/RedboothRuby_Conversation/_show/makes_a_new_GET_request_using_the_correct_API_endpoint_to_receive_a_specific_conversation.yml +45 -0
  10. data/spec/cassettes/RedboothRuby_Conversation/_update/.yml +47 -0
  11. data/spec/cassettes/RedboothRuby_Conversation/_update/makes_a_new_PUT_request_using_the_correct_API_endpoint_to_receive_a_specific_conversation.yml +47 -0
  12. data/spec/cassettes/{Redbooth_Me → RedboothRuby_Me}/_initialize/.yml +0 -0
  13. data/spec/cassettes/{Redbooth_Me → RedboothRuby_Me}/_show/.yml +0 -0
  14. 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
  15. data/spec/cassettes/{Redbooth_Me → RedboothRuby_Me}/_update/.yml +0 -0
  16. data/spec/cassettes/{Redbooth_Me → RedboothRuby_Me}/_update/integration/.yml +0 -0
  17. data/spec/cassettes/RedboothRuby_Membership/_create/integration/.yml +83 -0
  18. data/spec/cassettes/RedboothRuby_Membership/_delete/makes_a_new_DELETE_request_using_the_correct_API_endpoint_to_delete_a_specific_membership.yml +83 -0
  19. data/spec/cassettes/RedboothRuby_Membership/_index/.yml +58 -0
  20. data/spec/cassettes/RedboothRuby_Membership/_index/makes_a_new_PUT_request_using_the_correct_API_endpoint_to_receive_a_specific_membership.yml +58 -0
  21. data/spec/cassettes/RedboothRuby_Membership/_initialize/.yml +44 -0
  22. data/spec/cassettes/RedboothRuby_Membership/_show/.yml +44 -0
  23. data/spec/cassettes/RedboothRuby_Membership/_show/makes_a_new_GET_request_using_the_correct_API_endpoint_to_receive_a_specific_membership.yml +44 -0
  24. data/spec/cassettes/RedboothRuby_Membership/_update/.yml +46 -0
  25. data/spec/cassettes/RedboothRuby_Membership/_update/makes_a_new_PUT_request_using_the_correct_API_endpoint_to_receive_a_specific_membership.yml +46 -0
  26. data/spec/cassettes/{Redbooth_Organization → RedboothRuby_Organization}/_create/.yml +0 -0
  27. 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
  28. 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
  29. data/spec/cassettes/{Redbooth_Organization → RedboothRuby_Organization}/_index/.yml +0 -0
  30. 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
  31. data/spec/cassettes/{Redbooth_Organization → RedboothRuby_Organization}/_initialize/.yml +0 -0
  32. data/spec/cassettes/{Redbooth_Organization → RedboothRuby_Organization}/_show/.yml +0 -0
  33. 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
  34. data/spec/cassettes/{Redbooth_Organization → RedboothRuby_Organization}/_update/.yml +0 -0
  35. 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
  36. data/spec/cassettes/{Redbooth_Person → RedboothRuby_Person}/_create/integration/.yml +0 -0
  37. 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
  38. 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
  39. data/spec/cassettes/{Redbooth_Person → RedboothRuby_Person}/_index/.yml +0 -0
  40. 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
  41. data/spec/cassettes/{Redbooth_Person → RedboothRuby_Person}/_initialize/.yml +0 -0
  42. data/spec/cassettes/{Redbooth_Person → RedboothRuby_Person}/_show/.yml +0 -0
  43. 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
  44. data/spec/cassettes/{Redbooth_Person → RedboothRuby_Person}/_update/.yml +0 -0
  45. 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
  46. data/spec/cassettes/{Redbooth_Project → RedboothRuby_Project}/_create/.yml +0 -0
  47. 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
  48. 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
  49. data/spec/cassettes/{Redbooth_Project → RedboothRuby_Project}/_index/.yml +0 -0
  50. 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
  51. data/spec/cassettes/{Redbooth_Project → RedboothRuby_Project}/_initialize/.yml +0 -0
  52. data/spec/cassettes/{Redbooth_Project → RedboothRuby_Project}/_show/.yml +0 -0
  53. 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
  54. data/spec/cassettes/{Redbooth_Project → RedboothRuby_Project}/_update/.yml +0 -0
  55. 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
  56. data/spec/cassettes/{Redbooth_Request_Collection → RedboothRuby_Request_Collection}/_all/.yml +0 -0
  57. data/spec/cassettes/{Redbooth_Request_Collection → RedboothRuby_Request_Collection}/_count/.yml +0 -0
  58. data/spec/cassettes/{Redbooth_Request_Collection → RedboothRuby_Request_Collection}/_current_page/.yml +0 -0
  59. data/spec/cassettes/{Redbooth_Request_Collection → RedboothRuby_Request_Collection}/_current_page/where_endpoint_is_not_paginated/.yml +0 -0
  60. data/spec/cassettes/{Redbooth_Request_Collection → RedboothRuby_Request_Collection}/_initialize/.yml +0 -0
  61. data/spec/cassettes/{Redbooth_Request_Collection → RedboothRuby_Request_Collection}/_next_page/.yml +0 -0
  62. data/spec/cassettes/{Redbooth_Request_Collection → RedboothRuby_Request_Collection}/_next_page/where_endpoint_is_not_paginated/.yml +0 -0
  63. data/spec/cassettes/{Redbooth_Request_Collection → RedboothRuby_Request_Collection}/_next_page/where_is_the_last_page/.yml +0 -0
  64. data/spec/cassettes/{Redbooth_Request_Collection → RedboothRuby_Request_Collection}/_per_page/.yml +0 -0
  65. data/spec/cassettes/{Redbooth_Request_Collection → RedboothRuby_Request_Collection}/_per_page/where_endpoint_is_not_paginated/.yml +0 -0
  66. data/spec/cassettes/{Redbooth_Request_Collection → RedboothRuby_Request_Collection}/_prev_page/.yml +0 -0
  67. data/spec/cassettes/{Redbooth_Request_Collection → RedboothRuby_Request_Collection}/_prev_page/where_endpoint_is_not_paginated/.yml +0 -0
  68. data/spec/cassettes/{Redbooth_Request_Collection → RedboothRuby_Request_Collection}/_prev_page/where_is_the_first_page/.yml +0 -0
  69. data/spec/cassettes/{Redbooth_Request_Collection → RedboothRuby_Request_Collection}/_total_pages/.yml +0 -0
  70. data/spec/cassettes/{Redbooth_Request_Collection → RedboothRuby_Request_Collection}/_total_pages/where_endpoint_is_not_paginated/.yml +0 -0
  71. data/spec/cassettes/{Redbooth_Task → RedboothRuby_Task}/_create/.yml +0 -0
  72. 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
  73. 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
  74. data/spec/cassettes/{Redbooth_Task → RedboothRuby_Task}/_index/.yml +0 -0
  75. 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
  76. data/spec/cassettes/{Redbooth_Task → RedboothRuby_Task}/_initialize/.yml +0 -0
  77. 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
  78. data/spec/cassettes/{Redbooth_Task → RedboothRuby_Task}/_show/returns_a_task_with_the_correct_assigned_id.yml +0 -0
  79. data/spec/cassettes/{Redbooth_Task → RedboothRuby_Task}/_show/returns_a_task_with_the_correct_id.yml +0 -0
  80. data/spec/cassettes/{Redbooth_Task → RedboothRuby_Task}/_show/returns_a_task_with_the_correct_name.yml +0 -0
  81. data/spec/cassettes/{Redbooth_Task → RedboothRuby_Task}/_show/returns_a_task_with_the_correct_project_id.yml +0 -0
  82. data/spec/cassettes/{Redbooth_Task → RedboothRuby_Task}/_update/.yml +0 -0
  83. 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
  84. data/spec/cassettes/{Redbooth_User → RedboothRuby_User}/_create/.yml +0 -0
  85. 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
  86. 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
  87. data/spec/cassettes/{Redbooth_User → RedboothRuby_User}/_create/name/.yml +0 -0
  88. data/spec/cassettes/{Redbooth_User → RedboothRuby_User}/_create/project_id/.yml +0 -0
  89. data/spec/cassettes/{Redbooth_User → RedboothRuby_User}/_create/task_list_id/.yml +0 -0
  90. 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
  91. data/spec/cassettes/{Redbooth_User → RedboothRuby_User}/_index/.yml +0 -0
  92. data/spec/cassettes/{Redbooth_User → RedboothRuby_User}/_index/class/.yml +0 -0
  93. 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
  94. data/spec/cassettes/{Redbooth_User → RedboothRuby_User}/_initialize/.yml +0 -0
  95. data/spec/cassettes/{Redbooth_User → RedboothRuby_User}/_initialize/assigned_id/.yml +0 -0
  96. data/spec/cassettes/{Redbooth_User → RedboothRuby_User}/_initialize/description/.yml +0 -0
  97. data/spec/cassettes/{Redbooth_User → RedboothRuby_User}/_initialize/due_on/.yml +0 -0
  98. data/spec/cassettes/{Redbooth_User → RedboothRuby_User}/_initialize/id/.yml +0 -0
  99. data/spec/cassettes/{Redbooth_User → RedboothRuby_User}/_initialize/initializes_all_attributes_correctly.yml +0 -0
  100. data/spec/cassettes/{Redbooth_User → RedboothRuby_User}/_initialize/name/.yml +0 -0
  101. data/spec/cassettes/{Redbooth_User → RedboothRuby_User}/_initialize/project_id/.yml +0 -0
  102. data/spec/cassettes/{Redbooth_User → RedboothRuby_User}/_show/.yml +0 -0
  103. 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
  104. 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
  105. data/spec/cassettes/{Redbooth_User → RedboothRuby_User}/_show/returns_a_task_with_the_correct_assigned_id.yml +0 -0
  106. data/spec/cassettes/{Redbooth_User → RedboothRuby_User}/_show/returns_a_task_with_the_correct_id.yml +0 -0
  107. data/spec/cassettes/{Redbooth_User → RedboothRuby_User}/_show/returns_a_task_with_the_correct_name.yml +0 -0
  108. data/spec/cassettes/{Redbooth_User → RedboothRuby_User}/_show/returns_a_task_with_the_correct_project_id.yml +0 -0
  109. data/spec/cassettes/{Redbooth_User → RedboothRuby_User}/_show/returns_a_user_with_the_correct_email.yml +0 -0
  110. data/spec/cassettes/{Redbooth_User → RedboothRuby_User}/_show/returns_a_user_with_the_correct_first_name.yml +0 -0
  111. data/spec/cassettes/{Redbooth_User → RedboothRuby_User}/_show/returns_a_user_with_the_correct_id.yml +0 -0
  112. data/spec/cassettes/{Redbooth_User → RedboothRuby_User}/_show/returns_a_user_with_the_correct_last_name.yml +0 -0
  113. data/spec/cassettes/{Redbooth_User → RedboothRuby_User}/_update/.yml +0 -0
  114. data/spec/cassettes/{Redbooth_User → RedboothRuby_User}/_update/id/.yml +0 -0
  115. 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
  116. data/spec/cassettes/{Redbooth_User → RedboothRuby_User}/_update/name/.yml +0 -0
  117. data/spec/{redbooth → redbooth-ruby}/base_spec.rb +2 -2
  118. data/spec/{redbooth → redbooth-ruby}/client_spec.rb +11 -11
  119. data/spec/redbooth-ruby/conversation_spec.rb +83 -0
  120. data/spec/{redbooth → redbooth-ruby}/me_spec.rb +4 -4
  121. data/spec/redbooth-ruby/membership_spec.rb +85 -0
  122. data/spec/{redbooth → redbooth-ruby}/organization_spec.rb +8 -8
  123. data/spec/{redbooth → redbooth-ruby}/person_spec.rb +7 -7
  124. data/spec/{redbooth → redbooth-ruby}/project_spec.rb +8 -8
  125. data/spec/{redbooth → redbooth-ruby}/request/base_spec.rb +9 -9
  126. data/spec/{redbooth → redbooth-ruby}/request/collection_spec.rb +7 -7
  127. data/spec/{redbooth → redbooth-ruby}/request/connection_spec.rb +10 -10
  128. data/spec/{redbooth → redbooth-ruby}/request/info_spec.rb +4 -4
  129. data/spec/{redbooth → redbooth-ruby}/request/response_spec.rb +3 -3
  130. data/spec/{redbooth → redbooth-ruby}/request/validator_spec.rb +9 -9
  131. data/spec/{redbooth → redbooth-ruby}/task_spec.rb +12 -12
  132. data/spec/{redbooth → redbooth-ruby}/user_spec.rb +4 -4
  133. data/spec/redbooth_spec.rb +12 -12
  134. data/spec/shared/authentication_context.rb +3 -3
  135. data/spec/spec_helper.rb +5 -1
  136. 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
@@ -1,10 +1,10 @@
1
1
  require "spec_helper"
2
2
 
3
- describe Redbooth::Base do
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 = Redbooth::Base.new(created_time: 1358300444)
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 Redbooth::Client do
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) { Redbooth::Client.new(session) }
13
- let(:session) { Redbooth::Session.new(access_token) }
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(Redbooth).to receive(:request).and_return(valid_attributes)
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 Redbooth::AuthenticationError if session is invalid' do
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{ Redbooth::AuthenticationError }
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 Redbooth::AuthenticationError if session is invalid' do
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{ Redbooth::AuthenticationError }
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(Redbooth::User).to receive(:show).and_return(Redbooth::User.new)
41
- expect(Redbooth::User).to receive(:show).with({ session: session })
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(Redbooth::User)
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