octokit 2.3.0 → 2.3.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (342) hide show
  1. data/lib/octokit/version.rb +1 -1
  2. data/octokit.gemspec +0 -1
  3. metadata +5 -682
  4. data/spec/cassettes/Octokit_Client/_get/handles_query_params.json +0 -1
  5. data/spec/cassettes/Octokit_Client/_head/handles_query_params.json +0 -1
  6. data/spec/cassettes/Octokit_Client/_last_response/caches_the_last_agent_response.json +0 -1
  7. data/spec/cassettes/Octokit_Client/authentication/when_token_authenticated/fetches_and_memoizes_login.json +0 -1
  8. data/spec/cassettes/Octokit_Client/auto_pagination/fetches_all_the_pages.json +0 -1
  9. data/spec/cassettes/Octokit_Client/error_handling/raises_on_404.json +0 -1
  10. data/spec/cassettes/Octokit_Client_Authorizations/_authorization/returns_a_single_authorization.json +0 -1
  11. data/spec/cassettes/Octokit_Client_Authorizations/_authorizations/lists_existing_authorizations.json +0 -1
  12. data/spec/cassettes/Octokit_Client_Authorizations/_create_authorization/with_idempotent_true/creates_a_new_authorization_with_options.json +0 -1
  13. data/spec/cassettes/Octokit_Client_Authorizations/_create_authorization/with_idempotent_true/returns_an_existing_API_authorization_if_one_already_exists.json +0 -1
  14. data/spec/cassettes/Octokit_Client_Authorizations/_create_authorization/without_idempotent_true/creates_a_new_API_authorization_each_time.json +0 -1
  15. data/spec/cassettes/Octokit_Client_Authorizations/_create_authorization/without_idempotent_true/creates_a_new_authorization_with_options.json +0 -1
  16. data/spec/cassettes/Octokit_Client_Authorizations/_create_authorization/without_idempotent_true/creates_an_API_authorization.json +0 -1
  17. data/spec/cassettes/Octokit_Client_Authorizations/_scopes/checks_the_scopes_on_a_one-off_token.json +0 -1
  18. data/spec/cassettes/Octokit_Client_Authorizations/_scopes/checks_the_scopes_on_the_current_token.json +0 -1
  19. data/spec/cassettes/Octokit_Client_Authorizations/_update_authorization/updates_and_existing_authorization.json +0 -1
  20. data/spec/cassettes/Octokit_Client_CommitComments/_commit_comment/returns_a_single_commit_comment.json +0 -1
  21. data/spec/cassettes/Octokit_Client_CommitComments/_commit_comments/returns_a_list_of_comments_for_a_specific_commit.json +0 -1
  22. data/spec/cassettes/Octokit_Client_CommitComments/_create_commit_comment/creates_a_commit_comment.json +0 -1
  23. data/spec/cassettes/Octokit_Client_CommitComments/_delete_commit_comment/deletes_a_commit_comment.json +0 -1
  24. data/spec/cassettes/Octokit_Client_CommitComments/_list_commit_comments/returns_a_list_of_all_commit_comments.json +0 -1
  25. data/spec/cassettes/Octokit_Client_CommitComments/_update_commit_comment/updates_a_commit_comment.json +0 -1
  26. data/spec/cassettes/Octokit_Client_Commits/_commit/returns_a_commit.json +0 -1
  27. data/spec/cassettes/Octokit_Client_Commits/_commits/handles_branch_or_sha_argument.json +0 -1
  28. data/spec/cassettes/Octokit_Client_Commits/_commits/handles_the_sha_option.json +0 -1
  29. data/spec/cassettes/Octokit_Client_Commits/_commits/returns_all_commits.json +0 -1
  30. data/spec/cassettes/Octokit_Client_Commits/_commits_before/handles_branch_or_sha_argument.json +0 -1
  31. data/spec/cassettes/Octokit_Client_Commits/_commits_before/handles_the_sha_option.json +0 -1
  32. data/spec/cassettes/Octokit_Client_Commits/_commits_before/returns_all_commits_until_the_specified_date.json +0 -1
  33. data/spec/cassettes/Octokit_Client_Commits/_commits_between/handles_branch_or_sha_argument.json +0 -1
  34. data/spec/cassettes/Octokit_Client_Commits/_commits_between/handles_the_sha_option.json +0 -1
  35. data/spec/cassettes/Octokit_Client_Commits/_commits_between/returns_all_commits_until_the_specified_date.json +0 -1
  36. data/spec/cassettes/Octokit_Client_Commits/_commits_on/handles_branch_or_sha_argument.json +0 -1
  37. data/spec/cassettes/Octokit_Client_Commits/_commits_on/handles_the_sha_option.json +0 -1
  38. data/spec/cassettes/Octokit_Client_Commits/_commits_on/returns_all_commits_on_the_specified_date.json +0 -1
  39. data/spec/cassettes/Octokit_Client_Commits/_commits_since/handles_branch_or_sha_argument.json +0 -1
  40. data/spec/cassettes/Octokit_Client_Commits/_commits_since/handles_the_sha_option.json +0 -1
  41. data/spec/cassettes/Octokit_Client_Commits/_commits_since/returns_all_commits_since_the_specified_date.json +0 -1
  42. data/spec/cassettes/Octokit_Client_Commits/_compare/returns_a_comparison.json +0 -1
  43. data/spec/cassettes/Octokit_Client_Commits/_create_commit/creates_a_commit.json +0 -1
  44. data/spec/cassettes/Octokit_Client_Commits/_merge/merges_a_branch_into_another.json +0 -1
  45. data/spec/cassettes/Octokit_Client_Contents/_archive_link/returns_the_headers_of_the_request.json +0 -1
  46. data/spec/cassettes/Octokit_Client_Contents/_contents/returns_the_contents_of_a_file.json +0 -1
  47. data/spec/cassettes/Octokit_Client_Contents/_create_contents/creates_contents_from_File_object.json +0 -1
  48. data/spec/cassettes/Octokit_Client_Contents/_create_contents/creates_contents_from_file_path.json +0 -1
  49. data/spec/cassettes/Octokit_Client_Contents/_create_contents/creates_repository_contents_at_a_path.json +0 -1
  50. data/spec/cassettes/Octokit_Client_Contents/_create_contents/does_not_add_new_lines.json +0 -1
  51. data/spec/cassettes/Octokit_Client_Contents/_delete_contents/deletes_repository_contents_at_a_path.json +0 -1
  52. data/spec/cassettes/Octokit_Client_Contents/_readme/returns_the_default_readme.json +0 -1
  53. data/spec/cassettes/Octokit_Client_Contents/_update_contents/does_not_add_new_lines.json +0 -1
  54. data/spec/cassettes/Octokit_Client_Contents/_update_contents/updates_repository_contents_at_a_path.json +0 -1
  55. data/spec/cassettes/Octokit_Client_Downloads/_download/gets_a_single_download.json +0 -1
  56. data/spec/cassettes/Octokit_Client_Downloads/_downloads/lists_available_downloads.json +0 -1
  57. data/spec/cassettes/Octokit_Client_Downloads/methods_that_require_a_download/_create_download/creates_a_download_resource.json +0 -1
  58. data/spec/cassettes/Octokit_Client_Downloads/methods_that_require_a_download/_create_download/posts_to_an_S3_url.json +0 -1
  59. data/spec/cassettes/Octokit_Client_Downloads/methods_that_require_a_download/_delete_download/deletes_a_download.json +0 -1
  60. data/spec/cassettes/Octokit_Client_Emojis/_emojis/returns_all_github_emojis.json +0 -1
  61. data/spec/cassettes/Octokit_Client_Events/_issue_event/lists_issue_events_for_a_repository.json +0 -1
  62. data/spec/cassettes/Octokit_Client_Events/_issue_events/lists_issue_events_for_a_repository.json +0 -1
  63. data/spec/cassettes/Octokit_Client_Events/_organization_events/returns_all_events_for_an_organization.json +0 -1
  64. data/spec/cassettes/Octokit_Client_Events/_organization_public_events/returns_an_organization_s_public_events.json +0 -1
  65. data/spec/cassettes/Octokit_Client_Events/_public_events/returns_all_public_events.json +0 -1
  66. data/spec/cassettes/Octokit_Client_Events/_received_events/returns_all_user_received_events.json +0 -1
  67. data/spec/cassettes/Octokit_Client_Events/_received_public_events/returns_public_user_received_events.json +0 -1
  68. data/spec/cassettes/Octokit_Client_Events/_repo_issue_events/lists_issue_events_for_a_repository.json +0 -1
  69. data/spec/cassettes/Octokit_Client_Events/_repository_events/returns_events_for_a_repository.json +0 -1
  70. data/spec/cassettes/Octokit_Client_Events/_repository_network_events/returns_events_for_a_repository_s_network.json +0 -1
  71. data/spec/cassettes/Octokit_Client_Events/_user_events/returns_all_user_events.json +0 -1
  72. data/spec/cassettes/Octokit_Client_Events/_user_public_events/returns_public_events_performed_by_a_user.json +0 -1
  73. data/spec/cassettes/Octokit_Client_Gists/unauthenticated/_gist/returns_the_gist_by_ID.json +0 -1
  74. data/spec/cassettes/Octokit_Client_Gists/unauthenticated/_gists/with_username_passed/returns_a_list_of_gists.json +0 -1
  75. data/spec/cassettes/Octokit_Client_Gists/unauthenticated/_gists/without_a_username_passed/returns_a_list_of_gists.json +0 -1
  76. data/spec/cassettes/Octokit_Client_Gists/unauthenticated/_public_gists/returns_public_gists.json +0 -1
  77. data/spec/cassettes/Octokit_Client_Gists/when_authenticated/_create_gist/creates_a_new_gist.json +0 -1
  78. data/spec/cassettes/Octokit_Client_Gists/when_authenticated/_create_gist_comment/creates_a_gist_comment.json +0 -1
  79. data/spec/cassettes/Octokit_Client_Gists/when_authenticated/_delete_gist/deletes_an_existing_gist.json +0 -1
  80. data/spec/cassettes/Octokit_Client_Gists/when_authenticated/_delete_gist_comment/deletes_a_gist_comment.json +0 -1
  81. data/spec/cassettes/Octokit_Client_Gists/when_authenticated/_edit_gist/edit_an_existing_gist.json +0 -1
  82. data/spec/cassettes/Octokit_Client_Gists/when_authenticated/_fork_gist/forks_an_existing_gist.json +0 -1
  83. data/spec/cassettes/Octokit_Client_Gists/when_authenticated/_gist_comment/returns_a_gist_comment.json +0 -1
  84. data/spec/cassettes/Octokit_Client_Gists/when_authenticated/_gist_comments/returns_the_list_of_gist_comments.json +0 -1
  85. data/spec/cassettes/Octokit_Client_Gists/when_authenticated/_gist_starred_/is_not_starred.json +0 -1
  86. data/spec/cassettes/Octokit_Client_Gists/when_authenticated/_gist_starred_/is_starred.json +0 -1
  87. data/spec/cassettes/Octokit_Client_Gists/when_authenticated/_gists/returns_a_list_of_gists.json +0 -1
  88. data/spec/cassettes/Octokit_Client_Gists/when_authenticated/_star_gist/stars_an_existing_gist.json +0 -1
  89. data/spec/cassettes/Octokit_Client_Gists/when_authenticated/_starred_gists/returns_the_user_s_starred_gists.json +0 -1
  90. data/spec/cassettes/Octokit_Client_Gists/when_authenticated/_unstar_gist/unstars_an_existing_gist.json +0 -1
  91. data/spec/cassettes/Octokit_Client_Gists/when_authenticated/_update_gist_comment/updates_a_gist_comment.json +0 -1
  92. data/spec/cassettes/Octokit_Client_Gitignore/_gitignore_template/returns_the_ruby_gitignore_template.json +0 -1
  93. data/spec/cassettes/Octokit_Client_Gitignore/_gitignore_templates/returns_all_gitignore_templates.json +0 -1
  94. data/spec/cassettes/Octokit_Client_Issues/_create_issue/creates_an_issue.json +0 -1
  95. data/spec/cassettes/Octokit_Client_Issues/_create_issue/creates_an_issue_with_delimited_labels.json +0 -1
  96. data/spec/cassettes/Octokit_Client_Issues/_create_issue/creates_an_issue_with_labels_array.json +0 -1
  97. data/spec/cassettes/Octokit_Client_Issues/_issue_comment/returns_a_single_comment_for_an_issue.json +0 -1
  98. data/spec/cassettes/Octokit_Client_Issues/_issue_comments/returns_comments_for_an_issue.json +0 -1
  99. data/spec/cassettes/Octokit_Client_Issues/_list_issues/returns_dashboard_issues_for_the_authenticated_user.json +0 -1
  100. data/spec/cassettes/Octokit_Client_Issues/_list_issues/returns_issues_for_a_repository.json +0 -1
  101. data/spec/cassettes/Octokit_Client_Issues/_org_issues/returns_issues_for_the_organization_for_the_authenticated_user.json +0 -1
  102. data/spec/cassettes/Octokit_Client_Issues/_repository_issues_comments/returns_comments_for_all_issues_in_a_repository.json +0 -1
  103. data/spec/cassettes/Octokit_Client_Issues/_user_issues/returns_issues_for_the_authenticated_user_for_owned_and_member_repos.json +0 -1
  104. data/spec/cassettes/Octokit_Client_Issues/methods_requiring_a_new_issue/_add_comment/adds_a_comment.json +0 -1
  105. data/spec/cassettes/Octokit_Client_Issues/methods_requiring_a_new_issue/_close_issue/closes_an_issue.json +0 -1
  106. data/spec/cassettes/Octokit_Client_Issues/methods_requiring_a_new_issue/_issue/returns_a_full_issue.json +0 -1
  107. data/spec/cassettes/Octokit_Client_Issues/methods_requiring_a_new_issue/_issue/returns_an_issue.json +0 -1
  108. data/spec/cassettes/Octokit_Client_Issues/methods_requiring_a_new_issue/_reopen_issue/reopens_an_issue.json +0 -1
  109. data/spec/cassettes/Octokit_Client_Issues/methods_requiring_a_new_issue/_update_issue/updates_an_issue.json +0 -1
  110. data/spec/cassettes/Octokit_Client_Issues/methods_requiring_a_new_issue/methods_requiring_a_new_issue_comment/_delete_comment/deletes_an_existing_comment.json +0 -1
  111. data/spec/cassettes/Octokit_Client_Issues/methods_requiring_a_new_issue/methods_requiring_a_new_issue_comment/_update_comment/updates_an_existing_comment.json +0 -1
  112. data/spec/cassettes/Octokit_Client_Labels/_add_label/adds_a_label_with_a_color.json +0 -1
  113. data/spec/cassettes/Octokit_Client_Labels/_add_label/adds_a_label_with_default_color.json +0 -1
  114. data/spec/cassettes/Octokit_Client_Labels/_delete_label_/deletes_a_label_from_the_repository.json +0 -1
  115. data/spec/cassettes/Octokit_Client_Labels/_label/returns_a_single_label.json +0 -1
  116. data/spec/cassettes/Octokit_Client_Labels/_labels/returns_labels.json +0 -1
  117. data/spec/cassettes/Octokit_Client_Labels/_lables_for_milestone/returns_all_labels_for_a_repository.json +0 -1
  118. data/spec/cassettes/Octokit_Client_Labels/methods_requiring_a_new_issue/_add_labels_to_an_issue/adds_labels_to_a_given_issue.json +0 -1
  119. data/spec/cassettes/Octokit_Client_Labels/methods_requiring_a_new_issue/_labels_for_issue/returns_all_labels_for_a_given_issue.json +0 -1
  120. data/spec/cassettes/Octokit_Client_Labels/methods_requiring_a_new_issue/_remove_all_labels/removes_all_labels_from_the_specified_issue.json +0 -1
  121. data/spec/cassettes/Octokit_Client_Labels/methods_requiring_a_new_issue/_remove_label/removes_a_label_from_the_specified_issue.json +0 -1
  122. data/spec/cassettes/Octokit_Client_Labels/methods_requiring_a_new_issue/_replace_all_labels/replaces_all_labels_for_an_issue.json +0 -1
  123. data/spec/cassettes/Octokit_Client_Labels/methods_requiring_a_new_label/_update_label/updates_a_label_with_a_new_color.json +0 -1
  124. data/spec/cassettes/Octokit_Client_LegacySearch/_legacy_search_issues/returns_matching_issues.json +0 -1
  125. data/spec/cassettes/Octokit_Client_LegacySearch/_legacy_search_repos/returns_matching_repositories.json +0 -1
  126. data/spec/cassettes/Octokit_Client_LegacySearch/_legacy_search_users/returns_matching_username.json +0 -1
  127. data/spec/cassettes/Octokit_Client_Markdown/_markdown/renders_markdown.json +0 -1
  128. data/spec/cassettes/Octokit_Client_Meta/_github_meta/returns_meta_information_about_github.json +0 -1
  129. data/spec/cassettes/Octokit_Client_Milestones/_list_milestones/lists_milestones_belonging_to_repository.json +0 -1
  130. data/spec/cassettes/Octokit_Client_Milestones/methods_that_need_a_milestone/_create_milestone/creates_a_milestone.json +0 -1
  131. data/spec/cassettes/Octokit_Client_Milestones/methods_that_need_a_milestone/_delete_milestone/deletes_a_milestone_from_a_repository.json +0 -1
  132. data/spec/cassettes/Octokit_Client_Milestones/methods_that_need_a_milestone/_milestone/gets_a_single_milestone_belonging_to_repository.json +0 -1
  133. data/spec/cassettes/Octokit_Client_Milestones/methods_that_need_a_milestone/_update_milestone/updates_a_milestone.json +0 -1
  134. data/spec/cassettes/Octokit_Client_Notifications/_mark_notifications_as_read/returns_true_when_notifications_are_marked_as_read.json +0 -1
  135. data/spec/cassettes/Octokit_Client_Notifications/_mark_repository_notifications_as_read/returns_true_when_notifications_for_a_repo_are_marked_as_read.json +0 -1
  136. data/spec/cassettes/Octokit_Client_Notifications/_notifications/lists_the_notifications_for_the_current_user.json +0 -1
  137. data/spec/cassettes/Octokit_Client_Notifications/_repository_notifications/lists_all_notifications_for_a_repository.json +0 -1
  138. data/spec/cassettes/Octokit_Client_Notifications/methods_that_need_a_thread_context/_delete_thread_subscription/returns_true_with_successful_thread_deletion.json +0 -1
  139. data/spec/cassettes/Octokit_Client_Notifications/methods_that_need_a_thread_context/_mark_thread_as_read/marks_a_thread_as_read.json +0 -1
  140. data/spec/cassettes/Octokit_Client_Notifications/methods_that_need_a_thread_context/_thread_notifications/returns_notifications_for_a_specific_thread.json +0 -1
  141. data/spec/cassettes/Octokit_Client_Notifications/methods_that_need_a_thread_context/_thread_subscription/returns_a_thread_subscription.json +0 -1
  142. data/spec/cassettes/Octokit_Client_Notifications/methods_that_need_a_thread_context/_update_thread_subscription/updates_a_thread_subscription.json +0 -1
  143. data/spec/cassettes/Octokit_Client_Objects/_blob/returns_a_blob.json +0 -1
  144. data/spec/cassettes/Octokit_Client_Objects/_create_blob/creates_a_blob.json +0 -1
  145. data/spec/cassettes/Octokit_Client_Objects/_create_tag/creates_a_tag.json +0 -1
  146. data/spec/cassettes/Octokit_Client_Objects/_create_tree/creates_a_tree.json +0 -1
  147. data/spec/cassettes/Octokit_Client_Objects/_tag/returns_a_tag.json +0 -1
  148. data/spec/cassettes/Octokit_Client_Objects/_tree/gets_a_tree.json +0 -1
  149. data/spec/cassettes/Octokit_Client_Objects/_tree/gets_a_tree_recursively.json +0 -1
  150. data/spec/cassettes/Octokit_Client_Organizations/_organization/returns_an_organization.json +0 -1
  151. data/spec/cassettes/Octokit_Client_Organizations/_organization_member_/checks_organization_membership.json +0 -1
  152. data/spec/cassettes/Octokit_Client_Organizations/_organization_members/returns_all_public_members_of_an_organization.json +0 -1
  153. data/spec/cassettes/Octokit_Client_Organizations/_organization_public_member_/checks_publicized_org_membership.json +0 -1
  154. data/spec/cassettes/Octokit_Client_Organizations/_organization_repositories/returns_all_public_repositories_for_an_organization.json +0 -1
  155. data/spec/cassettes/Octokit_Client_Organizations/_organization_teams/returns_all_teams_for_an_organization.json +0 -1
  156. data/spec/cassettes/Octokit_Client_Organizations/_organizations/returns_all_organizations_for_a_user.json +0 -1
  157. data/spec/cassettes/Octokit_Client_Organizations/_organizations/returns_all_organizations_for_the_authenticated_user.json +0 -1
  158. data/spec/cassettes/Octokit_Client_Organizations/_update_organization/updates_an_organization.json +0 -1
  159. data/spec/cassettes/Octokit_Client_Organizations/methods_that_require_a_new_team/_add_team_member/adds_a_team_member.json +0 -1
  160. data/spec/cassettes/Octokit_Client_Organizations/methods_that_require_a_new_team/_add_team_repository/adds_a_team_repository.json +0 -1
  161. data/spec/cassettes/Octokit_Client_Organizations/methods_that_require_a_new_team/_create_team/creates_a_team.json +0 -1
  162. data/spec/cassettes/Octokit_Client_Organizations/methods_that_require_a_new_team/_delete_team/deletes_a_team.json +0 -1
  163. data/spec/cassettes/Octokit_Client_Organizations/methods_that_require_a_new_team/_publicize_membership/publicizes_membership.json +0 -1
  164. data/spec/cassettes/Octokit_Client_Organizations/methods_that_require_a_new_team/_remove_team_member/removes_a_team_member.json +0 -1
  165. data/spec/cassettes/Octokit_Client_Organizations/methods_that_require_a_new_team/_remove_team_repository/removes_a_team_repository.json +0 -1
  166. data/spec/cassettes/Octokit_Client_Organizations/methods_that_require_a_new_team/_team/returns_a_team.json +0 -1
  167. data/spec/cassettes/Octokit_Client_Organizations/methods_that_require_a_new_team/_team_member_/checks_if_a_user_is_member_of_a_team.json +0 -1
  168. data/spec/cassettes/Octokit_Client_Organizations/methods_that_require_a_new_team/_team_members/returns_team_members.json +0 -1
  169. data/spec/cassettes/Octokit_Client_Organizations/methods_that_require_a_new_team/_team_repositories/returns_team_repositories.json +0 -1
  170. data/spec/cassettes/Octokit_Client_Organizations/methods_that_require_a_new_team/_unpublicize_membership/unpublicizes_membership.json +0 -1
  171. data/spec/cassettes/Octokit_Client_Organizations/methods_that_require_a_new_team/_update_team/updates_a_team.json +0 -1
  172. data/spec/cassettes/Octokit_Client_PubSubHubbub/_subscribe/raises_an_error_when_topic_is_not_recognized.json +0 -1
  173. data/spec/cassettes/Octokit_Client_PubSubHubbub/_subscribe/subscribes_to_pull_events.json +0 -1
  174. data/spec/cassettes/Octokit_Client_PubSubHubbub/_subscribe_service_hook/subscribes_to_pull_events_on_specified_topic.json +0 -1
  175. data/spec/cassettes/Octokit_Client_PubSubHubbub/_unsubscribe/unsubscribes_from_pull_events.json +0 -1
  176. data/spec/cassettes/Octokit_Client_PubSubHubbub/unsubscribe_service_hook/unsubscribes_to_stop_receiving_events_on_specified_topic.json +0 -1
  177. data/spec/cassettes/Octokit_Client_PullRequests/_create_pull_request_for_issue/creates_a_pull_request_and_attach_it_to_an_existing_issue.json +0 -1
  178. data/spec/cassettes/Octokit_Client_PullRequests/_pull_request_comment/returns_a_comment_on_a_pull_request.json +0 -1
  179. data/spec/cassettes/Octokit_Client_PullRequests/_pull_request_comments/returns_the_comments_for_a_pull_request.json +0 -1
  180. data/spec/cassettes/Octokit_Client_PullRequests/_pull_request_commits/returns_the_commits_for_a_pull_request.json +0 -1
  181. data/spec/cassettes/Octokit_Client_PullRequests/_pull_request_files/lists_files_for_a_pull_request.json +0 -1
  182. data/spec/cassettes/Octokit_Client_PullRequests/_pull_requests/returns_all_pull_requests.json +0 -1
  183. data/spec/cassettes/Octokit_Client_PullRequests/_pull_requests_comments/returns_all_comments_on_all_pull_requests.json +0 -1
  184. data/spec/cassettes/Octokit_Client_PullRequests/methods_that_require_a_new_pull/_close_pull_request/closes_a_pull_request.json +0 -1
  185. data/spec/cassettes/Octokit_Client_PullRequests/methods_that_require_a_new_pull/_create_pull_request/creates_a_pull_request.json +0 -1
  186. data/spec/cassettes/Octokit_Client_PullRequests/methods_that_require_a_new_pull/_merge_pull_request/merges_the_pull_request.json +0 -1
  187. data/spec/cassettes/Octokit_Client_PullRequests/methods_that_require_a_new_pull/_pull_merged_/returns_whether_the_pull_request_has_been_merged.json +0 -1
  188. data/spec/cassettes/Octokit_Client_PullRequests/methods_that_require_a_new_pull/_pull_request/returns_a_pull_request.json +0 -1
  189. data/spec/cassettes/Octokit_Client_PullRequests/methods_that_require_a_new_pull/_update_pull_request/updates_a_pull_request.json +0 -1
  190. data/spec/cassettes/Octokit_Client_PullRequests/methods_that_require_a_new_pull/methods_requiring_a_pull_request_comment/_create_pull_request_comment/creates_a_new_comment_on_a_pull_request.json +0 -1
  191. data/spec/cassettes/Octokit_Client_PullRequests/methods_that_require_a_new_pull/methods_requiring_a_pull_request_comment/_create_pull_request_comment_reply/creates_a_new_reply_to_a_pull_request_comment.json +0 -1
  192. data/spec/cassettes/Octokit_Client_PullRequests/methods_that_require_a_new_pull/methods_requiring_a_pull_request_comment/_delete_pull_request_comment/deletes_a_pull_request_comment.json +0 -1
  193. data/spec/cassettes/Octokit_Client_PullRequests/methods_that_require_a_new_pull/methods_requiring_a_pull_request_comment/_update_pull_request_comment/updates_a_pull_request_comment.json +0 -1
  194. data/spec/cassettes/Octokit_Client_Refs/_ref/returns_a_tags_ref.json +0 -1
  195. data/spec/cassettes/Octokit_Client_Refs/_refs/returns_all_refs.json +0 -1
  196. data/spec/cassettes/Octokit_Client_Refs/_refs/returns_all_tag_refs.json +0 -1
  197. data/spec/cassettes/Octokit_Client_Refs/methods_that_require_a_ref/_create_ref/creates_a_ref.json +0 -1
  198. data/spec/cassettes/Octokit_Client_Refs/methods_that_require_a_ref/_delete_ref/deletes_an_existing_ref.json +0 -1
  199. data/spec/cassettes/Octokit_Client_Refs/methods_that_require_a_ref/_update_ref/updates_a_ref.json +0 -1
  200. data/spec/cassettes/Octokit_Client_Releases/_create_release/creates_a_release.json +0 -1
  201. data/spec/cassettes/Octokit_Client_Releases/_delete_release/deletes_a_release.json +0 -1
  202. data/spec/cassettes/Octokit_Client_Releases/_release/gets_a_single_release.json +0 -1
  203. data/spec/cassettes/Octokit_Client_Releases/_release_assets/lists_assets_for_a_release.json +0 -1
  204. data/spec/cassettes/Octokit_Client_Releases/_releases/lists_releases_for_a_repo.json +0 -1
  205. data/spec/cassettes/Octokit_Client_Releases/_update_release/updates_a_release.json +0 -1
  206. data/spec/cassettes/Octokit_Client_Releases/handling_release_assets/_release_assets/lists_assets_for_a_release.json +0 -1
  207. data/spec/cassettes/Octokit_Client_Releases/handling_release_assets/_update_release_asset/edits_a_release_asset.json +0 -1
  208. data/spec/cassettes/Octokit_Client_Releases/handling_release_assets/_upload_release_asset/guesses_the_content_type_for_an_asset.json +0 -1
  209. data/spec/cassettes/Octokit_Client_Releases/handling_release_assets/_upload_release_asset/uploads_a_release_asset_as_file_object.json +0 -1
  210. data/spec/cassettes/Octokit_Client_Releases/handling_release_assets/_upload_release_asset/uploads_a_release_asset_by_path.json +0 -1
  211. data/spec/cassettes/Octokit_Client_Releases/handling_release_assets/_upload_release_asset/uploads_a_release_asset_with_a_default_name.json +0 -1
  212. data/spec/cassettes/Octokit_Client_Repositories/_all_repositories/returns_all_repositories_on_github.json +0 -1
  213. data/spec/cassettes/Octokit_Client_Repositories/_assignees/lists_all_the_available_assignees_owner_collaborators_.json +0 -1
  214. data/spec/cassettes/Octokit_Client_Repositories/_branches/returns_a_repository_s_branches.json +0 -1
  215. data/spec/cassettes/Octokit_Client_Repositories/_branches/returns_a_single_branch.json +0 -1
  216. data/spec/cassettes/Octokit_Client_Repositories/_check_assignee/checks_to_see_if_a_particular_user_is_an_assignee_for_a_repository.json +0 -1
  217. data/spec/cassettes/Octokit_Client_Repositories/_collaborators/returns_a_repository_s_collaborators.json +0 -1
  218. data/spec/cassettes/Octokit_Client_Repositories/_contributors/returns_repository_contributors.json +0 -1
  219. data/spec/cassettes/Octokit_Client_Repositories/_contributors/returns_repository_contributors_excluding_anonymous.json +0 -1
  220. data/spec/cassettes/Octokit_Client_Repositories/_create_repository/creates_a_repository_for_an_organization.json +0 -1
  221. data/spec/cassettes/Octokit_Client_Repositories/_delete_subscription/returns_true_when_repo_subscription_deleted.json +0 -1
  222. data/spec/cassettes/Octokit_Client_Repositories/_fork/forks_a_repository.json +0 -1
  223. data/spec/cassettes/Octokit_Client_Repositories/_languages/returns_a_repository_s_languages.json +0 -1
  224. data/spec/cassettes/Octokit_Client_Repositories/_network/returns_a_repository_s_network.json +0 -1
  225. data/spec/cassettes/Octokit_Client_Repositories/_repositories/returns_a_user_s_repositories.json +0 -1
  226. data/spec/cassettes/Octokit_Client_Repositories/_repositories/returns_authenticated_user_s_repositories.json +0 -1
  227. data/spec/cassettes/Octokit_Client_Repositories/_repository/returns_the_matching_repository.json +0 -1
  228. data/spec/cassettes/Octokit_Client_Repositories/_repository_/returns_false_if_the_repository_doesn_t_exist.json +0 -1
  229. data/spec/cassettes/Octokit_Client_Repositories/_repository_/returns_true_if_the_repository_exists.json +0 -1
  230. data/spec/cassettes/Octokit_Client_Repositories/_star/stars_a_repository.json +0 -1
  231. data/spec/cassettes/Octokit_Client_Repositories/_stargazers/returns_all_repository_stargazers.json +0 -1
  232. data/spec/cassettes/Octokit_Client_Repositories/_subscribers/lists_all_the_users_watching_the_repository.json +0 -1
  233. data/spec/cassettes/Octokit_Client_Repositories/_subscription/returns_a_repository_subscription.json +0 -1
  234. data/spec/cassettes/Octokit_Client_Repositories/_tags/returns_a_repository_s_tags.json +0 -1
  235. data/spec/cassettes/Octokit_Client_Repositories/_unstar/unstars_a_repository.json +0 -1
  236. data/spec/cassettes/Octokit_Client_Repositories/_unwatch/unwatches_a_repository.json +0 -1
  237. data/spec/cassettes/Octokit_Client_Repositories/_update_subscription/updates_a_repository_subscription.json +0 -1
  238. data/spec/cassettes/Octokit_Client_Repositories/_watch/watches_a_repository.json +0 -1
  239. data/spec/cassettes/Octokit_Client_Repositories/_watchers/returns_all_repository_watchers.json +0 -1
  240. data/spec/cassettes/Octokit_Client_Repositories/methods_that_require_a_new_repo/_add_collaborator/adds_a_repository_collaborators.json +0 -1
  241. data/spec/cassettes/Octokit_Client_Repositories/methods_that_require_a_new_repo/_create_repository/creates_a_repository.json +0 -1
  242. data/spec/cassettes/Octokit_Client_Repositories/methods_that_require_a_new_repo/_delete_repository/deletes_a_repository.json +0 -1
  243. data/spec/cassettes/Octokit_Client_Repositories/methods_that_require_a_new_repo/_deploy_keys/returns_a_repository_s_deploy_keys.json +0 -1
  244. data/spec/cassettes/Octokit_Client_Repositories/methods_that_require_a_new_repo/_hooks/returns_a_repository_s_hooks.json +0 -1
  245. data/spec/cassettes/Octokit_Client_Repositories/methods_that_require_a_new_repo/_remove_collaborator/removes_a_repository_collaborators.json +0 -1
  246. data/spec/cassettes/Octokit_Client_Repositories/methods_that_require_a_new_repo/_repository_teams/returns_all_repository_teams.json +0 -1
  247. data/spec/cassettes/Octokit_Client_Repositories/methods_that_require_a_new_repo/_update_repository/updates_the_matching_repository.json +0 -1
  248. data/spec/cassettes/Octokit_Client_Repositories/methods_that_require_a_new_repo/methods_requiring_an_existing_deploy_key/_add_deploy_key/adds_a_repository_deploy_keys.json +0 -1
  249. data/spec/cassettes/Octokit_Client_Repositories/methods_that_require_a_new_repo/methods_that_need_an_existing_hook/_create_hook/creates_a_hook.json +0 -1
  250. data/spec/cassettes/Octokit_Client_Repositories/methods_that_require_a_new_repo/methods_that_need_an_existing_hook/_edit_hook/edits_a_hook.json +0 -1
  251. data/spec/cassettes/Octokit_Client_Repositories/methods_that_require_a_new_repo/methods_that_need_an_existing_hook/_hook/returns_a_repository_s_single_hook.json +0 -1
  252. data/spec/cassettes/Octokit_Client_Repositories/methods_that_require_a_new_repo/methods_that_need_an_existing_hook/_remove_hook/removes_a_hook.json +0 -1
  253. data/spec/cassettes/Octokit_Client_Repositories/methods_that_require_a_new_repo/methods_that_need_an_existing_hook/_test_hook/tests_a_hook.json +0 -1
  254. data/spec/cassettes/Octokit_Client_Say/_say/returns_an_ASCII_octocat.json +0 -1
  255. data/spec/cassettes/Octokit_Client_Say/_say/returns_an_ASCII_octocat_with_custom_text.json +0 -1
  256. data/spec/cassettes/Octokit_Client_Search/_search_code/searches_code.json +0 -1
  257. data/spec/cassettes/Octokit_Client_Search/_search_issues/searches_issues.json +0 -1
  258. data/spec/cassettes/Octokit_Client_Search/_search_repositories/searches_repositories.json +0 -1
  259. data/spec/cassettes/Octokit_Client_Search/_search_users/searches_users.json +0 -1
  260. data/spec/cassettes/Octokit_Client_ServiceStatus/_github_status/returns_the_current_system_status.json +0 -1
  261. data/spec/cassettes/Octokit_Client_ServiceStatus/_github_status/returns_the_most_recent_status_messages.json +0 -1
  262. data/spec/cassettes/Octokit_Client_ServiceStatus/_github_status_last_message/returns_the_last_human_message.json +0 -1
  263. data/spec/cassettes/Octokit_Client_Stats/_code_frequency_stats/returns_the_code_frequency_stats.json +0 -1
  264. data/spec/cassettes/Octokit_Client_Stats/_commit_activity_stats/returns_the_commit_activity_stats.json +0 -1
  265. data/spec/cassettes/Octokit_Client_Stats/_contributors_stats/returns_contributors_and_their_contribution_stats.json +0 -1
  266. data/spec/cassettes/Octokit_Client_Stats/_participation_stats/returns_the_owner_and_contributor_participation_stats.json +0 -1
  267. data/spec/cassettes/Octokit_Client_Stats/_punch_card_stats/returns_commit_count_by_hour_punch_card_stats.json +0 -1
  268. data/spec/cassettes/Octokit_Client_Statuses/_create_status/creates_status.json +0 -1
  269. data/spec/cassettes/Octokit_Client_Statuses/_statuses/lists_commit_statuses.json +0 -1
  270. data/spec/cassettes/Octokit_Client_Users/_add_email/adds_an_email_address.json +0 -1
  271. data/spec/cassettes/Octokit_Client_Users/_all_users/returns_all_GitHub_users.json +0 -1
  272. data/spec/cassettes/Octokit_Client_Users/_emails/returns_email_addresses.json +0 -1
  273. data/spec/cassettes/Octokit_Client_Users/_follow/follows_a_user.json +0 -1
  274. data/spec/cassettes/Octokit_Client_Users/_followers/returns_followers_for_a_user.json +0 -1
  275. data/spec/cassettes/Octokit_Client_Users/_followers/returns_the_authenticated_user_s_followers.json +0 -1
  276. data/spec/cassettes/Octokit_Client_Users/_following/returns_following_for_a_user.json +0 -1
  277. data/spec/cassettes/Octokit_Client_Users/_following/returns_the_authenticated_user_s_following.json +0 -1
  278. data/spec/cassettes/Octokit_Client_Users/_follows_/checks_if_given_user_is_following_target_user.json +0 -1
  279. data/spec/cassettes/Octokit_Client_Users/_follows_/checks_if_the_authenticated_user_follows_another.json +0 -1
  280. data/spec/cassettes/Octokit_Client_Users/_keys/returns_public_keys_for_the_authenticated_user.json +0 -1
  281. data/spec/cassettes/Octokit_Client_Users/_remove_email/removes_an_email_address.json +0 -1
  282. data/spec/cassettes/Octokit_Client_Users/_starred/returns_starred_repositories_for_a_user.json +0 -1
  283. data/spec/cassettes/Octokit_Client_Users/_starred/returns_starred_repositories_for_the_authenticated_user.json +0 -1
  284. data/spec/cassettes/Octokit_Client_Users/_starred_/checks_if_the_authenticated_user_has_starred_a_repository.json +0 -1
  285. data/spec/cassettes/Octokit_Client_Users/_starred_/checks_if_the_authenticated_user_has_starred_a_repository_deprecated_.json +0 -1
  286. data/spec/cassettes/Octokit_Client_Users/_subscriptions/returns_the_repositories_a_user_watches_for_notifications.json +0 -1
  287. data/spec/cassettes/Octokit_Client_Users/_subscriptions/returns_the_repositories_the_authenticated_user_watches_for_notifications.json +0 -1
  288. data/spec/cassettes/Octokit_Client_Users/_unfollow/unfollows_a_user.json +0 -1
  289. data/spec/cassettes/Octokit_Client_Users/_update_user/updates_a_user_profile.json +0 -1
  290. data/spec/cassettes/Octokit_Client_Users/_user/returns_a_user.json +0 -1
  291. data/spec/cassettes/Octokit_Client_Users/_user/returns_the_authenticated_user.json +0 -1
  292. data/spec/cassettes/Octokit_Client_Users/_user_keys/returns_public_keys_for_another_user.json +0 -1
  293. data/spec/cassettes/Octokit_Client_Users/_validate_credentials/validates_username_and_password.json +0 -1
  294. data/spec/cassettes/Octokit_Client_Users/methods_requiring_an_existing_public_key/_add_key/adds_a_public_key.json +0 -1
  295. data/spec/cassettes/Octokit_Client_Users/methods_requiring_an_existing_public_key/_key/returns_a_public_key.json +0 -1
  296. data/spec/cassettes/Octokit_Client_Users/methods_requiring_an_existing_public_key/_remove_key/removes_a_public_key.json +0 -1
  297. data/spec/cassettes/Octokit_Client_Users/methods_requiring_an_existing_public_key/_update_key/updates_a_public_key.json +0 -1
  298. data/spec/cassettes/delete_authorization.json +0 -1
  299. data/spec/cassettes/rate_limit.json +0 -1
  300. data/spec/cassettes/root.json +0 -1
  301. data/spec/fixtures/large_file.txt +0 -48
  302. data/spec/fixtures/new_file.txt +0 -1
  303. data/spec/fixtures/updated_file.txt +0 -1
  304. data/spec/fixtures/upload.png +0 -0
  305. data/spec/fixtures/user.json +0 -31
  306. data/spec/fixtures/web_flow_token.json +0 -4
  307. data/spec/helper.rb +0 -133
  308. data/spec/octokit/client/authorizations_spec.rb +0 -118
  309. data/spec/octokit/client/commit_comments_spec.rb +0 -62
  310. data/spec/octokit/client/commits_spec.rb +0 -139
  311. data/spec/octokit/client/contents_spec.rb +0 -131
  312. data/spec/octokit/client/downloads_spec.rb +0 -59
  313. data/spec/octokit/client/emojis_spec.rb +0 -12
  314. data/spec/octokit/client/events_spec.rb +0 -106
  315. data/spec/octokit/client/gists_spec.rb +0 -184
  316. data/spec/octokit/client/gitignore_spec.rb +0 -26
  317. data/spec/octokit/client/issues_spec.rb +0 -174
  318. data/spec/octokit/client/labels_spec.rb +0 -115
  319. data/spec/octokit/client/legacy_search_spec.rb +0 -42
  320. data/spec/octokit/client/markdown_spec.rb +0 -20
  321. data/spec/octokit/client/meta_spec.rb +0 -14
  322. data/spec/octokit/client/milestones_spec.rb +0 -59
  323. data/spec/octokit/client/notifications_spec.rb +0 -85
  324. data/spec/octokit/client/objects_spec.rb +0 -71
  325. data/spec/octokit/client/organizations_spec.rb +0 -197
  326. data/spec/octokit/client/pub_sub_hubbub_spec.rb +0 -93
  327. data/spec/octokit/client/pull_requests_spec.rb +0 -186
  328. data/spec/octokit/client/rate_limit_spec.rb +0 -44
  329. data/spec/octokit/client/refs_spec.rb +0 -70
  330. data/spec/octokit/client/releases_spec.rb +0 -137
  331. data/spec/octokit/client/repositories_spec.rb +0 -406
  332. data/spec/octokit/client/say_spec.rb +0 -23
  333. data/spec/octokit/client/search_spec.rb +0 -59
  334. data/spec/octokit/client/service_status_spec.rb +0 -37
  335. data/spec/octokit/client/stats_spec.rb +0 -105
  336. data/spec/octokit/client/statuses_spec.rb +0 -28
  337. data/spec/octokit/client/users_spec.rb +0 -220
  338. data/spec/octokit/client_spec.rb +0 -576
  339. data/spec/octokit/gist_spec.rb +0 -49
  340. data/spec/octokit/rate_limit_spec.rb +0 -30
  341. data/spec/octokit/repository_spec.rb +0 -55
  342. data/spec/octokit_spec.rb +0 -46
