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,44 +0,0 @@
1
- require 'helper'
2
-
3
- describe Octokit::Client do
4
-
5
- describe ".rate_limit" do
6
- it "makes a response if there is no last response" do
7
- client = Octokit::Client.new
8
- VCR.use_cassette 'rate_limit' do
9
- rate = client.rate_limit
10
-
11
- expect(rate.limit).to be_kind_of Fixnum
12
- expect(rate.remaining).to be_kind_of Fixnum
13
- end
14
- end # .rate_limit
15
- it "checks the rate limit from the last response" do
16
- client = Octokit::Client.new
17
- VCR.use_cassette 'root' do
18
- client.get('/')
19
- VCR.use_cassette 'rate_limit' do
20
- rate = client.rate_limit
21
- expect(rate.limit).to be_kind_of Fixnum
22
- expect(rate.remaining).to be_kind_of Fixnum
23
- expect(rate.resets_at).to be_kind_of Time
24
- expect(rate.resets_in).to be_kind_of Fixnum
25
- end
26
- end
27
- end
28
- end
29
-
30
- describe ".rate_limit!" do
31
- it "makes a web request to check the rate limit" do
32
- client = Octokit::Client.new
33
- VCR.use_cassette 'rate_limit' do
34
- rate = client.rate_limit!
35
-
36
- expect(rate.limit).to be_kind_of Fixnum
37
- expect(rate.remaining).to be_kind_of Fixnum
38
- expect(rate.resets_at).to be_kind_of Time
39
- expect(rate.resets_in).to be_kind_of Fixnum
40
- end
41
- end
42
- end # .rate_limit!
43
-
44
- end
@@ -1,70 +0,0 @@
1
- require 'helper'
2
-
3
- describe Octokit::Client::Refs do
4
-
5
- before do
6
- Octokit.reset!
7
- @client = oauth_client
8
- end
9
-
10
- describe ".refs", :vcr do
11
- it "returns all refs" do
12
- refs = @client.refs("sferik/rails_admin")
13
- expect(refs).to be_kind_of Array
14
- assert_requested :get, github_url("/repos/sferik/rails_admin/git/refs")
15
- end
16
- it "returns all tag refs" do
17
- refs = @client.refs("sferik/rails_admin", "tags")
18
- expect(refs).to be_kind_of Array
19
- assert_requested :get, github_url("/repos/sferik/rails_admin/git/refs/tags")
20
- end
21
- end # .refs
22
-
23
- describe ".ref", :vcr do
24
- it "returns a tags ref" do
25
- ref = @client.ref("sferik/rails_admin", "tags/v0.0.3")
26
- expect(ref.object.type).to eq "tag"
27
- assert_requested :get, github_url("/repos/sferik/rails_admin/git/refs/tags/v0.0.3")
28
- end
29
- end # .ref
30
-
31
- context "methods that require a ref", :vcr do
32
-
33
- before(:each) do
34
- commits = @client.commits("api-playground/api-sandbox")
35
- @first_sha = commits.first.sha
36
- @last_sha = commits.last.sha
37
- @ref = @client.create_ref("api-playground/api-sandbox","heads/testing/test-ref", @first_sha)
38
- end
39
-
40
- after(:each) do
41
- begin
42
- @client.delete_ref("api-playground/api-sandbox", "heads/testing/test-ref")
43
- rescue Octokit::UnprocessableEntity
44
- end
45
- end
46
-
47
- describe ".create_ref" do
48
- it "creates a ref" do
49
- assert_requested :post, github_url("/repos/api-playground/api-sandbox/git/refs")
50
- end
51
- end # .create_ref
52
-
53
- describe ".update_ref" do
54
- it "updates a ref" do
55
- refs = @client.update_ref("api-playground/api-sandbox", "heads/testing/test-ref", @last_sha, true)
56
- assert_requested :patch, github_url("/repos/api-playground/api-sandbox/git/refs/heads/testing/test-ref")
57
- end
58
- end # .update_ref
59
-
60
- describe ".delete_ref" do
61
- it "deletes an existing ref" do
62
- result = @client.delete_ref("api-playground/api-sandbox", "heads/testing/test-ref")
63
- assert_requested :delete, github_url("/repos/api-playground/api-sandbox/git/refs/heads/testing/test-ref")
64
- end
65
- end # .delete_ref
66
-
67
- end # @ref methods
68
-
69
- end
70
-
@@ -1,137 +0,0 @@
1
- require 'helper'
2
-
3
- describe Octokit::Client::Releases do
4
-
5
- before do
6
- Octokit.reset!
7
- @client = oauth_client
8
- end
9
-
10
- describe ".releases" do
11
- it "lists releases for a repo", :vcr do
12
- releases = @client.releases "api-playground/api-sandbox"
13
- expect(releases).to be_kind_of Array
14
- assert_requested :get, github_url("/repos/api-playground/api-sandbox/releases")
15
- end
16
- end
17
-
18
- describe ".create_release", :vcr do
19
- it "creates a release" do
20
- release = @client.create_release \
21
- "api-playground/api-sandbox", "test-create-release-tag", :name => "Test Create Release"
22
- expect(release.tag_name).to eq("test-create-release-tag")
23
- expect(release.name).to eq("Test Create Release")
24
- assert_requested :post, github_url("/repos/api-playground/api-sandbox/releases")
25
- end
26
- end
27
-
28
- describe ".release", :vcr do
29
- it "gets a single release" do
30
- created = @client.create_release \
31
- "api-playground/api-sandbox", "test-get-release-tag", :name => "Test Get Release"
32
- release = @client.release created.rels[:self].href
33
- expect(release.tag_name).to eq("test-get-release-tag")
34
- expect(release.name).to eq("Test Get Release")
35
- end
36
- end
37
-
38
- describe ".update_release", :vcr do
39
- it "updates a release" do
40
- created = @client.create_release \
41
- "api-playground/api-sandbox", "test-update-release-tag", :name => "Test Update Release"
42
- release = @client.update_release \
43
- created.rels[:self].href, :name => "An updated release"
44
- expect(release.name).to eq("An updated release")
45
- assert_requested :patch, created.rels[:self].href
46
- end
47
- end
48
-
49
- describe ".delete_release", :vcr do
50
- it "deletes a release" do
51
- created = @client.create_release \
52
- "api-playground/api-sandbox", "test-delete-release-tag", :name => "Test Delete Release"
53
- url = created.rels[:self].href
54
- result = @client.delete_release url
55
- expect(result).to be_true
56
- expect { @client.release(url) }.to raise_error(Octokit::NotFound)
57
- end
58
- end
59
-
60
- context "handling release assets" do
61
-
62
- before do
63
- @release_url = "https://api.github.com/repos/api-playground/api-sandbox/releases/43567"
64
- end
65
-
66
- describe ".release_assets", :vcr do
67
- it "lists assets for a release" do
68
- assets = @client.release_assets(@release_url)
69
- expect(assets).to be_kind_of(Array)
70
- end
71
- end
72
-
73
- describe ".upload_release_asset", :vcr do
74
- it "uploads a release asset by path" do
75
- local_path = "spec/fixtures/upload.png"
76
- name = "upload_by_path.png"
77
- asset = @client.upload_asset(@release_url, local_path, :content_type => "image/png", :name => name)
78
- expect(asset.name).to eq(name)
79
- end
80
- it "uploads a release asset as file object" do
81
- file = File.new("spec/fixtures/upload.png", "r+b")
82
- size = File.size(file)
83
- name = "upload_by_file.png"
84
- asset = @client.upload_asset(@release_url, file, :content_type => "image/png", :name => name)
85
- expect(asset.name).to eq(name)
86
- expect(asset.size).to eq(size)
87
- end
88
- it "uploads a release asset with a default name" do
89
- path = "spec/fixtures/upload.png"
90
- name = "upload.png"
91
- asset = @client.upload_asset(@release_url, path, :content_type => "image/png")
92
- expect(asset.name).to eq(name)
93
- end
94
- it "guesses the content type for an asset" do
95
- path = "spec/fixtures/upload.png"
96
- name = "upload_guess_content_type.png"
97
- asset = @client.upload_asset(@release_url, path, :name => name)
98
- expect(asset.name).to eq(name)
99
- expect(asset.content_type).to eq("image/png")
100
- end
101
- end
102
-
103
- describe ".release_asset" do
104
- it "gets a single release asset" do
105
- location = "http://example.com/myfile.gif"
106
- asset_url = "https://api.github.com/repos/api-playground/api-sandbox/releases/assets/21313"
107
- request = stub_get(asset_url).with({
108
- :headers => {"Accept" => "application/vnd.github.manifold-preview"}
109
- })
110
-
111
- @client.release_asset(asset_url)
112
- assert_requested request
113
- end
114
- end
115
-
116
- describe ".update_release_asset" do
117
- it "edits a release asset", :vcr do
118
- asset_url = "https://api.github.com/repos/api-playground/api-sandbox/releases/assets/21313"
119
- updated = @client.update_release_asset(asset_url, :label => "Updated")
120
- expect(updated.label).to eq("Updated")
121
- end
122
- end
123
-
124
- describe ".delete_release_asset" do
125
- it "deletes a release asset" do
126
- asset_url = "https://api.github.com/repos/api-playground/api-sandbox/releases/assets/21313"
127
- request = stub_delete(asset_url).with({
128
- :headers => {"Accept" => "application/vnd.github.manifold-preview"}
129
- }).to_return(:status => 204)
130
-
131
- expect(@client.delete_release_asset(asset_url)).to be_true
132
- assert_requested request
133
- end
134
- end
135
-
136
- end
137
- end
@@ -1,406 +0,0 @@
1
- require 'helper'
2
-
3
- describe Octokit::Client::Repositories do
4
-
5
- before do
6
- Octokit.reset!
7
- @client = oauth_client
8
- end
9
-
10
- describe ".repository", :vcr do
11
- it "returns the matching repository" do
12
- repository = @client.repository("sferik/rails_admin")
13
- expect(repository.name).to eq "rails_admin"
14
- assert_requested :get, github_url("/repos/sferik/rails_admin")
15
- end
16
- end # .repository
17
-
18
- describe ".set_private" do
19
- it "sets a repository private" do
20
- VCR.turn_off!
21
- repo_name = "api-playground/api-sandbox"
22
- # Stub this because Padawan is on a free plan
23
- request = stub_patch(github_url("/repos/#{repo_name}")).
24
- with(:body => {:private => true, :name => "api-sandbox"}.to_json)
25
- repository = @client.set_private repo_name
26
- assert_requested request
27
- VCR.turn_on!
28
- end
29
- end # .set_private
30
-
31
- describe ".set_public" do
32
- it "sets a repository public" do
33
- VCR.turn_off!
34
- repo_name = "api-playground/api-sandbox"
35
- # Stub this because Padawan is on a free plan
36
- request = stub_patch(github_url("/repos/#{repo_name}")).
37
- with(:body => {:private => false, :name => "api-sandbox"}.to_json)
38
- repository = @client.set_public repo_name
39
- assert_requested request
40
- VCR.turn_on!
41
- end
42
- end # .set_public
43
-
44
- describe ".create_repository", :vcr do
45
- it "creates a repository for an organization" do
46
- repository = @client.create_repository("an-org-repo", :organization => "api-playground")
47
- expect(repository.name).to eq "an-org-repo"
48
- assert_requested :post, github_url("/orgs/api-playground/repos")
49
-
50
- # cleanup
51
- begin
52
- @client.delete_repository("api-playground/an-org-repo")
53
- rescue Octokit::NotFound
54
- end
55
- end
56
- end
57
-
58
- describe ".add_deploy_key" do
59
- it "adds a repository deploy keys" do
60
- VCR.turn_off!
61
- repo_name = "api-playground/api-sandbox"
62
- request = stub_post(github_url("/repos/#{repo_name}/keys"))
63
- public_key = @client.add_deploy_key(repo_name, "Padawan", "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDN/h7Hf5TA6G4p19deF8YS9COfuBd133GPs49tO6AU/DKIt7tlitbnUnttT0VbNZM4fplyinPu5vJl60eusn/Ngq2vDfSHP5SfgHfA9H8cnHGPYG7w6F0CujFB3tjBhHa3L6Je50E3NC4+BGGhZMpUoTClEI5yEzx3qosRfpfJu/2MUp/V2aARCAiHUlUoj5eiB15zC25uDsY7SYxkh1JO0ecKSMISc/OCdg0kwi7it4t7S/qm8Wh9pVGuA5FmVk8w0hvL+hHWB9GT02WPqiesMaS9Sj3t0yuRwgwzLDaudQPKKTKYXi+SjwXxTJ/lei2bZTMC4QxYbqfqYQt66pQB wynn.netherland+api-padawan@gmail.com" )
64
- assert_requested request
65
- VCR.turn_on!
66
- end
67
- end # .add_deploy_key
68
-
69
- describe ".remove_deploy_key" do
70
- it "removes a repository deploy keys" do
71
- VCR.turn_off!
72
- repo_name = "api-playground/api-sandbox"
73
- request = stub_delete(github_url("/repos/#{repo_name}/keys/1234"))
74
- @client.remove_deploy_key(repo_name, 1234)
75
- assert_requested request
76
- VCR.turn_on!
77
- end
78
- end # .remove_deploy_key
79
-
80
- context "methods that require a new @repo" do
81
-
82
- before(:each) do
83
- @repo = @client.create_repository("an-repo")
84
- end
85
-
86
- after(:each) do
87
- begin
88
- @client.delete_repository(@repo.full_name)
89
- rescue Octokit::NotFound
90
- end
91
- end
92
-
93
- describe ".create_repository", :vcr do
94
- it "creates a repository" do
95
- expect(@repo.name).to eq "an-repo"
96
- assert_requested :post, github_url("/user/repos")
97
- end
98
- end # .create_repository
99
-
100
- describe ".update_repository", :vcr do
101
- it "updates the matching repository" do
102
- description = "It's epic"
103
- repository = @client.edit_repository(@repo.full_name, :description => description)
104
- expect(repository.description).to eq description
105
- assert_requested :patch, github_url("/repos/#{@repo.full_name}")
106
- end
107
- end # .update_repository
108
-
109
- describe ".deploy_keys", :vcr do
110
- it "returns a repository's deploy keys" do
111
- public_keys = @client.deploy_keys @repo.full_name
112
- expect(public_keys).to be_kind_of Array
113
- assert_requested :get, github_url("/repos/#{@repo.full_name}/keys")
114
- end
115
- end # .deploy_keys
116
-
117
- describe ".add_collaborator", :vcr do
118
- it "adds a repository collaborators" do
119
- begin
120
- @client.remove_collaborator(@repo.full_name, "pengwynn")
121
- rescue Octokit::NotFound
122
- end
123
- result = @client.add_collaborator(@repo.full_name, "pengwynn")
124
- assert_requested :put, github_url("/repos/#{@repo.full_name}/collaborators/pengwynn")
125
- end
126
- end # .add_collaborator
127
-
128
- describe ".remove_collaborator", :vcr do
129
- it "removes a repository collaborators" do
130
- begin
131
- @client.add_collaborator(@repo.full_name, "pengwynn")
132
- rescue Octokit::UnprocessableEntity
133
- end
134
-
135
- result = @client.remove_collaborator(@repo.full_name, "pengwynn")
136
- assert_requested :delete, github_url("/repos/#{@repo.full_name}/collaborators/pengwynn")
137
- end
138
- end # .remove_collaborator
139
-
140
- describe ".repository_teams", :vcr do
141
- it "returns all repository teams" do
142
- teams = @client.repository_teams(@repo.full_name)
143
- assert_requested :get, github_url("/repos/#{@repo.full_name}/teams")
144
- expect(teams).to be_kind_of Array
145
- end
146
- end # .repository_teams
147
-
148
- describe ".hooks", :vcr do
149
- it "returns a repository's hooks" do
150
- hooks = @client.hooks(@repo.full_name)
151
- expect(hooks).to be_kind_of Array
152
- assert_requested :get, github_url("/repos/#{@repo.full_name}/hooks")
153
- end
154
- end
155
-
156
- context "methods that need an existing hook" do
157
-
158
- before(:each) do
159
- @hook = @client.create_hook(@repo.full_name, "railsbp", {:railsbp_url => "http://railsbp.com", :token => "xAAQZtJhYHGagsed1kYR"})
160
- end
161
-
162
- after(:each) do
163
- @client.remove_hook(@repo.full_name, @hook.id)
164
- end
165
-
166
- describe ".create_hook", :vcr do
167
- it "creates a hook" do
168
- assert_requested :post, github_url("/repos/#{@repo.full_name}/hooks")
169
- end
170
- end # .create_hook
171
-
172
- describe ".hook", :vcr do
173
- it "returns a repository's single hook" do
174
- @client.hook(@repo.full_name, @hook.id)
175
- assert_requested :get, github_url("/repos/#{@repo.full_name}/hooks/#{@hook.id}")
176
- end
177
- end # .hook
178
-
179
- describe ".edit_hook", :vcr do
180
- it "edits a hook" do
181
- hook = @client.edit_hook(@repo.full_name, @hook.id, "railsbp", {:railsbp_url => "https://railsbp.com", :token => "xAAQZtJhYHGagsed1kYR"})
182
- assert_requested :patch, github_url("/repos/#{@repo.full_name}/hooks/#{@hook.id}")
183
- end
184
- end # .edit_hook
185
-
186
- describe ".test_hook", :vcr do
187
- it "tests a hook" do
188
- hook = @client.create_hook(@repo.full_name, "railsbp", {:railsbp_url => "http://railsbp.com", :token => "xAAQZtJhYHGagsed1kYR"})
189
- @client.test_hook(@repo.full_name, @hook.id)
190
- assert_requested :post, github_url("/repos/#{@repo.full_name}/hooks/#{@hook.id}/tests")
191
- end
192
- end # .test_hook
193
-
194
- describe ".remove_hook", :vcr do
195
- it "removes a hook" do
196
- @client.remove_hook(@repo.full_name, @hook.id)
197
- assert_requested :delete, github_url("/repos/#{@repo.full_name}/hooks/#{@hook.id}")
198
- end
199
- end # .remove_hook
200
-
201
- end # hook methods
202
-
203
- describe ".delete_repository", :vcr do
204
- it "deletes a repository" do
205
- result = @client.delete_repository("#{@repo.full_name}")
206
- assert_requested :delete, github_url("/repos/#{@repo.full_name}")
207
- end
208
- end # .delete_repository
209
-
210
- end # @repo methods
211
-
212
- describe ".repositories", :vcr do
213
- it "returns a user's repositories" do
214
- repositories = Octokit.repositories("sferik")
215
- expect(repositories).to be_kind_of Array
216
- assert_requested :get, github_url("/users/sferik/repos")
217
- end
218
- it "returns authenticated user's repositories" do
219
- repositories = @client.repositories
220
- expect(repositories).to be_kind_of Array
221
- assert_requested :get, github_url("/user/repos")
222
- end
223
- end # .repositories
224
-
225
- describe ".all_repositories", :vcr do
226
- it "returns all repositories on github" do
227
- repositories = Octokit.all_repositories
228
- expect(repositories).to be_kind_of Array
229
- assert_requested :get, github_url("/repositories")
230
- end
231
- end # .all_repositories
232
-
233
- describe ".star", :vcr do
234
- it "stars a repository" do
235
- result = @client.star("sferik/rails_admin")
236
- expect(result).to be_true
237
- assert_requested :put, github_url("/user/starred/sferik/rails_admin")
238
- end
239
- end # .star
240
-
241
- describe ".unstar", :vcr do
242
- it "unstars a repository" do
243
- result = @client.unstar("sferik/rails_admin")
244
- expect(result).to be_true
245
- assert_requested :delete, github_url("/user/starred/sferik/rails_admin")
246
- end
247
- end # .unstar
248
-
249
- describe ".watch", :vcr do
250
- it "watches a repository" do
251
- result = @client.watch("sferik/rails_admin")
252
- expect(result).to be_true
253
- assert_requested :put, github_url("/user/watched/sferik/rails_admin")
254
- end
255
- end # .watch
256
-
257
- describe ".unwatch", :vcr do
258
- it "unwatches a repository" do
259
- result = @client.unwatch("sferik/rails_admin")
260
- expect(result).to be_true
261
- assert_requested :delete, github_url("/user/watched/sferik/rails_admin")
262
- end
263
- end # .unwatch
264
-
265
- describe ".fork", :vcr do
266
- it "forks a repository" do
267
- repository = @client.fork("sferik/rails_admin")
268
- assert_requested :post, github_url("/repos/sferik/rails_admin/forks")
269
-
270
- # cleanup
271
- @client.delete_repository(repository.full_name)
272
- end
273
- end # .fork
274
-
275
- describe ".collaborators", :vcr do
276
- it "returns a repository's collaborators" do
277
- collaborators = Octokit.collaborators("sferik/rails_admin")
278
- expect(collaborators).to be_kind_of Array
279
- assert_requested :get, github_url("/repos/sferik/rails_admin/collaborators")
280
- end
281
- end # .collaborators
282
-
283
- describe ".contributors", :vcr do
284
- it "returns repository contributors" do
285
- contributors = Octokit.contributors("sferik/rails_admin", true)
286
- expect(contributors).to be_kind_of Array
287
- assert_requested :get, github_url("/repos/sferik/rails_admin/contributors?anon=1")
288
- end
289
- it "returns repository contributors excluding anonymous" do
290
- contributors = Octokit.contributors("sferik/rails_admin")
291
- expect(contributors).to be_kind_of Array
292
- assert_requested :get, github_url("/repos/sferik/rails_admin/contributors")
293
- end
294
- end # .contributors
295
-
296
- describe ".stargazers", :vcr do
297
- it "returns all repository stargazers" do
298
- stargazers = Octokit.stargazers("sferik/rails_admin")
299
- expect(stargazers).to be_kind_of Array
300
- assert_requested :get, github_url("/repos/sferik/rails_admin/stargazers")
301
- end
302
- end # .stargazers
303
-
304
- describe ".watchers", :vcr do
305
- it "returns all repository watchers" do
306
- watchers = Octokit.watchers("sferik/rails_admin")
307
- expect(watchers).to be_kind_of Array
308
- assert_requested :get, github_url("/repos/sferik/rails_admin/watchers")
309
- end
310
- end # .watchers
311
-
312
- describe ".network", :vcr do
313
- it "returns a repository's network" do
314
- network = Octokit.network("sferik/rails_admin")
315
- expect(network).to be_kind_of Array
316
- assert_requested :get, github_url("/repos/sferik/rails_admin/forks")
317
- end
318
- end # .network
319
-
320
- describe ".languages", :vcr do
321
- it "returns a repository's languages" do
322
- languages = Octokit.languages("sferik/rails_admin")
323
- expect(languages[:Ruby]).to_not be_nil
324
- assert_requested :get, github_url("/repos/sferik/rails_admin/languages")
325
- end
326
- end # .languages
327
-
328
- describe ".tags", :vcr do
329
- it "returns a repository's tags" do
330
- tags = Octokit.tags("octokit/octokit.rb")
331
- expect(tags).to be_kind_of Array
332
- assert_requested :get, github_url("/repos/octokit/octokit.rb/tags")
333
- end
334
- end # .tags
335
-
336
- describe ".branches", :vcr do
337
- it "returns a repository's branches" do
338
- branches = Octokit.branches("octokit/octokit.rb")
339
- expect(branches).to be_kind_of Array
340
- assert_requested :get, github_url("/repos/octokit/octokit.rb/branches")
341
- end
342
- it "returns a single branch" do
343
- branch = Octokit.branch("octokit/octokit.rb", "master")
344
- expect(branch.commit.sha).to_not be_nil
345
- assert_requested :get, github_url("/repos/octokit/octokit.rb/branches/master")
346
- end
347
- end # .branches
348
-
349
- describe ".assignees", :vcr do
350
- it "lists all the available assignees (owner + collaborators)" do
351
- assignees = Octokit.repo_assignees("octokit/octokit.rb")
352
- expect(assignees).to be_kind_of Array
353
- assert_requested :get, github_url("/repos/octokit/octokit.rb/assignees")
354
- end
355
- end # .assignees
356
-
357
- describe ".check_assignee", :vcr do
358
- it "checks to see if a particular user is an assignee for a repository" do
359
- is_assignee = Octokit.check_assignee("octokit/octokit.rb", 'andrew')
360
- assert_requested :get, github_url("/repos/octokit/octokit.rb/assignees/andrew")
361
- end
362
- end # .check_assignee
363
-
364
- describe ".subscribers", :vcr do
365
- it "lists all the users watching the repository" do
366
- subscribers = Octokit.subscribers("octokit/octokit.rb")
367
- expect(subscribers).to be_kind_of Array
368
- assert_requested :get, github_url("/repos/octokit/octokit.rb/subscribers")
369
- end
370
- end # .subscribers
371
-
372
- describe ".update_subscription", :vcr do
373
- it "updates a repository subscription" do
374
- subscription = @client.update_subscription("octokit/octokit.rb", :subscribed => false)
375
- assert_requested :put, github_url("/repos/octokit/octokit.rb/subscription")
376
- end
377
- end # .update_subscription
378
-
379
- describe ".subscription", :vcr do
380
- it "returns a repository subscription" do
381
- subscription = @client.subscription("octokit/octokit.rb")
382
- assert_requested :get, github_url("/repos/octokit/octokit.rb/subscription")
383
- end
384
- end # .subscription
385
-
386
- describe ".delete_subscription", :vcr do
387
- it "returns true when repo subscription deleted" do
388
- result = @client.delete_subscription("octokit/octokit.rb")
389
- assert_requested :delete, github_url("/repos/octokit/octokit.rb/subscription")
390
- end
391
- end # .delete_subscription
392
-
393
- describe ".repository?", :vcr do
394
- it "returns true if the repository exists" do
395
- result = @client.repository?("sferik/rails_admin")
396
- expect(result).to be_true
397
- assert_requested :get, github_url("/repos/sferik/rails_admin")
398
- end
399
- it "returns false if the repository doesn't exist" do
400
- result = @client.repository?("pengwynn/octokit")
401
- expect(result).to be_false
402
- assert_requested :get, github_url("/repos/pengwynn/octokit")
403
- end
404
- end # .repository?
405
-
406
- end