octokit 2.3.0 → 2.3.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/octokit/version.rb +1 -1
- data/octokit.gemspec +0 -1
- metadata +5 -682
- data/spec/cassettes/Octokit_Client/_get/handles_query_params.json +0 -1
- data/spec/cassettes/Octokit_Client/_head/handles_query_params.json +0 -1
- data/spec/cassettes/Octokit_Client/_last_response/caches_the_last_agent_response.json +0 -1
- data/spec/cassettes/Octokit_Client/authentication/when_token_authenticated/fetches_and_memoizes_login.json +0 -1
- data/spec/cassettes/Octokit_Client/auto_pagination/fetches_all_the_pages.json +0 -1
- data/spec/cassettes/Octokit_Client/error_handling/raises_on_404.json +0 -1
- data/spec/cassettes/Octokit_Client_Authorizations/_authorization/returns_a_single_authorization.json +0 -1
- data/spec/cassettes/Octokit_Client_Authorizations/_authorizations/lists_existing_authorizations.json +0 -1
- data/spec/cassettes/Octokit_Client_Authorizations/_create_authorization/with_idempotent_true/creates_a_new_authorization_with_options.json +0 -1
- data/spec/cassettes/Octokit_Client_Authorizations/_create_authorization/with_idempotent_true/returns_an_existing_API_authorization_if_one_already_exists.json +0 -1
- data/spec/cassettes/Octokit_Client_Authorizations/_create_authorization/without_idempotent_true/creates_a_new_API_authorization_each_time.json +0 -1
- data/spec/cassettes/Octokit_Client_Authorizations/_create_authorization/without_idempotent_true/creates_a_new_authorization_with_options.json +0 -1
- data/spec/cassettes/Octokit_Client_Authorizations/_create_authorization/without_idempotent_true/creates_an_API_authorization.json +0 -1
- data/spec/cassettes/Octokit_Client_Authorizations/_scopes/checks_the_scopes_on_a_one-off_token.json +0 -1
- data/spec/cassettes/Octokit_Client_Authorizations/_scopes/checks_the_scopes_on_the_current_token.json +0 -1
- data/spec/cassettes/Octokit_Client_Authorizations/_update_authorization/updates_and_existing_authorization.json +0 -1
- data/spec/cassettes/Octokit_Client_CommitComments/_commit_comment/returns_a_single_commit_comment.json +0 -1
- data/spec/cassettes/Octokit_Client_CommitComments/_commit_comments/returns_a_list_of_comments_for_a_specific_commit.json +0 -1
- data/spec/cassettes/Octokit_Client_CommitComments/_create_commit_comment/creates_a_commit_comment.json +0 -1
- data/spec/cassettes/Octokit_Client_CommitComments/_delete_commit_comment/deletes_a_commit_comment.json +0 -1
- data/spec/cassettes/Octokit_Client_CommitComments/_list_commit_comments/returns_a_list_of_all_commit_comments.json +0 -1
- data/spec/cassettes/Octokit_Client_CommitComments/_update_commit_comment/updates_a_commit_comment.json +0 -1
- data/spec/cassettes/Octokit_Client_Commits/_commit/returns_a_commit.json +0 -1
- data/spec/cassettes/Octokit_Client_Commits/_commits/handles_branch_or_sha_argument.json +0 -1
- data/spec/cassettes/Octokit_Client_Commits/_commits/handles_the_sha_option.json +0 -1
- data/spec/cassettes/Octokit_Client_Commits/_commits/returns_all_commits.json +0 -1
- data/spec/cassettes/Octokit_Client_Commits/_commits_before/handles_branch_or_sha_argument.json +0 -1
- data/spec/cassettes/Octokit_Client_Commits/_commits_before/handles_the_sha_option.json +0 -1
- data/spec/cassettes/Octokit_Client_Commits/_commits_before/returns_all_commits_until_the_specified_date.json +0 -1
- data/spec/cassettes/Octokit_Client_Commits/_commits_between/handles_branch_or_sha_argument.json +0 -1
- data/spec/cassettes/Octokit_Client_Commits/_commits_between/handles_the_sha_option.json +0 -1
- data/spec/cassettes/Octokit_Client_Commits/_commits_between/returns_all_commits_until_the_specified_date.json +0 -1
- data/spec/cassettes/Octokit_Client_Commits/_commits_on/handles_branch_or_sha_argument.json +0 -1
- data/spec/cassettes/Octokit_Client_Commits/_commits_on/handles_the_sha_option.json +0 -1
- data/spec/cassettes/Octokit_Client_Commits/_commits_on/returns_all_commits_on_the_specified_date.json +0 -1
- data/spec/cassettes/Octokit_Client_Commits/_commits_since/handles_branch_or_sha_argument.json +0 -1
- data/spec/cassettes/Octokit_Client_Commits/_commits_since/handles_the_sha_option.json +0 -1
- data/spec/cassettes/Octokit_Client_Commits/_commits_since/returns_all_commits_since_the_specified_date.json +0 -1
- data/spec/cassettes/Octokit_Client_Commits/_compare/returns_a_comparison.json +0 -1
- data/spec/cassettes/Octokit_Client_Commits/_create_commit/creates_a_commit.json +0 -1
- data/spec/cassettes/Octokit_Client_Commits/_merge/merges_a_branch_into_another.json +0 -1
- data/spec/cassettes/Octokit_Client_Contents/_archive_link/returns_the_headers_of_the_request.json +0 -1
- data/spec/cassettes/Octokit_Client_Contents/_contents/returns_the_contents_of_a_file.json +0 -1
- data/spec/cassettes/Octokit_Client_Contents/_create_contents/creates_contents_from_File_object.json +0 -1
- data/spec/cassettes/Octokit_Client_Contents/_create_contents/creates_contents_from_file_path.json +0 -1
- data/spec/cassettes/Octokit_Client_Contents/_create_contents/creates_repository_contents_at_a_path.json +0 -1
- data/spec/cassettes/Octokit_Client_Contents/_create_contents/does_not_add_new_lines.json +0 -1
- data/spec/cassettes/Octokit_Client_Contents/_delete_contents/deletes_repository_contents_at_a_path.json +0 -1
- data/spec/cassettes/Octokit_Client_Contents/_readme/returns_the_default_readme.json +0 -1
- data/spec/cassettes/Octokit_Client_Contents/_update_contents/does_not_add_new_lines.json +0 -1
- data/spec/cassettes/Octokit_Client_Contents/_update_contents/updates_repository_contents_at_a_path.json +0 -1
- data/spec/cassettes/Octokit_Client_Downloads/_download/gets_a_single_download.json +0 -1
- data/spec/cassettes/Octokit_Client_Downloads/_downloads/lists_available_downloads.json +0 -1
- data/spec/cassettes/Octokit_Client_Downloads/methods_that_require_a_download/_create_download/creates_a_download_resource.json +0 -1
- data/spec/cassettes/Octokit_Client_Downloads/methods_that_require_a_download/_create_download/posts_to_an_S3_url.json +0 -1
- data/spec/cassettes/Octokit_Client_Downloads/methods_that_require_a_download/_delete_download/deletes_a_download.json +0 -1
- data/spec/cassettes/Octokit_Client_Emojis/_emojis/returns_all_github_emojis.json +0 -1
- data/spec/cassettes/Octokit_Client_Events/_issue_event/lists_issue_events_for_a_repository.json +0 -1
- data/spec/cassettes/Octokit_Client_Events/_issue_events/lists_issue_events_for_a_repository.json +0 -1
- data/spec/cassettes/Octokit_Client_Events/_organization_events/returns_all_events_for_an_organization.json +0 -1
- data/spec/cassettes/Octokit_Client_Events/_organization_public_events/returns_an_organization_s_public_events.json +0 -1
- data/spec/cassettes/Octokit_Client_Events/_public_events/returns_all_public_events.json +0 -1
- data/spec/cassettes/Octokit_Client_Events/_received_events/returns_all_user_received_events.json +0 -1
- data/spec/cassettes/Octokit_Client_Events/_received_public_events/returns_public_user_received_events.json +0 -1
- data/spec/cassettes/Octokit_Client_Events/_repo_issue_events/lists_issue_events_for_a_repository.json +0 -1
- data/spec/cassettes/Octokit_Client_Events/_repository_events/returns_events_for_a_repository.json +0 -1
- data/spec/cassettes/Octokit_Client_Events/_repository_network_events/returns_events_for_a_repository_s_network.json +0 -1
- data/spec/cassettes/Octokit_Client_Events/_user_events/returns_all_user_events.json +0 -1
- data/spec/cassettes/Octokit_Client_Events/_user_public_events/returns_public_events_performed_by_a_user.json +0 -1
- data/spec/cassettes/Octokit_Client_Gists/unauthenticated/_gist/returns_the_gist_by_ID.json +0 -1
- data/spec/cassettes/Octokit_Client_Gists/unauthenticated/_gists/with_username_passed/returns_a_list_of_gists.json +0 -1
- data/spec/cassettes/Octokit_Client_Gists/unauthenticated/_gists/without_a_username_passed/returns_a_list_of_gists.json +0 -1
- data/spec/cassettes/Octokit_Client_Gists/unauthenticated/_public_gists/returns_public_gists.json +0 -1
- data/spec/cassettes/Octokit_Client_Gists/when_authenticated/_create_gist/creates_a_new_gist.json +0 -1
- data/spec/cassettes/Octokit_Client_Gists/when_authenticated/_create_gist_comment/creates_a_gist_comment.json +0 -1
- data/spec/cassettes/Octokit_Client_Gists/when_authenticated/_delete_gist/deletes_an_existing_gist.json +0 -1
- data/spec/cassettes/Octokit_Client_Gists/when_authenticated/_delete_gist_comment/deletes_a_gist_comment.json +0 -1
- data/spec/cassettes/Octokit_Client_Gists/when_authenticated/_edit_gist/edit_an_existing_gist.json +0 -1
- data/spec/cassettes/Octokit_Client_Gists/when_authenticated/_fork_gist/forks_an_existing_gist.json +0 -1
- data/spec/cassettes/Octokit_Client_Gists/when_authenticated/_gist_comment/returns_a_gist_comment.json +0 -1
- data/spec/cassettes/Octokit_Client_Gists/when_authenticated/_gist_comments/returns_the_list_of_gist_comments.json +0 -1
- data/spec/cassettes/Octokit_Client_Gists/when_authenticated/_gist_starred_/is_not_starred.json +0 -1
- data/spec/cassettes/Octokit_Client_Gists/when_authenticated/_gist_starred_/is_starred.json +0 -1
- data/spec/cassettes/Octokit_Client_Gists/when_authenticated/_gists/returns_a_list_of_gists.json +0 -1
- data/spec/cassettes/Octokit_Client_Gists/when_authenticated/_star_gist/stars_an_existing_gist.json +0 -1
- data/spec/cassettes/Octokit_Client_Gists/when_authenticated/_starred_gists/returns_the_user_s_starred_gists.json +0 -1
- data/spec/cassettes/Octokit_Client_Gists/when_authenticated/_unstar_gist/unstars_an_existing_gist.json +0 -1
- data/spec/cassettes/Octokit_Client_Gists/when_authenticated/_update_gist_comment/updates_a_gist_comment.json +0 -1
- data/spec/cassettes/Octokit_Client_Gitignore/_gitignore_template/returns_the_ruby_gitignore_template.json +0 -1
- data/spec/cassettes/Octokit_Client_Gitignore/_gitignore_templates/returns_all_gitignore_templates.json +0 -1
- data/spec/cassettes/Octokit_Client_Issues/_create_issue/creates_an_issue.json +0 -1
- data/spec/cassettes/Octokit_Client_Issues/_create_issue/creates_an_issue_with_delimited_labels.json +0 -1
- data/spec/cassettes/Octokit_Client_Issues/_create_issue/creates_an_issue_with_labels_array.json +0 -1
- data/spec/cassettes/Octokit_Client_Issues/_issue_comment/returns_a_single_comment_for_an_issue.json +0 -1
- data/spec/cassettes/Octokit_Client_Issues/_issue_comments/returns_comments_for_an_issue.json +0 -1
- data/spec/cassettes/Octokit_Client_Issues/_list_issues/returns_dashboard_issues_for_the_authenticated_user.json +0 -1
- data/spec/cassettes/Octokit_Client_Issues/_list_issues/returns_issues_for_a_repository.json +0 -1
- data/spec/cassettes/Octokit_Client_Issues/_org_issues/returns_issues_for_the_organization_for_the_authenticated_user.json +0 -1
- data/spec/cassettes/Octokit_Client_Issues/_repository_issues_comments/returns_comments_for_all_issues_in_a_repository.json +0 -1
- data/spec/cassettes/Octokit_Client_Issues/_user_issues/returns_issues_for_the_authenticated_user_for_owned_and_member_repos.json +0 -1
- data/spec/cassettes/Octokit_Client_Issues/methods_requiring_a_new_issue/_add_comment/adds_a_comment.json +0 -1
- data/spec/cassettes/Octokit_Client_Issues/methods_requiring_a_new_issue/_close_issue/closes_an_issue.json +0 -1
- data/spec/cassettes/Octokit_Client_Issues/methods_requiring_a_new_issue/_issue/returns_a_full_issue.json +0 -1
- data/spec/cassettes/Octokit_Client_Issues/methods_requiring_a_new_issue/_issue/returns_an_issue.json +0 -1
- data/spec/cassettes/Octokit_Client_Issues/methods_requiring_a_new_issue/_reopen_issue/reopens_an_issue.json +0 -1
- data/spec/cassettes/Octokit_Client_Issues/methods_requiring_a_new_issue/_update_issue/updates_an_issue.json +0 -1
- 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
- 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
- data/spec/cassettes/Octokit_Client_Labels/_add_label/adds_a_label_with_a_color.json +0 -1
- data/spec/cassettes/Octokit_Client_Labels/_add_label/adds_a_label_with_default_color.json +0 -1
- data/spec/cassettes/Octokit_Client_Labels/_delete_label_/deletes_a_label_from_the_repository.json +0 -1
- data/spec/cassettes/Octokit_Client_Labels/_label/returns_a_single_label.json +0 -1
- data/spec/cassettes/Octokit_Client_Labels/_labels/returns_labels.json +0 -1
- data/spec/cassettes/Octokit_Client_Labels/_lables_for_milestone/returns_all_labels_for_a_repository.json +0 -1
- 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
- data/spec/cassettes/Octokit_Client_Labels/methods_requiring_a_new_issue/_labels_for_issue/returns_all_labels_for_a_given_issue.json +0 -1
- data/spec/cassettes/Octokit_Client_Labels/methods_requiring_a_new_issue/_remove_all_labels/removes_all_labels_from_the_specified_issue.json +0 -1
- data/spec/cassettes/Octokit_Client_Labels/methods_requiring_a_new_issue/_remove_label/removes_a_label_from_the_specified_issue.json +0 -1
- data/spec/cassettes/Octokit_Client_Labels/methods_requiring_a_new_issue/_replace_all_labels/replaces_all_labels_for_an_issue.json +0 -1
- data/spec/cassettes/Octokit_Client_Labels/methods_requiring_a_new_label/_update_label/updates_a_label_with_a_new_color.json +0 -1
- data/spec/cassettes/Octokit_Client_LegacySearch/_legacy_search_issues/returns_matching_issues.json +0 -1
- data/spec/cassettes/Octokit_Client_LegacySearch/_legacy_search_repos/returns_matching_repositories.json +0 -1
- data/spec/cassettes/Octokit_Client_LegacySearch/_legacy_search_users/returns_matching_username.json +0 -1
- data/spec/cassettes/Octokit_Client_Markdown/_markdown/renders_markdown.json +0 -1
- data/spec/cassettes/Octokit_Client_Meta/_github_meta/returns_meta_information_about_github.json +0 -1
- data/spec/cassettes/Octokit_Client_Milestones/_list_milestones/lists_milestones_belonging_to_repository.json +0 -1
- data/spec/cassettes/Octokit_Client_Milestones/methods_that_need_a_milestone/_create_milestone/creates_a_milestone.json +0 -1
- data/spec/cassettes/Octokit_Client_Milestones/methods_that_need_a_milestone/_delete_milestone/deletes_a_milestone_from_a_repository.json +0 -1
- data/spec/cassettes/Octokit_Client_Milestones/methods_that_need_a_milestone/_milestone/gets_a_single_milestone_belonging_to_repository.json +0 -1
- data/spec/cassettes/Octokit_Client_Milestones/methods_that_need_a_milestone/_update_milestone/updates_a_milestone.json +0 -1
- data/spec/cassettes/Octokit_Client_Notifications/_mark_notifications_as_read/returns_true_when_notifications_are_marked_as_read.json +0 -1
- 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
- data/spec/cassettes/Octokit_Client_Notifications/_notifications/lists_the_notifications_for_the_current_user.json +0 -1
- data/spec/cassettes/Octokit_Client_Notifications/_repository_notifications/lists_all_notifications_for_a_repository.json +0 -1
- data/spec/cassettes/Octokit_Client_Notifications/methods_that_need_a_thread_context/_delete_thread_subscription/returns_true_with_successful_thread_deletion.json +0 -1
- data/spec/cassettes/Octokit_Client_Notifications/methods_that_need_a_thread_context/_mark_thread_as_read/marks_a_thread_as_read.json +0 -1
- data/spec/cassettes/Octokit_Client_Notifications/methods_that_need_a_thread_context/_thread_notifications/returns_notifications_for_a_specific_thread.json +0 -1
- data/spec/cassettes/Octokit_Client_Notifications/methods_that_need_a_thread_context/_thread_subscription/returns_a_thread_subscription.json +0 -1
- data/spec/cassettes/Octokit_Client_Notifications/methods_that_need_a_thread_context/_update_thread_subscription/updates_a_thread_subscription.json +0 -1
- data/spec/cassettes/Octokit_Client_Objects/_blob/returns_a_blob.json +0 -1
- data/spec/cassettes/Octokit_Client_Objects/_create_blob/creates_a_blob.json +0 -1
- data/spec/cassettes/Octokit_Client_Objects/_create_tag/creates_a_tag.json +0 -1
- data/spec/cassettes/Octokit_Client_Objects/_create_tree/creates_a_tree.json +0 -1
- data/spec/cassettes/Octokit_Client_Objects/_tag/returns_a_tag.json +0 -1
- data/spec/cassettes/Octokit_Client_Objects/_tree/gets_a_tree.json +0 -1
- data/spec/cassettes/Octokit_Client_Objects/_tree/gets_a_tree_recursively.json +0 -1
- data/spec/cassettes/Octokit_Client_Organizations/_organization/returns_an_organization.json +0 -1
- data/spec/cassettes/Octokit_Client_Organizations/_organization_member_/checks_organization_membership.json +0 -1
- data/spec/cassettes/Octokit_Client_Organizations/_organization_members/returns_all_public_members_of_an_organization.json +0 -1
- data/spec/cassettes/Octokit_Client_Organizations/_organization_public_member_/checks_publicized_org_membership.json +0 -1
- data/spec/cassettes/Octokit_Client_Organizations/_organization_repositories/returns_all_public_repositories_for_an_organization.json +0 -1
- data/spec/cassettes/Octokit_Client_Organizations/_organization_teams/returns_all_teams_for_an_organization.json +0 -1
- data/spec/cassettes/Octokit_Client_Organizations/_organizations/returns_all_organizations_for_a_user.json +0 -1
- data/spec/cassettes/Octokit_Client_Organizations/_organizations/returns_all_organizations_for_the_authenticated_user.json +0 -1
- data/spec/cassettes/Octokit_Client_Organizations/_update_organization/updates_an_organization.json +0 -1
- data/spec/cassettes/Octokit_Client_Organizations/methods_that_require_a_new_team/_add_team_member/adds_a_team_member.json +0 -1
- data/spec/cassettes/Octokit_Client_Organizations/methods_that_require_a_new_team/_add_team_repository/adds_a_team_repository.json +0 -1
- data/spec/cassettes/Octokit_Client_Organizations/methods_that_require_a_new_team/_create_team/creates_a_team.json +0 -1
- data/spec/cassettes/Octokit_Client_Organizations/methods_that_require_a_new_team/_delete_team/deletes_a_team.json +0 -1
- data/spec/cassettes/Octokit_Client_Organizations/methods_that_require_a_new_team/_publicize_membership/publicizes_membership.json +0 -1
- data/spec/cassettes/Octokit_Client_Organizations/methods_that_require_a_new_team/_remove_team_member/removes_a_team_member.json +0 -1
- data/spec/cassettes/Octokit_Client_Organizations/methods_that_require_a_new_team/_remove_team_repository/removes_a_team_repository.json +0 -1
- data/spec/cassettes/Octokit_Client_Organizations/methods_that_require_a_new_team/_team/returns_a_team.json +0 -1
- 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
- data/spec/cassettes/Octokit_Client_Organizations/methods_that_require_a_new_team/_team_members/returns_team_members.json +0 -1
- data/spec/cassettes/Octokit_Client_Organizations/methods_that_require_a_new_team/_team_repositories/returns_team_repositories.json +0 -1
- data/spec/cassettes/Octokit_Client_Organizations/methods_that_require_a_new_team/_unpublicize_membership/unpublicizes_membership.json +0 -1
- data/spec/cassettes/Octokit_Client_Organizations/methods_that_require_a_new_team/_update_team/updates_a_team.json +0 -1
- data/spec/cassettes/Octokit_Client_PubSubHubbub/_subscribe/raises_an_error_when_topic_is_not_recognized.json +0 -1
- data/spec/cassettes/Octokit_Client_PubSubHubbub/_subscribe/subscribes_to_pull_events.json +0 -1
- data/spec/cassettes/Octokit_Client_PubSubHubbub/_subscribe_service_hook/subscribes_to_pull_events_on_specified_topic.json +0 -1
- data/spec/cassettes/Octokit_Client_PubSubHubbub/_unsubscribe/unsubscribes_from_pull_events.json +0 -1
- data/spec/cassettes/Octokit_Client_PubSubHubbub/unsubscribe_service_hook/unsubscribes_to_stop_receiving_events_on_specified_topic.json +0 -1
- 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
- data/spec/cassettes/Octokit_Client_PullRequests/_pull_request_comment/returns_a_comment_on_a_pull_request.json +0 -1
- data/spec/cassettes/Octokit_Client_PullRequests/_pull_request_comments/returns_the_comments_for_a_pull_request.json +0 -1
- data/spec/cassettes/Octokit_Client_PullRequests/_pull_request_commits/returns_the_commits_for_a_pull_request.json +0 -1
- data/spec/cassettes/Octokit_Client_PullRequests/_pull_request_files/lists_files_for_a_pull_request.json +0 -1
- data/spec/cassettes/Octokit_Client_PullRequests/_pull_requests/returns_all_pull_requests.json +0 -1
- data/spec/cassettes/Octokit_Client_PullRequests/_pull_requests_comments/returns_all_comments_on_all_pull_requests.json +0 -1
- data/spec/cassettes/Octokit_Client_PullRequests/methods_that_require_a_new_pull/_close_pull_request/closes_a_pull_request.json +0 -1
- data/spec/cassettes/Octokit_Client_PullRequests/methods_that_require_a_new_pull/_create_pull_request/creates_a_pull_request.json +0 -1
- data/spec/cassettes/Octokit_Client_PullRequests/methods_that_require_a_new_pull/_merge_pull_request/merges_the_pull_request.json +0 -1
- 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
- data/spec/cassettes/Octokit_Client_PullRequests/methods_that_require_a_new_pull/_pull_request/returns_a_pull_request.json +0 -1
- data/spec/cassettes/Octokit_Client_PullRequests/methods_that_require_a_new_pull/_update_pull_request/updates_a_pull_request.json +0 -1
- 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
- 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
- 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
- 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
- data/spec/cassettes/Octokit_Client_Refs/_ref/returns_a_tags_ref.json +0 -1
- data/spec/cassettes/Octokit_Client_Refs/_refs/returns_all_refs.json +0 -1
- data/spec/cassettes/Octokit_Client_Refs/_refs/returns_all_tag_refs.json +0 -1
- data/spec/cassettes/Octokit_Client_Refs/methods_that_require_a_ref/_create_ref/creates_a_ref.json +0 -1
- data/spec/cassettes/Octokit_Client_Refs/methods_that_require_a_ref/_delete_ref/deletes_an_existing_ref.json +0 -1
- data/spec/cassettes/Octokit_Client_Refs/methods_that_require_a_ref/_update_ref/updates_a_ref.json +0 -1
- data/spec/cassettes/Octokit_Client_Releases/_create_release/creates_a_release.json +0 -1
- data/spec/cassettes/Octokit_Client_Releases/_delete_release/deletes_a_release.json +0 -1
- data/spec/cassettes/Octokit_Client_Releases/_release/gets_a_single_release.json +0 -1
- data/spec/cassettes/Octokit_Client_Releases/_release_assets/lists_assets_for_a_release.json +0 -1
- data/spec/cassettes/Octokit_Client_Releases/_releases/lists_releases_for_a_repo.json +0 -1
- data/spec/cassettes/Octokit_Client_Releases/_update_release/updates_a_release.json +0 -1
- data/spec/cassettes/Octokit_Client_Releases/handling_release_assets/_release_assets/lists_assets_for_a_release.json +0 -1
- data/spec/cassettes/Octokit_Client_Releases/handling_release_assets/_update_release_asset/edits_a_release_asset.json +0 -1
- data/spec/cassettes/Octokit_Client_Releases/handling_release_assets/_upload_release_asset/guesses_the_content_type_for_an_asset.json +0 -1
- data/spec/cassettes/Octokit_Client_Releases/handling_release_assets/_upload_release_asset/uploads_a_release_asset_as_file_object.json +0 -1
- data/spec/cassettes/Octokit_Client_Releases/handling_release_assets/_upload_release_asset/uploads_a_release_asset_by_path.json +0 -1
- data/spec/cassettes/Octokit_Client_Releases/handling_release_assets/_upload_release_asset/uploads_a_release_asset_with_a_default_name.json +0 -1
- data/spec/cassettes/Octokit_Client_Repositories/_all_repositories/returns_all_repositories_on_github.json +0 -1
- data/spec/cassettes/Octokit_Client_Repositories/_assignees/lists_all_the_available_assignees_owner_collaborators_.json +0 -1
- data/spec/cassettes/Octokit_Client_Repositories/_branches/returns_a_repository_s_branches.json +0 -1
- data/spec/cassettes/Octokit_Client_Repositories/_branches/returns_a_single_branch.json +0 -1
- data/spec/cassettes/Octokit_Client_Repositories/_check_assignee/checks_to_see_if_a_particular_user_is_an_assignee_for_a_repository.json +0 -1
- data/spec/cassettes/Octokit_Client_Repositories/_collaborators/returns_a_repository_s_collaborators.json +0 -1
- data/spec/cassettes/Octokit_Client_Repositories/_contributors/returns_repository_contributors.json +0 -1
- data/spec/cassettes/Octokit_Client_Repositories/_contributors/returns_repository_contributors_excluding_anonymous.json +0 -1
- data/spec/cassettes/Octokit_Client_Repositories/_create_repository/creates_a_repository_for_an_organization.json +0 -1
- data/spec/cassettes/Octokit_Client_Repositories/_delete_subscription/returns_true_when_repo_subscription_deleted.json +0 -1
- data/spec/cassettes/Octokit_Client_Repositories/_fork/forks_a_repository.json +0 -1
- data/spec/cassettes/Octokit_Client_Repositories/_languages/returns_a_repository_s_languages.json +0 -1
- data/spec/cassettes/Octokit_Client_Repositories/_network/returns_a_repository_s_network.json +0 -1
- data/spec/cassettes/Octokit_Client_Repositories/_repositories/returns_a_user_s_repositories.json +0 -1
- data/spec/cassettes/Octokit_Client_Repositories/_repositories/returns_authenticated_user_s_repositories.json +0 -1
- data/spec/cassettes/Octokit_Client_Repositories/_repository/returns_the_matching_repository.json +0 -1
- data/spec/cassettes/Octokit_Client_Repositories/_repository_/returns_false_if_the_repository_doesn_t_exist.json +0 -1
- data/spec/cassettes/Octokit_Client_Repositories/_repository_/returns_true_if_the_repository_exists.json +0 -1
- data/spec/cassettes/Octokit_Client_Repositories/_star/stars_a_repository.json +0 -1
- data/spec/cassettes/Octokit_Client_Repositories/_stargazers/returns_all_repository_stargazers.json +0 -1
- data/spec/cassettes/Octokit_Client_Repositories/_subscribers/lists_all_the_users_watching_the_repository.json +0 -1
- data/spec/cassettes/Octokit_Client_Repositories/_subscription/returns_a_repository_subscription.json +0 -1
- data/spec/cassettes/Octokit_Client_Repositories/_tags/returns_a_repository_s_tags.json +0 -1
- data/spec/cassettes/Octokit_Client_Repositories/_unstar/unstars_a_repository.json +0 -1
- data/spec/cassettes/Octokit_Client_Repositories/_unwatch/unwatches_a_repository.json +0 -1
- data/spec/cassettes/Octokit_Client_Repositories/_update_subscription/updates_a_repository_subscription.json +0 -1
- data/spec/cassettes/Octokit_Client_Repositories/_watch/watches_a_repository.json +0 -1
- data/spec/cassettes/Octokit_Client_Repositories/_watchers/returns_all_repository_watchers.json +0 -1
- data/spec/cassettes/Octokit_Client_Repositories/methods_that_require_a_new_repo/_add_collaborator/adds_a_repository_collaborators.json +0 -1
- data/spec/cassettes/Octokit_Client_Repositories/methods_that_require_a_new_repo/_create_repository/creates_a_repository.json +0 -1
- data/spec/cassettes/Octokit_Client_Repositories/methods_that_require_a_new_repo/_delete_repository/deletes_a_repository.json +0 -1
- data/spec/cassettes/Octokit_Client_Repositories/methods_that_require_a_new_repo/_deploy_keys/returns_a_repository_s_deploy_keys.json +0 -1
- data/spec/cassettes/Octokit_Client_Repositories/methods_that_require_a_new_repo/_hooks/returns_a_repository_s_hooks.json +0 -1
- data/spec/cassettes/Octokit_Client_Repositories/methods_that_require_a_new_repo/_remove_collaborator/removes_a_repository_collaborators.json +0 -1
- data/spec/cassettes/Octokit_Client_Repositories/methods_that_require_a_new_repo/_repository_teams/returns_all_repository_teams.json +0 -1
- data/spec/cassettes/Octokit_Client_Repositories/methods_that_require_a_new_repo/_update_repository/updates_the_matching_repository.json +0 -1
- 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
- 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
- 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
- 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
- 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
- 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
- data/spec/cassettes/Octokit_Client_Say/_say/returns_an_ASCII_octocat.json +0 -1
- data/spec/cassettes/Octokit_Client_Say/_say/returns_an_ASCII_octocat_with_custom_text.json +0 -1
- data/spec/cassettes/Octokit_Client_Search/_search_code/searches_code.json +0 -1
- data/spec/cassettes/Octokit_Client_Search/_search_issues/searches_issues.json +0 -1
- data/spec/cassettes/Octokit_Client_Search/_search_repositories/searches_repositories.json +0 -1
- data/spec/cassettes/Octokit_Client_Search/_search_users/searches_users.json +0 -1
- data/spec/cassettes/Octokit_Client_ServiceStatus/_github_status/returns_the_current_system_status.json +0 -1
- data/spec/cassettes/Octokit_Client_ServiceStatus/_github_status/returns_the_most_recent_status_messages.json +0 -1
- data/spec/cassettes/Octokit_Client_ServiceStatus/_github_status_last_message/returns_the_last_human_message.json +0 -1
- data/spec/cassettes/Octokit_Client_Stats/_code_frequency_stats/returns_the_code_frequency_stats.json +0 -1
- data/spec/cassettes/Octokit_Client_Stats/_commit_activity_stats/returns_the_commit_activity_stats.json +0 -1
- data/spec/cassettes/Octokit_Client_Stats/_contributors_stats/returns_contributors_and_their_contribution_stats.json +0 -1
- data/spec/cassettes/Octokit_Client_Stats/_participation_stats/returns_the_owner_and_contributor_participation_stats.json +0 -1
- data/spec/cassettes/Octokit_Client_Stats/_punch_card_stats/returns_commit_count_by_hour_punch_card_stats.json +0 -1
- data/spec/cassettes/Octokit_Client_Statuses/_create_status/creates_status.json +0 -1
- data/spec/cassettes/Octokit_Client_Statuses/_statuses/lists_commit_statuses.json +0 -1
- data/spec/cassettes/Octokit_Client_Users/_add_email/adds_an_email_address.json +0 -1
- data/spec/cassettes/Octokit_Client_Users/_all_users/returns_all_GitHub_users.json +0 -1
- data/spec/cassettes/Octokit_Client_Users/_emails/returns_email_addresses.json +0 -1
- data/spec/cassettes/Octokit_Client_Users/_follow/follows_a_user.json +0 -1
- data/spec/cassettes/Octokit_Client_Users/_followers/returns_followers_for_a_user.json +0 -1
- data/spec/cassettes/Octokit_Client_Users/_followers/returns_the_authenticated_user_s_followers.json +0 -1
- data/spec/cassettes/Octokit_Client_Users/_following/returns_following_for_a_user.json +0 -1
- data/spec/cassettes/Octokit_Client_Users/_following/returns_the_authenticated_user_s_following.json +0 -1
- data/spec/cassettes/Octokit_Client_Users/_follows_/checks_if_given_user_is_following_target_user.json +0 -1
- data/spec/cassettes/Octokit_Client_Users/_follows_/checks_if_the_authenticated_user_follows_another.json +0 -1
- data/spec/cassettes/Octokit_Client_Users/_keys/returns_public_keys_for_the_authenticated_user.json +0 -1
- data/spec/cassettes/Octokit_Client_Users/_remove_email/removes_an_email_address.json +0 -1
- data/spec/cassettes/Octokit_Client_Users/_starred/returns_starred_repositories_for_a_user.json +0 -1
- data/spec/cassettes/Octokit_Client_Users/_starred/returns_starred_repositories_for_the_authenticated_user.json +0 -1
- data/spec/cassettes/Octokit_Client_Users/_starred_/checks_if_the_authenticated_user_has_starred_a_repository.json +0 -1
- data/spec/cassettes/Octokit_Client_Users/_starred_/checks_if_the_authenticated_user_has_starred_a_repository_deprecated_.json +0 -1
- data/spec/cassettes/Octokit_Client_Users/_subscriptions/returns_the_repositories_a_user_watches_for_notifications.json +0 -1
- data/spec/cassettes/Octokit_Client_Users/_subscriptions/returns_the_repositories_the_authenticated_user_watches_for_notifications.json +0 -1
- data/spec/cassettes/Octokit_Client_Users/_unfollow/unfollows_a_user.json +0 -1
- data/spec/cassettes/Octokit_Client_Users/_update_user/updates_a_user_profile.json +0 -1
- data/spec/cassettes/Octokit_Client_Users/_user/returns_a_user.json +0 -1
- data/spec/cassettes/Octokit_Client_Users/_user/returns_the_authenticated_user.json +0 -1
- data/spec/cassettes/Octokit_Client_Users/_user_keys/returns_public_keys_for_another_user.json +0 -1
- data/spec/cassettes/Octokit_Client_Users/_validate_credentials/validates_username_and_password.json +0 -1
- data/spec/cassettes/Octokit_Client_Users/methods_requiring_an_existing_public_key/_add_key/adds_a_public_key.json +0 -1
- data/spec/cassettes/Octokit_Client_Users/methods_requiring_an_existing_public_key/_key/returns_a_public_key.json +0 -1
- data/spec/cassettes/Octokit_Client_Users/methods_requiring_an_existing_public_key/_remove_key/removes_a_public_key.json +0 -1
- data/spec/cassettes/Octokit_Client_Users/methods_requiring_an_existing_public_key/_update_key/updates_a_public_key.json +0 -1
- data/spec/cassettes/delete_authorization.json +0 -1
- data/spec/cassettes/rate_limit.json +0 -1
- data/spec/cassettes/root.json +0 -1
- data/spec/fixtures/large_file.txt +0 -48
- data/spec/fixtures/new_file.txt +0 -1
- data/spec/fixtures/updated_file.txt +0 -1
- data/spec/fixtures/upload.png +0 -0
- data/spec/fixtures/user.json +0 -31
- data/spec/fixtures/web_flow_token.json +0 -4
- data/spec/helper.rb +0 -133
- data/spec/octokit/client/authorizations_spec.rb +0 -118
- data/spec/octokit/client/commit_comments_spec.rb +0 -62
- data/spec/octokit/client/commits_spec.rb +0 -139
- data/spec/octokit/client/contents_spec.rb +0 -131
- data/spec/octokit/client/downloads_spec.rb +0 -59
- data/spec/octokit/client/emojis_spec.rb +0 -12
- data/spec/octokit/client/events_spec.rb +0 -106
- data/spec/octokit/client/gists_spec.rb +0 -184
- data/spec/octokit/client/gitignore_spec.rb +0 -26
- data/spec/octokit/client/issues_spec.rb +0 -174
- data/spec/octokit/client/labels_spec.rb +0 -115
- data/spec/octokit/client/legacy_search_spec.rb +0 -42
- data/spec/octokit/client/markdown_spec.rb +0 -20
- data/spec/octokit/client/meta_spec.rb +0 -14
- data/spec/octokit/client/milestones_spec.rb +0 -59
- data/spec/octokit/client/notifications_spec.rb +0 -85
- data/spec/octokit/client/objects_spec.rb +0 -71
- data/spec/octokit/client/organizations_spec.rb +0 -197
- data/spec/octokit/client/pub_sub_hubbub_spec.rb +0 -93
- data/spec/octokit/client/pull_requests_spec.rb +0 -186
- data/spec/octokit/client/rate_limit_spec.rb +0 -44
- data/spec/octokit/client/refs_spec.rb +0 -70
- data/spec/octokit/client/releases_spec.rb +0 -137
- data/spec/octokit/client/repositories_spec.rb +0 -406
- data/spec/octokit/client/say_spec.rb +0 -23
- data/spec/octokit/client/search_spec.rb +0 -59
- data/spec/octokit/client/service_status_spec.rb +0 -37
- data/spec/octokit/client/stats_spec.rb +0 -105
- data/spec/octokit/client/statuses_spec.rb +0 -28
- data/spec/octokit/client/users_spec.rb +0 -220
- data/spec/octokit/client_spec.rb +0 -576
- data/spec/octokit/gist_spec.rb +0 -49
- data/spec/octokit/rate_limit_spec.rb +0 -30
- data/spec/octokit/repository_spec.rb +0 -55
- data/spec/octokit_spec.rb +0 -46
@@ -1,85 +0,0 @@
|
|
1
|
-
require 'helper'
|
2
|
-
|
3
|
-
describe Octokit::Client::Notifications do
|
4
|
-
|
5
|
-
before do
|
6
|
-
Octokit.reset!
|
7
|
-
@client = oauth_client
|
8
|
-
end
|
9
|
-
|
10
|
-
describe ".notifications", :vcr do
|
11
|
-
it "lists the notifications for the current user" do
|
12
|
-
notifications = @client.notifications
|
13
|
-
expect(notifications).to be_kind_of Array
|
14
|
-
assert_requested :get, github_url("/notifications")
|
15
|
-
end
|
16
|
-
end # .notifications
|
17
|
-
|
18
|
-
describe ".repository_notifications", :vcr do
|
19
|
-
it "lists all notifications for a repository" do
|
20
|
-
notifications = @client.repository_notifications("api-playground/api-sandbox")
|
21
|
-
expect(notifications).to be_kind_of Array
|
22
|
-
assert_requested :get, github_url("/repos/api-playground/api-sandbox/notifications")
|
23
|
-
end
|
24
|
-
end # .repository_notifications
|
25
|
-
|
26
|
-
describe ".mark_notifications_as_read", :vcr do
|
27
|
-
it "returns true when notifications are marked as read" do
|
28
|
-
result = @client.mark_notifications_as_read
|
29
|
-
expect(result).to be_true
|
30
|
-
assert_requested :put, github_url("/notifications")
|
31
|
-
end
|
32
|
-
end # .mark_notifications_as_read
|
33
|
-
|
34
|
-
describe ".mark_repository_notifications_as_read", :vcr do
|
35
|
-
it "returns true when notifications for a repo are marked as read" do
|
36
|
-
result = @client.mark_repository_notifications_as_read("api-playground/api-sandbox")
|
37
|
-
expect(result).to be_true
|
38
|
-
assert_requested :put, github_url("/repos/api-playground/api-sandbox/notifications")
|
39
|
-
end
|
40
|
-
end # .mark_repository_notifications_as_read
|
41
|
-
|
42
|
-
context "methods that need a thread context" do
|
43
|
-
|
44
|
-
before(:each) do
|
45
|
-
@thread_id = @client.repository_notifications("api-playground/api-sandbox", :all => true).last.id
|
46
|
-
end
|
47
|
-
|
48
|
-
describe ".thread_notifications", :vcr do
|
49
|
-
it "returns notifications for a specific thread" do
|
50
|
-
notifications = @client.thread_notifications(@thread_id)
|
51
|
-
assert_requested :get, github_url("/notifications/threads/#{@thread_id}")
|
52
|
-
end
|
53
|
-
end # .thread_notifications
|
54
|
-
|
55
|
-
describe ".mark_thread_as_read", :vcr do
|
56
|
-
it "marks a thread as read" do
|
57
|
-
result = @client.mark_thread_as_read(@thread_id)
|
58
|
-
assert_requested :patch, github_url("/notifications/threads/#{@thread_id}")
|
59
|
-
end
|
60
|
-
end # .mark_thread_as_read
|
61
|
-
|
62
|
-
describe ".thread_subscription", :vcr do
|
63
|
-
it "returns a thread subscription" do
|
64
|
-
subscription = @client.thread_subscription(@thread_id)
|
65
|
-
assert_requested :get, github_url("/notifications/threads/#{@thread_id}/subscription")
|
66
|
-
end
|
67
|
-
end # .thread_subscription
|
68
|
-
|
69
|
-
describe ".update_thread_subscription", :vcr do
|
70
|
-
it "updates a thread subscription" do
|
71
|
-
subscription = @client.update_thread_subscription(@thread_id, :subscribed => true)
|
72
|
-
assert_requested :put, github_url("/notifications/threads/#{@thread_id}/subscription")
|
73
|
-
end
|
74
|
-
end # .update_thread_subscription
|
75
|
-
|
76
|
-
describe ".delete_thread_subscription", :vcr do
|
77
|
-
it "returns true with successful thread deletion" do
|
78
|
-
result = @client.delete_thread_subscription(@thread_id)
|
79
|
-
assert_requested :delete, github_url("/notifications/threads/#{@thread_id}/subscription")
|
80
|
-
end
|
81
|
-
end # .delete_thread_subscription
|
82
|
-
|
83
|
-
end
|
84
|
-
|
85
|
-
end
|
@@ -1,71 +0,0 @@
|
|
1
|
-
require 'helper'
|
2
|
-
|
3
|
-
describe Octokit::Client::Objects do
|
4
|
-
|
5
|
-
before do
|
6
|
-
Octokit.reset!
|
7
|
-
@client = oauth_client
|
8
|
-
end
|
9
|
-
|
10
|
-
describe ".tree", :vcr do
|
11
|
-
it "gets a tree" do
|
12
|
-
result = @client.tree("sferik/rails_admin", "3cdfabd973bc3caac209cba903cfdb3bf6636bcd")
|
13
|
-
expect(result.sha).to eq "3cdfabd973bc3caac209cba903cfdb3bf6636bcd"
|
14
|
-
expect(result.tree.first.path).to eq ".gitignore"
|
15
|
-
assert_requested :get, github_url("/repos/sferik/rails_admin/git/trees/3cdfabd973bc3caac209cba903cfdb3bf6636bcd")
|
16
|
-
end
|
17
|
-
it "gets a tree recursively" do
|
18
|
-
result = @client.tree("sferik/rails_admin", "3cdfabd973bc3caac209cba903cfdb3bf6636bcd", :recursive => true)
|
19
|
-
expect(result.sha).to eq "3cdfabd973bc3caac209cba903cfdb3bf6636bcd"
|
20
|
-
expect(result.tree.first.path).to eq ".gitignore"
|
21
|
-
assert_requested :get, github_url("/repos/sferik/rails_admin/git/trees/3cdfabd973bc3caac209cba903cfdb3bf6636bcd?recursive=true")
|
22
|
-
end
|
23
|
-
end # .tree
|
24
|
-
|
25
|
-
describe ".create_tree", :vcr do
|
26
|
-
it "creates a tree" do
|
27
|
-
tree = @client.create_tree("api-playground/api-sandbox", [ { "path" => "wynning.rb", "mode" => "100644", "type" => "blob", :content => "require 'fun'"} ])
|
28
|
-
assert_requested :post, github_url("/repos/api-playground/api-sandbox/git/trees")
|
29
|
-
end
|
30
|
-
end # .create_tree
|
31
|
-
|
32
|
-
describe ".blob", :vcr do
|
33
|
-
it "returns a blob" do
|
34
|
-
blob = @client.blob("sferik/rails_admin", "94616fa57520ac8147522c7cf9f03d555595c5ea")
|
35
|
-
expect(blob.sha).to eq "94616fa57520ac8147522c7cf9f03d555595c5ea"
|
36
|
-
assert_requested :get, github_url("/repos/sferik/rails_admin/git/blobs/94616fa57520ac8147522c7cf9f03d555595c5ea")
|
37
|
-
end
|
38
|
-
end # .blob
|
39
|
-
|
40
|
-
describe ".create_blob", :vcr do
|
41
|
-
it "creates a blob" do
|
42
|
-
blob = @client.create_blob("api-playground/api-sandbox", "content")
|
43
|
-
assert_requested :post, github_url("/repos/api-playground/api-sandbox/git/blobs")
|
44
|
-
end
|
45
|
-
end # .create_blob
|
46
|
-
|
47
|
-
describe ".tag", :vcr do
|
48
|
-
it "returns a tag" do
|
49
|
-
tag = @client.tag("octokit/octokit.rb", "23aad20633f4d2981b1c7209a800db3014774e96")
|
50
|
-
assert_requested :get, github_url("/repos/octokit/octokit.rb/git/tags/23aad20633f4d2981b1c7209a800db3014774e96")
|
51
|
-
end
|
52
|
-
end # .tag
|
53
|
-
|
54
|
-
describe ".create_tag", :vcr do
|
55
|
-
it "creates a tag" do
|
56
|
-
tag = @client.create_tag(
|
57
|
-
"api-playground/api-sandbox",
|
58
|
-
"v9000.0.0",
|
59
|
-
"Version 9000\n",
|
60
|
-
"eb11b3141c9dec3ba88d15b499d597a65df15320",
|
61
|
-
"commit",
|
62
|
-
"Wynn Netherland",
|
63
|
-
"wynn.netherland@gmail.com",
|
64
|
-
"2012-06-03T17:03:11-07:00"
|
65
|
-
)
|
66
|
-
expect(tag.tag).to eq "v9000.0.0"
|
67
|
-
assert_requested :post, github_url("/repos/api-playground/api-sandbox/git/tags")
|
68
|
-
end
|
69
|
-
end # .create_tag
|
70
|
-
|
71
|
-
end
|
@@ -1,197 +0,0 @@
|
|
1
|
-
require 'helper'
|
2
|
-
|
3
|
-
describe Octokit::Client::Organizations do
|
4
|
-
|
5
|
-
before do
|
6
|
-
Octokit.reset!
|
7
|
-
@client = oauth_client
|
8
|
-
end
|
9
|
-
|
10
|
-
describe ".organization", :vcr do
|
11
|
-
it "returns an organization" do
|
12
|
-
organization = @client.organization("codeforamerica")
|
13
|
-
expect(organization.name).to eq "Code For America"
|
14
|
-
assert_requested :get, github_url("/orgs/codeforamerica")
|
15
|
-
end
|
16
|
-
end # .organization
|
17
|
-
|
18
|
-
describe ".update_organization", :vcr do
|
19
|
-
it "updates an organization" do
|
20
|
-
organization = @client.update_organization("api-playground", {:name => "API Playground"})
|
21
|
-
expect(organization.login).to eq "api-playground"
|
22
|
-
assert_requested :patch, github_url("/orgs/api-playground")
|
23
|
-
end
|
24
|
-
end # .update_organization
|
25
|
-
|
26
|
-
describe ".organizations", :vcr do
|
27
|
-
it "returns all organizations for a user" do
|
28
|
-
organizations = @client.organizations("sferik")
|
29
|
-
expect(organizations).to be_kind_of Array
|
30
|
-
assert_requested :get, github_url("/users/sferik/orgs")
|
31
|
-
end
|
32
|
-
it "returns all organizations for the authenticated user" do
|
33
|
-
organizations = @client.organizations
|
34
|
-
expect(organizations).to be_kind_of Array
|
35
|
-
assert_requested :get, github_url("/user/orgs")
|
36
|
-
end
|
37
|
-
end # .organizations
|
38
|
-
|
39
|
-
describe ".organization_repositories", :vcr do
|
40
|
-
it "returns all public repositories for an organization" do
|
41
|
-
repositories = @client.organization_repositories("codeforamerica")
|
42
|
-
expect(repositories).to be_kind_of Array
|
43
|
-
assert_requested :get, github_url("/orgs/codeforamerica/repos")
|
44
|
-
end
|
45
|
-
end # .organization_repositories
|
46
|
-
|
47
|
-
describe ".organization_members", :vcr do
|
48
|
-
it "returns all public members of an organization" do
|
49
|
-
users = @client.organization_members("codeforamerica")
|
50
|
-
expect(users).to be_kind_of Array
|
51
|
-
assert_requested :get, github_url("/orgs/codeforamerica/members")
|
52
|
-
end
|
53
|
-
end # .organization_members
|
54
|
-
|
55
|
-
describe ".organization_member?", :vcr do
|
56
|
-
it "checks organization membership" do
|
57
|
-
is_hubbernaut = @client.organization_member?('github', 'pengwynn')
|
58
|
-
assert_requested :get, github_url("/orgs/github/members/pengwynn")
|
59
|
-
expect(is_hubbernaut).to be_true
|
60
|
-
end
|
61
|
-
end # .organization_member?
|
62
|
-
|
63
|
-
describe ".organization_public_member?", :vcr do
|
64
|
-
it "checks publicized org membership" do
|
65
|
-
is_hubbernaut = @client.organization_public_member?('github', 'pengwynn')
|
66
|
-
expect(is_hubbernaut).to be_true
|
67
|
-
assert_requested :get, github_url("/orgs/github/public_members/pengwynn")
|
68
|
-
end
|
69
|
-
end # .organization_public_member?
|
70
|
-
|
71
|
-
describe ".organization_teams", :vcr do
|
72
|
-
it "returns all teams for an organization" do
|
73
|
-
teams = @client.organization_teams("api-playground")
|
74
|
-
expect(teams).to be_kind_of Array
|
75
|
-
assert_requested :get, github_url("/orgs/api-playground/teams")
|
76
|
-
end
|
77
|
-
end # .organization_teams
|
78
|
-
|
79
|
-
|
80
|
-
context "methods that require a new team", :order => :default do
|
81
|
-
|
82
|
-
before(:each) do
|
83
|
-
@team_name = "Test Team #{Time.now.to_i}"
|
84
|
-
@team = @client.create_team("api-playground", {:name => @team_name})
|
85
|
-
end
|
86
|
-
|
87
|
-
after(:each) do
|
88
|
-
@client.delete_team(@team.id)
|
89
|
-
end
|
90
|
-
|
91
|
-
describe ".create_team", :vcr do
|
92
|
-
it "creates a team" do
|
93
|
-
assert_requested :post, github_url("/orgs/api-playground/teams")
|
94
|
-
end
|
95
|
-
end # .create_team
|
96
|
-
|
97
|
-
describe ".team", :vcr do
|
98
|
-
it "returns a team" do
|
99
|
-
team = @client.team(@team.id)
|
100
|
-
expect(team.id).to eq @team.id
|
101
|
-
assert_requested :get, github_url("/teams/#{@team.id}")
|
102
|
-
end
|
103
|
-
end # .team
|
104
|
-
|
105
|
-
describe ".update_team", :vcr do
|
106
|
-
it "updates a team" do
|
107
|
-
team = @client.update_team(@team.id, :name => "API Jedi")
|
108
|
-
assert_requested :patch, github_url("/teams/#{@team.id}")
|
109
|
-
end
|
110
|
-
end # .update_team
|
111
|
-
|
112
|
-
describe ".team_members", :vcr do
|
113
|
-
it "returns team members" do
|
114
|
-
users = @client.team_members(@team.id)
|
115
|
-
expect(users).to be_kind_of Array
|
116
|
-
assert_requested :get, github_url("/teams/#{@team.id}/members")
|
117
|
-
end
|
118
|
-
end # .team_members
|
119
|
-
|
120
|
-
describe ".add_team_member", :vcr do
|
121
|
-
it "adds a team member" do
|
122
|
-
result = @client.add_team_member(@team.id, "api-padawan")
|
123
|
-
assert_requested :put, github_url("/teams/#{@team.id}/members/api-padawan")
|
124
|
-
end
|
125
|
-
end # .add_team_member
|
126
|
-
|
127
|
-
describe ".remove_team_member", :vcr do
|
128
|
-
it "removes a team member" do
|
129
|
-
result = @client.remove_team_member(@team.id, "api-padawan")
|
130
|
-
assert_requested :delete, github_url("/teams/#{@team.id}/members/api-padawan")
|
131
|
-
end
|
132
|
-
end # .remove_team_member
|
133
|
-
|
134
|
-
describe ".team_member?", :vcr do
|
135
|
-
it "checks if a user is member of a team" do
|
136
|
-
is_team_member = @client.team_member?(@team.id, 'api-padawan')
|
137
|
-
assert_requested :get, github_url("/teams/#{@team.id}/members/api-padawan")
|
138
|
-
end
|
139
|
-
end # .team_member?
|
140
|
-
|
141
|
-
describe ".team_repositories", :vcr do
|
142
|
-
it "returns team repositories" do
|
143
|
-
repositories = @client.team_repositories(@team.id)
|
144
|
-
expect(repositories).to be_kind_of Array
|
145
|
-
assert_requested :get, github_url("/teams/#{@team.id}/repos")
|
146
|
-
end
|
147
|
-
end # .team_repositories
|
148
|
-
|
149
|
-
describe ".add_team_repository", :vcr do
|
150
|
-
it "adds a team repository" do
|
151
|
-
result = @client.add_team_repository(@team.id, "api-playground/api-sandbox")
|
152
|
-
assert_requested :put, github_url("/teams/#{@team.id}/repos/api-playground/api-sandbox")
|
153
|
-
end
|
154
|
-
end # .add_team_repository
|
155
|
-
|
156
|
-
describe ".remove_team_repository", :vcr do
|
157
|
-
it "removes a team repository" do
|
158
|
-
result = @client.remove_team_repository(@team.id, "api-playground/api-sandbox")
|
159
|
-
assert_requested :delete, github_url("/teams/#{@team.id}/repos/api-playground/api-sandbox")
|
160
|
-
end
|
161
|
-
end #.remove_team_repository
|
162
|
-
|
163
|
-
describe ".publicize_membership", :vcr do
|
164
|
-
it "publicizes membership" do
|
165
|
-
result = @client.publicize_membership("api-playground", "api-padawan")
|
166
|
-
assert_requested :put, github_url("/orgs/api-playground/public_members/api-padawan")
|
167
|
-
end
|
168
|
-
end # .publicize_membership
|
169
|
-
|
170
|
-
describe ".unpublicize_membership", :vcr do
|
171
|
-
it "unpublicizes membership" do
|
172
|
-
result = @client.unpublicize_membership("api-playground", "api-padawan")
|
173
|
-
assert_requested :delete, github_url("/orgs/api-playground/public_members/api-padawan")
|
174
|
-
end
|
175
|
-
end # .unpublicize_membership
|
176
|
-
|
177
|
-
describe ".delete_team", :vcr do
|
178
|
-
it "deletes a team" do
|
179
|
-
result = @client.delete_team(@team.id)
|
180
|
-
assert_requested :delete, github_url("/teams/#{@team.id}")
|
181
|
-
end
|
182
|
-
end # .delete_team
|
183
|
-
|
184
|
-
end # new team methods
|
185
|
-
|
186
|
-
describe ".remove_organization_member", :vcr do
|
187
|
-
it "removes a member from an organization" do
|
188
|
-
VCR.eject_cassette
|
189
|
-
VCR.turn_off!
|
190
|
-
stub_delete github_url("/orgs/api-playground/members/api-padawan")
|
191
|
-
result = @client.remove_organization_member("api-playground", "api-padawan")
|
192
|
-
assert_requested :delete, github_url("/orgs/api-playground/members/api-padawan")
|
193
|
-
VCR.turn_on!
|
194
|
-
end
|
195
|
-
end # .remove_organization_member
|
196
|
-
|
197
|
-
end
|
@@ -1,93 +0,0 @@
|
|
1
|
-
require 'helper'
|
2
|
-
|
3
|
-
describe Octokit::Client::PubSubHubbub do
|
4
|
-
|
5
|
-
before do
|
6
|
-
Octokit.reset!
|
7
|
-
@client = oauth_client
|
8
|
-
end
|
9
|
-
|
10
|
-
describe ".subscribe", :vcr do
|
11
|
-
it "subscribes to pull events" do
|
12
|
-
subscribe_request_body = {
|
13
|
-
:"hub.callback" => 'github://Travis?token=travistoken',
|
14
|
-
:"hub.mode" => 'subscribe',
|
15
|
-
:"hub.topic" => 'https://github.com/api-playground/api-sandbox/events/push'
|
16
|
-
}
|
17
|
-
|
18
|
-
result = @client.subscribe("https://github.com/api-playground/api-sandbox/events/push", "github://Travis?token=travistoken")
|
19
|
-
assert_requested :post, github_url("/hub"), :body => subscribe_request_body, :times => 1,
|
20
|
-
:headers => {'Content-type' => 'application/x-www-form-urlencoded'}
|
21
|
-
expect(result).to be_true
|
22
|
-
end
|
23
|
-
it "raises an error when topic is not recognized" do
|
24
|
-
subscribe_request_body = {
|
25
|
-
:"hub.callback" => 'github://Travis?token=travistoken',
|
26
|
-
:"hub.mode" => 'subscribe',
|
27
|
-
:"hub.topic" => 'https://github.com/joshk/not_existing_project/events/push'
|
28
|
-
}
|
29
|
-
expect {
|
30
|
-
@client.subscribe("https://github.com/joshk/not_existing_project/events/push", "github://Travis?token=travistoken")
|
31
|
-
}.to raise_error Octokit::UnprocessableEntity
|
32
|
-
assert_requested :post, github_url("/hub"), :body => subscribe_request_body, :times => 1,
|
33
|
-
:headers => {'Content-type' => 'application/x-www-form-urlencoded'}
|
34
|
-
end
|
35
|
-
end # .subscribe
|
36
|
-
|
37
|
-
describe ".unsubscribe", :vcr do
|
38
|
-
it "unsubscribes from pull events" do
|
39
|
-
unsubscribe_request_body = {
|
40
|
-
:"hub.callback" => 'github://Travis?token=travistoken',
|
41
|
-
:"hub.mode" => 'unsubscribe',
|
42
|
-
:"hub.topic" => 'https://github.com/api-playground/api-sandbox/events/push'
|
43
|
-
}
|
44
|
-
|
45
|
-
result = @client.unsubscribe("https://github.com/api-playground/api-sandbox/events/push", "github://Travis?token=travistoken")
|
46
|
-
assert_requested :post, github_url("/hub"), :body => unsubscribe_request_body, :times => 1,
|
47
|
-
:headers => {'Content-type' => 'application/x-www-form-urlencoded'}
|
48
|
-
expect(result).to be_true
|
49
|
-
end
|
50
|
-
end # .unsubscribe
|
51
|
-
|
52
|
-
describe ".subscribe_service_hook", :vcr do
|
53
|
-
it "subscribes to pull events on specified topic" do
|
54
|
-
subscribe_request_body = {
|
55
|
-
:"hub.callback" => 'github://Travis?token=travistoken',
|
56
|
-
:"hub.mode" => 'subscribe',
|
57
|
-
:"hub.topic" => 'https://github.com/api-playground/api-sandbox/events/push'
|
58
|
-
}
|
59
|
-
expect(@client.subscribe_service_hook("api-playground/api-sandbox", "Travis", { :token => 'travistoken' })).to eq(true)
|
60
|
-
assert_requested :post, github_url("/hub"), :body => subscribe_request_body, :times => 1,
|
61
|
-
:headers => {'Content-type' => 'application/x-www-form-urlencoded'}
|
62
|
-
end
|
63
|
-
it "encodes URL parameters" do
|
64
|
-
irc_request_body = {
|
65
|
-
:"hub.callback" => 'github://irc?server=chat.freenode.org&room=%23myproject',
|
66
|
-
:"hub.mode" => 'subscribe',
|
67
|
-
:"hub.topic" => 'https://github.com/joshk/completeness-fu/events/push'
|
68
|
-
}
|
69
|
-
stub_post("/hub").
|
70
|
-
with(irc_request_body).
|
71
|
-
to_return(:status => 204)
|
72
|
-
expect(@client.subscribe_service_hook("joshk/completeness-fu", "irc", { :server => "chat.freenode.org", :room => "#myproject"})).to eql(true)
|
73
|
-
# Since we can't depend upon hash ordering across the Rubies
|
74
|
-
assert_requested :post, "https://api.github.com/hub", :times => 1 do |req|
|
75
|
-
req.body[%r{hub.callback=github%3A%2F%2Firc%3Froom%3D%2523myproject}]
|
76
|
-
req.body[%r{server%3Dchat.freenode.org}]
|
77
|
-
end
|
78
|
-
end
|
79
|
-
end # .subscribe_service_hook
|
80
|
-
|
81
|
-
describe "unsubscribe_service_hook", :vcr do
|
82
|
-
it "unsubscribes to stop receiving events on specified topic" do
|
83
|
-
unsubscribe_request_body = {
|
84
|
-
:"hub.callback" => 'github://Travis',
|
85
|
-
:"hub.mode" => 'unsubscribe',
|
86
|
-
:"hub.topic" => 'https://github.com/api-playground/api-sandbox/events/push'
|
87
|
-
}
|
88
|
-
expect(@client.unsubscribe_service_hook("api-playground/api-sandbox", "Travis")).to eq(true)
|
89
|
-
assert_requested :post, github_url("/hub"), :body => unsubscribe_request_body, :times => 1,
|
90
|
-
:headers => {'Content-type' => 'application/x-www-form-urlencoded'}
|
91
|
-
end
|
92
|
-
end
|
93
|
-
end
|
@@ -1,186 +0,0 @@
|
|
1
|
-
require 'helper'
|
2
|
-
|
3
|
-
describe Octokit::Client::PullRequests do
|
4
|
-
|
5
|
-
before do
|
6
|
-
Octokit.reset!
|
7
|
-
@client = oauth_client
|
8
|
-
end
|
9
|
-
|
10
|
-
describe ".pull_requests", :vcr do
|
11
|
-
it "returns all pull requests" do
|
12
|
-
pulls = @client.pulls("octokit/octokit.rb")
|
13
|
-
expect(pulls).to be_kind_of Array
|
14
|
-
assert_requested :get, github_url("/repos/octokit/octokit.rb/pulls")
|
15
|
-
end
|
16
|
-
end # .pull_requests
|
17
|
-
|
18
|
-
context "methods that require a new pull" do
|
19
|
-
|
20
|
-
before(:each) do
|
21
|
-
@pull = @client.create_pull_request("api-playground/api-sandbox", "master", "branch-for-pr", "A new PR", "The Body")
|
22
|
-
end
|
23
|
-
|
24
|
-
after(:each) do
|
25
|
-
@client.close_pull_request("api-playground/api-sandbox", @pull.number)
|
26
|
-
end
|
27
|
-
|
28
|
-
describe ".create_pull_request", :vcr do
|
29
|
-
it "creates a pull request" do
|
30
|
-
expect(@pull.title).to eq "A new PR"
|
31
|
-
assert_requested :post, github_url("/repos/api-playground/api-sandbox/pulls")
|
32
|
-
end
|
33
|
-
end # .create_pull_request
|
34
|
-
|
35
|
-
describe ".pull_request", :vcr do
|
36
|
-
it "returns a pull request" do
|
37
|
-
pull = @client.pull("api-playground/api-sandbox", @pull.number)
|
38
|
-
expect(pull.title).to eq "A new PR"
|
39
|
-
assert_requested :get, github_url("/repos/api-playground/api-sandbox/pulls/#{@pull.number}")
|
40
|
-
end
|
41
|
-
end # .pull_request
|
42
|
-
|
43
|
-
describe ".update_pull_request", :vcr do
|
44
|
-
it "updates a pull request" do
|
45
|
-
pull = @client.update_pull_request('api-playground/api-sandbox', @pull.number, 'New title', 'Updated body')
|
46
|
-
assert_requested :patch, github_url("/repos/api-playground/api-sandbox/pulls/#{@pull.number}")
|
47
|
-
end
|
48
|
-
end # .update_pull_request
|
49
|
-
|
50
|
-
describe ".pull_merged?", :vcr do
|
51
|
-
it "returns whether the pull request has been merged" do
|
52
|
-
merged = @client.pull_merged?("api-playground/api-sandbox", @pull.number)
|
53
|
-
expect(merged).to_not be_true
|
54
|
-
assert_requested :get, github_url("/repos/api-playground/api-sandbox/pulls/#{@pull.number}/merge")
|
55
|
-
end
|
56
|
-
end # .pull_merged?
|
57
|
-
|
58
|
-
context "methods requiring a pull request comment" do
|
59
|
-
|
60
|
-
before do
|
61
|
-
new_comment = {
|
62
|
-
:body => "Hawt",
|
63
|
-
:commit_id => "c5ea55b0dabb77dfdaffd2344ab1a40ebd51fe32",
|
64
|
-
:path => "new-file.txt",
|
65
|
-
:position => 1
|
66
|
-
}
|
67
|
-
@comment = @client.create_pull_request_comment \
|
68
|
-
"api-playground/api-sandbox",
|
69
|
-
@pull.number,
|
70
|
-
new_comment[:body],
|
71
|
-
new_comment[:commit_id],
|
72
|
-
new_comment[:path],
|
73
|
-
new_comment[:position]
|
74
|
-
end
|
75
|
-
|
76
|
-
describe ".create_pull_request_comment", :vcr do
|
77
|
-
it "creates a new comment on a pull request" do
|
78
|
-
assert_requested :post, github_url("/repos/api-playground/api-sandbox/pulls/#{@pull.number}/comments")
|
79
|
-
end
|
80
|
-
end # .create_pull_request_comment
|
81
|
-
|
82
|
-
describe ".create_pull_request_comment_reply", :vcr do
|
83
|
-
it "creates a new reply to a pull request comment" do
|
84
|
-
new_comment = {
|
85
|
-
:body => "done.",
|
86
|
-
:in_reply_to => @comment.id
|
87
|
-
}
|
88
|
-
reply = @client.create_pull_request_comment_reply("api-playground/api-sandbox", @pull.number, new_comment[:body], new_comment[:in_reply_to])
|
89
|
-
assert_requested :post, github_url("/repos/api-playground/api-sandbox/pulls/#{@pull.number}/comments"), :times => 2
|
90
|
-
expect(reply.body).to eq(new_comment[:body])
|
91
|
-
end
|
92
|
-
end # .create_pull_request_comment_reply
|
93
|
-
|
94
|
-
describe ".update_pull_request_comment", :vcr do
|
95
|
-
it "updates a pull request comment" do
|
96
|
-
comment = @client.update_pull_request_comment("api-playground/api-sandbox", @comment.id, ":shipit:")
|
97
|
-
expect(comment.body).to eq(":shipit:")
|
98
|
-
assert_requested :patch, github_url("/repos/api-playground/api-sandbox/pulls/comments/#{@comment.id}")
|
99
|
-
end
|
100
|
-
end # .update_pull_request_comment
|
101
|
-
|
102
|
-
describe ".delete_pull_request_comment", :vcr do
|
103
|
-
it "deletes a pull request comment" do
|
104
|
-
result = @client.delete_pull_request_comment("api-playground/api-sandbox", @comment.id)
|
105
|
-
expect(result).to eq(true)
|
106
|
-
assert_requested :delete, github_url("/repos/api-playground/api-sandbox/pulls/comments/#{@comment.id}")
|
107
|
-
end
|
108
|
-
end # .delete_pull_request_comment
|
109
|
-
|
110
|
-
end # pull request comment methods
|
111
|
-
|
112
|
-
describe ".close_pull_request", :vcr do
|
113
|
-
it "closes a pull request" do
|
114
|
-
response = @client.close_pull_request("api-playground/api-sandbox", @pull.number)
|
115
|
-
expect(response.state).to eq 'closed'
|
116
|
-
assert_requested :patch, github_url("/repos/api-playground/api-sandbox/pulls/#{@pull.number}")
|
117
|
-
end
|
118
|
-
end
|
119
|
-
|
120
|
-
end # new @pull methods
|
121
|
-
|
122
|
-
# stub this so we don't have to set up new fixture data
|
123
|
-
describe ".merge_pull_request" do
|
124
|
-
it "merges the pull request" do
|
125
|
-
VCR.turn_off!
|
126
|
-
request = stub_put(github_url("/repos/api-playground/api-sandbox/pulls/123/merge"))
|
127
|
-
response = @client.merge_pull_request("api-playground/api-sandbox", 123)
|
128
|
-
assert_requested request
|
129
|
-
VCR.turn_on!
|
130
|
-
end
|
131
|
-
end # .merge_pull_request
|
132
|
-
|
133
|
-
describe ".create_pull_request_for_issue", :vcr do
|
134
|
-
it "creates a pull request and attach it to an existing issue" do
|
135
|
-
issue = @client.create_issue("api-playground/api-sandbox", 'A new issue', "Gonna turn this into a PR")
|
136
|
-
pull = @client.create_pull_request_for_issue("api-playground/api-sandbox", "master", "some-fourth-branch", issue.number)
|
137
|
-
assert_requested :post, github_url("/repos/api-playground/api-sandbox/pulls")
|
138
|
-
|
139
|
-
# cleanup so we can re-run test with blank cassette
|
140
|
-
@client.close_pull_request("api-playground/api-sandbox", pull.number)
|
141
|
-
end
|
142
|
-
end # .create_pull_request_for_issue
|
143
|
-
|
144
|
-
describe ".pull_requests_comments", :vcr do
|
145
|
-
it "returns all comments on all pull requests" do
|
146
|
-
comments = @client.pull_requests_comments("octokit/octokit.rb")
|
147
|
-
expect(comments).to be_kind_of Array
|
148
|
-
assert_requested :get, github_url("/repos/octokit/octokit.rb/pulls/comments")
|
149
|
-
end
|
150
|
-
end # .pull_requests_comments
|
151
|
-
|
152
|
-
describe ".pull_request_commits", :vcr do
|
153
|
-
it "returns the commits for a pull request" do
|
154
|
-
commits = @client.pull_commits("octokit/octokit.rb", 67)
|
155
|
-
expect(commits).to be_kind_of Array
|
156
|
-
assert_requested :get, github_url("/repos/octokit/octokit.rb/pulls/67/commits")
|
157
|
-
end
|
158
|
-
end # .pull_request_commits
|
159
|
-
|
160
|
-
describe ".pull_request_files", :vcr do
|
161
|
-
it "lists files for a pull request" do
|
162
|
-
files = @client.pull_request_files("octokit/octokit.rb", 67)
|
163
|
-
file = files.first
|
164
|
-
expect(file.filename).to eq('lib/octokit/configuration.rb')
|
165
|
-
expect(file.additions).to eq(4)
|
166
|
-
assert_requested :get, github_url("/repos/octokit/octokit.rb/pulls/67/files")
|
167
|
-
end
|
168
|
-
end # .pull_request_files
|
169
|
-
|
170
|
-
describe ".pull_request_comments", :vcr do
|
171
|
-
it "returns the comments for a pull request" do
|
172
|
-
comments = @client.pull_comments("octokit/octokit.rb", 67)
|
173
|
-
expect(comments).to be_kind_of Array
|
174
|
-
assert_requested :get, github_url("/repos/octokit/octokit.rb/pulls/67/comments")
|
175
|
-
end
|
176
|
-
end # .pull_request_comments
|
177
|
-
|
178
|
-
describe ".pull_request_comment", :vcr do
|
179
|
-
it "returns a comment on a pull request" do
|
180
|
-
comment = @client.pull_request_comment("octokit/octokit.rb", 1903950)
|
181
|
-
expect(comment.body).to_not be_nil
|
182
|
-
assert_requested :get, github_url("/repos/octokit/octokit.rb/pulls/comments/1903950")
|
183
|
-
end
|
184
|
-
end # .pull_request_comment
|
185
|
-
|
186
|
-
end
|