@@ -1,131 +0,0 @@
1
- require 'helper'
2
-
3
- describe Octokit::Client::Contents do
4
-
5
- before do
6
- Octokit.reset!
7
- @client = oauth_client
8
- end
9
-
10
- describe ".readme", :vcr do
11
- it "returns the default readme" do
12
- readme = @client.readme('octokit/octokit.rb')
13
- expect(readme.encoding).to eq "base64"
14
- expect(readme.type).to eq "file"
15
- assert_requested :get, github_url("/repos/octokit/octokit.rb/readme")
16
- end
17
- end # .readme
18
-
19
- describe ".contents", :vcr do
20
- it "returns the contents of a file" do
21
- contents = @client.contents('octokit/octokit.rb', :path => "lib/octokit.rb")
22
- expect(contents.encoding).to eq "base64"
23
- expect(contents.type).to eq "file"
24
- assert_requested :get, github_url("/repos/octokit/octokit.rb/contents/lib/octokit.rb")
25
- end
26
- end # .contents
27
-
28
- describe ".archive_link", :vcr do
29
- it "returns the headers of the request" do
30
- archive_link = @client.archive_link('octokit/octokit.rb', :ref => "master")
31
- expect(archive_link).to eq 'https://codeload.github.com/octokit/octokit.rb/legacy.tar.gz/master'
32
- assert_requested :head, github_url("/repos/octokit/octokit.rb/tarball/master")
33
- end
34
- end # .archive_link
35
-
36
- # TODO: Make the following specs idempotent
37
-
38
- describe ".create_contents", :vcr do
39
- it "creates repository contents at a path", :vcr do
40
- response = @client.create_contents("api-playground/api-sandbox",
41
- "test_create.txt",
42
- "I am commit-ing",
43
- "Here be the content\n")
44
- expect(response.commit.sha).to match /[a-z0-9]{40}/
45
- assert_requested(:put, github_url("/repos/api-playground/api-sandbox/contents/test_create.txt"))
46
- end
47
- it "creates contents from file path", :vcr do
48
- response = @client.create_contents("api-playground/api-sandbox",
49
- "test_create_path.txt",
50
- "I am commit-ing",
51
- :file => "spec/fixtures/new_file.txt")
52
- expect(response.commit.sha).to match /[a-z0-9]{40}/
53
- assert_requested(:put, github_url("/repos/api-playground/api-sandbox/contents/test_create_path.txt"))
54
- end
55
- it "creates contents from File object", :vcr do
56
- file = File.new "spec/fixtures/new_file.txt", "r"
57
- response = @client.create_contents("api-playground/api-sandbox",
58
- "test_create_file.txt",
59
- "I am commit-ing",
60
- :file => file)
61
- expect(response.commit.sha).to match /[a-z0-9]{40}/
62
- assert_requested(:put, github_url("/repos/api-playground/api-sandbox/contents/test_create_file.txt"))
63
- end
64
- it "does not add new lines", :vcr do
65
- file = File.new "spec/fixtures/large_file.txt", "r"
66
- response = @client.create_contents("api-playground/api-sandbox",
67
- "test_create_without_newlines.txt",
68
- "I am commit-ing",
69
- :file => file)
70
- assert_requested(:put, github_url("/repos/api-playground/api-sandbox/contents/test_create_without_newlines.txt"))
71
- content = response.content.rels[:self].get \
72
- :headers => {:accept => "application/vnd.github.raw" }
73
- expect(content.data).to eq(File.read("spec/fixtures/large_file.txt"))
74
- end
75
- end # .create_contents
76
-
77
- describe ".update_contents", :vcr do
78
- it "updates repository contents at a path" do
79
- content = @client.create_contents("api-playground/api-sandbox",
80
- "test_update.txt",
81
- "I am commit-ing",
82
- :file => "spec/fixtures/new_file.txt")
83
- response = @client.update_contents("api-playground/api-sandbox",
84
- "test_update.txt",
85
- "I am commit-ing",
86
- content.content.sha,
87
- "Here be moar content")
88
- expect(response.commit.sha).to match /[a-z0-9]{40}/
89
- assert_requested :put,
90
- github_url("/repos/api-playground/api-sandbox/contents/test_update.txt"),
91
- :times => 2
92
-
93
- end
94
- it "does not add new lines", :vcr do
95
- content = @client.create_contents("api-playground/api-sandbox",
96
- "test_update_without_newlines.txt",
97
- "I am commit-ing",
98
- :file => "spec/fixtures/new_file.txt")
99
- response = @client.update_contents("api-playground/api-sandbox",
100
- "test_update_without_newlines.txt",
101
- "I am commit-ing",
102
- content.content.sha,
103
- :file => "spec/fixtures/large_file.txt")
104
-
105
- assert_requested :put,
106
- github_url("/repos/api-playground/api-sandbox/contents/test_update_without_newlines.txt"),
107
- :times => 2
108
-
109
- content = response.content.rels[:self].get \
110
- :headers => {:accept => "application/vnd.github.raw" }
111
- expect(content.data).to eq(File.read("spec/fixtures/large_file.txt"))
112
- end
113
- end # .update_contents
114
-
115
- describe ".delete_contents", :vcr do
116
- it "deletes repository contents at a path" do
117
- content = @client.create_contents("api-playground/api-sandbox",
118
- "test_delete.txt",
119
- "I am commit-ing",
120
- "You DELETE me")
121
- response = @client.delete_contents("api-playground/api-sandbox",
122
- "test_delete.txt",
123
- "I am rm-ing",
124
- content.content.sha)
125
- expect(response.commit.sha).to match /[a-z0-9]{40}/
126
- assert_requested :delete,
127
- github_url("/repos/api-playground/api-sandbox/contents/test_delete.txt")
128
- end
129
- end # .delete_contents
130
-
131
- end
@@ -1,59 +0,0 @@
1
- require 'helper'
2
-
3
- describe Octokit::Client::Downloads do
4
-
5
- before do
6
- Octokit.reset!
7
- @client = oauth_client
8
- end
9
-
10
- describe ".downloads", :vcr do
11
- it "lists available downloads" do
12
- downloads = @client.downloads("github/hubot")
13
- expect(downloads.last.description).to match "Campfire"
14
- assert_requested :get, github_url("/repos/github/hubot/downloads")
15
- end
16
- end # .downloads
17
-
18
- describe ".download", :vcr do
19
- it "gets a single download" do
20
- download = @client.download("github/hubot", 165347)
21
- expect(download.name).to eq "hubot-2.1.0.tar.gz"
22
- assert_requested :get, github_url("/repos/github/hubot/downloads/165347")
23
- end
24
- end # .download
25
-
26
- context "methods that require a download" do
27
-
28
- before(:each) do
29
- local_path = File.expand_path("spec/fixtures/web_flow_token.json")
30
- options = { :description => Time.now.to_i.to_s, :content_type => "text/plain" }
31
- @client.create_download "api-playground/api-sandbox", local_path, options
32
-
33
- @download = @client.downloads("api-playground/api-sandbox").last
34
- end
35
-
36
- after(:each) do
37
- @client.delete_download 'api-playground/api-sandbox', @download.id
38
- end
39
-
40
- describe ".create_download", :vcr do
41
- it "creates a download resource" do
42
- assert_requested :post, github_url("/repos/api-playground/api-sandbox/downloads")
43
- end
44
- it "posts to an S3 url", :vcr do
45
- assert_requested :post, "https://github.s3.amazonaws.com/"
46
- end
47
- end # .create_download
48
-
49
-
50
- describe ".delete_download", :vcr do
51
- it "deletes a download" do
52
- @client.delete_download 'api-playground/api-sandbox', @download.id
53
- assert_requested :delete, github_url("/repos/api-playground/api-sandbox/downloads/#{@download.id}")
54
- end
55
- end # .delete_download
56
-
57
- end
58
-
59
- end
@@ -1,12 +0,0 @@
1
- require 'helper'
2
-
3
- describe Octokit::Client::Emojis do
4
-
5
- describe ".emojis", :vcr do
6
- it "returns all github emojis" do
7
- client = oauth_client
8
- emojis = client.emojis
9
- expect(emojis[:metal]).to match /metal/
10
- end
11
- end # .emojis
12
- end
@@ -1,106 +0,0 @@
1
- require 'helper'
2
-
3
- describe Octokit::Client::Events do
4
-
5
- before do
6
- Octokit.reset!
7
- @client = oauth_client
8
- end
9
-
10
- describe ".public_events", :vcr do
11
- it "returns all public events" do
12
- public_events = @client.public_events
13
- expect(public_events).to be_kind_of Array
14
- assert_requested :get, github_url("/events")
15
- end
16
- end # .public_events
17
-
18
- describe ".user_events", :vcr do
19
- it "returns all user events" do
20
- user_events = @client.user_events('sferik')
21
- expect(user_events).to be_kind_of Array
22
- assert_requested :get, github_url("/users/sferik/events")
23
- end
24
- end # .user_events
25
-
26
- describe ".user_public_events", :vcr do
27
- it "returns public events performed by a user" do
28
- user_public_events = @client.user_public_events("sferik")
29
- expect(user_public_events).to be_kind_of Array
30
- assert_requested :get, github_url("/users/sferik/events/public")
31
- end
32
- end # .user_public_events
33
-
34
- describe ".received_events", :vcr do
35
- it "returns all user received events" do
36
- received_events = @client.received_events("api-padawan")
37
- expect(received_events).to be_kind_of Array
38
- assert_requested :get, github_url("/users/api-padawan/received_events")
39
- end
40
- end # .received_events
41
-
42
- describe ".received_public_events", :vcr do
43
- it "returns public user received events" do
44
- received_public_events = @client.received_public_events("api-padawan")
45
- expect(received_public_events).to be_kind_of Array
46
- assert_requested :get, github_url("/users/api-padawan/received_events/public")
47
- end
48
- end # .received_public_events
49
-
50
- describe ".repository_events", :vcr do
51
- it "returns events for a repository" do
52
- repo_events = @client.repository_events("sferik/rails_admin")
53
- expect(repo_events).to be_kind_of Array
54
- assert_requested :get, github_url('/repos/sferik/rails_admin/events')
55
- end
56
- end # .repository_events
57
-
58
- describe ".repository_network_events", :vcr do
59
- it "returns events for a repository's network" do
60
- repo_network_events = @client.repository_network_events("sferik/rails_admin")
61
- expect(repo_network_events).to be_kind_of Array
62
- assert_requested :get, github_url('/networks/sferik/rails_admin/events')
63
- end
64
- end # .repository_network_events
65
-
66
- describe ".organization_events", :vcr do
67
- it "returns all events for an organization" do
68
- client = oauth_client
69
- org_events = client.organization_events("github")
70
- expect(org_events).to be_kind_of Array
71
- assert_requested :get, github_url("/users/api-padawan/events/orgs/github")
72
- end
73
- end # .organization_events
74
-
75
- describe ".organization_public_events", :vcr do
76
- it "returns an organization's public events" do
77
- org_public_events = @client.organization_public_events("github")
78
- expect(org_public_events).to be_kind_of Array
79
- assert_requested :get, github_url("/orgs/github/events")
80
- end
81
- end # .organization_public_events
82
-
83
- describe ".repo_issue_events", :vcr do
84
- it "lists issue events for a repository" do
85
- issue_events = @client.repo_issue_events("octokit/octokit.rb")
86
- expect(issue_events).to be_kind_of Array
87
- assert_requested :get, github_url("/repos/octokit/octokit.rb/issues/events")
88
- end
89
- end # .repo_issue_events
90
-
91
- describe ".issue_events", :vcr do
92
- it "lists issue events for a repository" do
93
- issue_events = @client.issue_events("octokit/octokit.rb", 4)
94
- expect(issue_events).to be_kind_of Array
95
- assert_requested :get, github_url("/repos/octokit/octokit.rb/issues/4/events")
96
- end
97
- end # .issue_events
98
-
99
- describe ".issue_event", :vcr do
100
- it "lists issue events for a repository" do
101
- # TODO: Remove and use hypermedia
102
- issue_events = @client.issue_event("octokit/octokit.rb", 37786228)
103
- assert_requested :get, github_url("/repos/octokit/octokit.rb/issues/events/37786228")
104
- end
105
- end # .issue_events
106
- end
@@ -1,184 +0,0 @@
1
- require 'helper'
2
-
3
- describe Octokit::Client::Gists do
4
-
5
- before do
6
- Octokit.reset!
7
- end
8
-
9
- describe "unauthenticated", :vcr do
10
-
11
- describe ".public_gists" do
12
- it "returns public gists" do
13
- gists = Octokit.client.public_gists
14
- expect(gists).to_not be_empty
15
- assert_requested :get, github_url('/gists/public')
16
- end
17
- end # .public_gists
18
-
19
- describe ".gists" do
20
- describe "with username passed" do
21
- it "returns a list of gists" do
22
- gists = Octokit.client.gists('defunkt')
23
- expect(gists).to_not be_empty
24
- assert_requested :get, github_url("/users/defunkt/gists")
25
- end
26
- end
27
-
28
- describe "without a username passed" do
29
- it "returns a list of gists" do
30
- gists = Octokit.client.gists
31
- expect(gists).to_not be_empty
32
- assert_requested :get, github_url("/gists")
33
- end
34
- end
35
-
36
- end # .gists
37
-
38
- describe ".gist" do
39
- it "returns the gist by ID" do
40
- gist = Octokit.client.gist(790381)
41
- expect(gist.user.login).to eq 'jmccartie'
42
- assert_requested :get, github_url("/gists/790381")
43
- end
44
- end
45
-
46
- end # unauthenticated
47
-
48
- describe "when authenticated", :vcr do
49
-
50
- before do
51
- @client = oauth_client
52
- new_gist = {
53
- :description => "A gist from Octokit",
54
- :public => true,
55
- :files => {
56
- "zen.text" => { :content => "Keep it logically awesome." }
57
- }
58
- }
59
-
60
- @gist = @client.create_gist(new_gist)
61
- @gist_comment = @client.create_gist_comment(5421307, ":metal:")
62
- end
63
-
64
- describe ".gists" do
65
- it "returns a list of gists" do
66
- gists = @client.gists
67
- expect(gists).to_not be_empty
68
- assert_requested :get, github_url("/gists")
69
- end
70
- end # .gists
71
-
72
-
73
- describe ".starred_gists" do
74
- it "returns the user's starred gists" do
75
- gists = @client.starred_gists
76
- expect(gists).to be_kind_of Array
77
- assert_requested :get, github_url("/gists/starred")
78
- end
79
- end # .starred_gists
80
-
81
- describe ".create_gist" do
82
- it "creates a new gist" do
83
- expect(@gist.user.login).to eq 'api-padawan'
84
- expect(@gist.files.fields.first.to_s).to match /zen/
85
- assert_requested :post, github_url("/gists")
86
- end
87
- end # .create_gist
88
-
89
- describe ".edit_gist" do
90
- it "edit an existing gist" do
91
- gist = @client.edit_gist(@gist.id, :description => "GitHub Zen")
92
- assert_requested :patch, github_url("/gists/#{@gist.id}")
93
- end
94
- end # .edit_gist
95
-
96
- describe ".star_gist" do
97
- it "stars an existing gist" do
98
- @client.star_gist(@gist.id)
99
- assert_requested :put, github_url("/gists/#{@gist.id}/star")
100
- expect(@client.last_response.status).to eq 204
101
- end
102
- end # .star
103
-
104
- describe ".unstar_gist" do
105
- it "unstars an existing gist" do
106
- @client.unstar_gist(@gist.id)
107
- assert_requested :delete, github_url("/gists/#{@gist.id}/star")
108
- expect(@client.last_response.status).to eq 204
109
- end
110
- end # .unstar_gist
111
-
112
- describe ".gist_starred?" do
113
- it "is starred" do
114
- starred = @client.gist_starred?(5421307)
115
- assert_requested :get, github_url("/gists/5421307/star")
116
- expect(starred).to eq true
117
- end
118
-
119
- it "is not starred" do
120
- starred = @client.gist_starred?(5421308)
121
- assert_requested :get, github_url("/gists/5421308/star")
122
- expect(starred).to eq false
123
- end
124
- end # .gist_starred?
125
-
126
- describe ".fork_gist" do
127
- it "forks an existing gist" do
128
- latest = Octokit.gist(5506606)
129
- gist = @client.fork_gist(latest.id)
130
- expect(gist.description).to eq latest.description
131
- assert_requested :post, github_url("/gists/#{latest.id}/forks")
132
-
133
- # cleanup so we can re-run later
134
- @client.delete_gist(gist.id)
135
- end
136
- end # .fork_gist
137
-
138
- describe ".gist_comments" do
139
- it "returns the list of gist comments" do
140
- comments = @client.gist_comments(5421307)
141
- expect(comments).to be_kind_of Array
142
- assert_requested :get, github_url("/gists/5421307/comments")
143
- end
144
- end # .gist_comments
145
-
146
- describe ".gist_comment" do
147
- it "returns a gist comment" do
148
- comment = @client.gist_comment("5421307", 818334)
149
- expect(comment.body).to match "sparkles"
150
- assert_requested :get, github_url("/gists/5421307/comments/818334")
151
- end
152
- end # .gist_comment
153
-
154
- describe ".create_gist_comment" do
155
- it "creates a gist comment" do
156
- assert_requested :post, github_url("/gists/5421307/comments")
157
- end
158
- end # .create_gist_comment
159
-
160
- describe ".update_gist_comment" do
161
- it "updates a gist comment" do
162
- update = @client.update_gist_comment(5421307, @gist_comment.id, ":heart:")
163
- assert_requested :patch, github_url("/gists/5421307/comments/#{@gist_comment.id}")
164
- end
165
- end # .update_gist_comment
166
-
167
- describe ".delete_gist_comment" do
168
- it "deletes a gist comment" do
169
- comment = @client.create_gist_comment(5421307, ":metal:")
170
- @client.delete_gist_comment(5421307, @gist_comment.id)
171
- assert_requested :delete, github_url("/gists/5421307/comments/#{@gist_comment.id}")
172
- end
173
- end # .delete_gist_comment
174
-
175
- describe ".delete_gist" do
176
- it "deletes an existing gist" do
177
- @client.delete_gist(@gist.id)
178
- assert_requested :delete, github_url("/gists/#{@gist.id}")
179
- end
180
- end # .delete_gist
181
-
182
- end # authenticated
183
-
184
- end